-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
+Refactor MOM_opacity to replace hard-coded params #775
+Refactor MOM_opacity to replace hard-coded params #775
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there should be a response from the model (e.g. FATAL) to changing parameters that would not have any effect. The rest is nitpicking.
0614866
to
45da0a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving on behalf of @raphaeldussin but I will let you all decide when the conversation below above has been resolved.
Neither opacity_manizza() nor opacity_morel() appears anywhere in the GFDL ocean-BGC code under version control at https://github.com/NOAA-GFDL/ocean_BGC. I strongly suspect that these routines are not used anywhere. |
70384fd
to
7937920
Compare
This PR passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/26027, with the expected changes in parameter settings. However, there are |
Refactored MOM_opacity to replace hard-coded dimensional parameters for the Manizza and Morel opacity fits with run-time parameters, and also added the runtime parameter OPACITY_BAND_WAVELENGTHS to provide the ability to set the wavelengths of the bands, even though these are not actually used in MOM6. By default, these parameters are all set to the previous hard-coded values, using the recently added defaults argument to get_param_real_array(). The bounds of the frequency band label arrays with the MANIZZA_05 opacity scheme were also corrected when PEN_SW_NBANDS > 3, but it would not be typical to use so many bands for no purpose and these labeling arrays (optics%min_wavelength_band and optics%max_wavelength_band) do not appear to be used anywhere. In addition, the unused publicly visible routines opacity_manizza and opacity_morel were eliminated or made private. All answers are bitwise identical, but there are new entries in some MOM_parameter_doc files.
7937920
to
0021788
Compare
This revised version has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/26036 with the expected warnings about additional runtime parameters. |
Refactored
MOM_opacity
to replace hard-coded dimensional parameters for the Manizza and Morel opacity fits with run-time parameters. By default, these parameters are set to the previous hard-coded values, using the recently added defaults argument toget_param_real_array()
. The bounds of the frequency band label arrays with theMANIZZA_05
opacity scheme were also corrected whenPEN_SW_NBANDS > 3
, but it would not by typical to use so many bands for no purpose and these labeling arrays (optics%min_wavelength_band
andoptics%max_wavelength_band
) do not appear to be used anywhere. In addition, the unused publicly visible routinesopacity_manizza()
andopacity_morel()
were eliminated or made private. All answers are bitwise identical, but there are new entries in someMOM_parameter_doc
files.