forked from mom-ocean/MOM6
-
Notifications
You must be signed in to change notification settings - Fork 63
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
+Add ANSWER_DATE runtime parameters #179
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added optional answer_date arguments to various remapping routines. These are vintage-encoding integers intended to replace the logical answers_2018 arguments, and allow for multiple generations of improved algorithms rather than just two choices, without requiring added interface changes. However, this change is backward compatible, and these two arguments are both offered for now. All answers are bitwise identical, but there are new optional arguments to numerous publicly visible routines.
Replace the answers_2018 arguments with answer_date arguments to specify the version of expressions in a number of calls from the upper-level ALE modules, while also adding new answer_date optional arguments to several of the publicly visible remapping routines, including ALE_remap_scalar, regrid_set_params and remapping_set_params. The routine interpolate_grid, which is not called from outside of the regrid_interp module, is no longer being made publicly visible. Some comments noting parameters that are not guaranteed to be externally set or that can not be reset were also added. All answers are bitwise identical.
Replace answers_2018 arguments with answer_date arguments to specify the version of expressions used in a number of vertical or horizontal regridding calls. In some cases, this also involves replacing one of the elements in an opaque type. It can also involve reading (but not yet logging) the new runtime parameter DEFAULT_ANSWER_DATE, but if it not set the results are unchanged from before. There is also a new optional argument, remap_answer_date, to wave_speed_init and wave_speed_set_param. Some comments were also added to describe real variables in VarMix_init. All answers are bitwise identical.
Eliminated the now unused answers_2018 optional arguments in a variety of the ALE-related subroutines that are only called from code in the ALE directory. The functionality previously provided by answers_2018 is now provided by the more flexible answer_date arguments. A handful of spelling errors were also corrected in comments in the files that were edited. All answers are bitwise identical.
Added the new runtime parameter REMAPPING_ANSWER_DATE, which takes precedence over the older parameter REMAPPING_2018_ANSWERS. There are 11 files with get_param calls for this new parameter. Also started logging the value of DEFAULT_ANSWER_DATE. All answers are bitwise identical, but there are new entries in the MOM_parameter_doc.all files.
Added the new runtime parameter HOR_REGRID_ANSWER_DATE, which takes precedence over the older parameter HOR_REGRID_2018_ANSWERS. There are 3 files with get_param calls for this new parameter. All answers are bitwise identical, but there are new entries in the MOM_parameter_doc.all files.
Added 9 ..._ANSWER_DATE runtime parameters controlling the expressions and order of arithmetic in the parameterizations modules, which take precedence over their older ..._ANSWERS_2018 counterparts. The new runtime parameters are HOR_VISC_ANSWER_DATE, MEKE_GEOMETRIC_ANSWER_DATE, EPBL_ANSWER_DATE, OPTICS_ANSWER_DATE, REGULARIZE_LAYERS_ANSWER_DATE, SET_DIFF_ANSWER_DATE, SET_VISC_ANSWER_DATE, TIDAL_MIXING_ANSWER_DATE and VERT_FRICTION_ANSWER_DATE. All answers are bitwise identical, but there are numerous new entries in the MOM_parameter_doc.all files.
Added 6 ..._ANSWER_DATE runtime parameters controlling the expressions and order of arithmetic in the core, ocean_data_assim, user, and driver modules, which take precedence over their older ..._ANSWERS_2018 counterparts. The new runtime parameters are SURFACE_ANSWER_DATE, BAROTROPIC_ANSWER_DATE, ODA_ANSWER_DATE, IDL_HURR_ANSWER_DATE SURFACE_FORCING_ANSWER_DATE and WIND_GYRES_ANSWER_DATE. All answers are bitwise identical, but there are numerous new entries in the MOM_parameter_doc.all files.
Added do_not_log=just_read arguments to get_param calls where other calls in the same initialization routines already had them, so that the logging of the parameters is consistent. All answers are bitwise identical, but this could lead to changes in the MOM_parameter_doc files.
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #179 +/- ##
============================================
- Coverage 37.40% 37.33% -0.08%
============================================
Files 259 258 -1
Lines 71850 71456 -394
Branches 13442 13418 -24
============================================
- Hits 26877 26676 -201
+ Misses 40030 39821 -209
- Partials 4943 4959 +16
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/16299 ✔️ 🟡 |
marshallward
approved these changes
Aug 4, 2022
Hallberg-NOAA
added a commit
to Hallberg-NOAA/MOM6
that referenced
this pull request
Nov 25, 2024
When HOR_VISC_ANSWER_DATE was introduced to replace HOR_VISC_2018_ANSWERS on August 4, 2022 as a part of github.com/NOAA-GFDL/pull/179, the logic was incorrectly specified, using the older form with the newer answer date and vice versa, because `(CS%answer_date > 20190101)` was used instead of `(CS%answer_date < 20190101)`. (Curiously, using exactly 20190101 actually gives the intended result.) This commit modifies this logic so that the older (mildly dimensionally inconsistent) version is now being used for answer dates between 20190102 and 20241201, but a very late answer date uses the corrected form. The offending block of code is only used when USE_MEKE is true and the Rossby number scaling of the biharmonic energy source is enabled by setting MEKE_BACKSCAT_RO_C > 0, which does not appear to be very common. To avoid logging the description of this ugly new logic in MOM_parameter_doc files where it does not impact the solutions, new logic was added to limit the logging of HOR_VISC_ANSWER_DATE. Also, as there are no known non-Boussinesq cases with this combination of MEKE parameters, the minimum value of HOR_VISC_ANSWER_DATE was changed to 20241201 when the model is in non-Boussinesq mode. Because this bug went undetected when it was first introduced, it probably is not widely used, and it might make sense to obsolete HOR_VISC_ANSWER_DATE and eliminate the older, inconsistent block of code. This commit could change answers for answer dates that are above 20241201 with the MEKE Rossby number scaling enabled via MEKE_BACKSCAT_RO_C > 0.
marshallward
pushed a commit
that referenced
this pull request
Nov 26, 2024
When HOR_VISC_ANSWER_DATE was introduced to replace HOR_VISC_2018_ANSWERS on August 4, 2022 as a part of github.com//pull/179, the logic was incorrectly specified, using the older form with the newer answer date and vice versa, because `(CS%answer_date > 20190101)` was used instead of `(CS%answer_date < 20190101)`. (Curiously, using exactly 20190101 actually gives the intended result.) This commit modifies this logic so that the older (mildly dimensionally inconsistent) version is now being used for answer dates between 20190102 and 20241201, but a very late answer date uses the corrected form. The offending block of code is only used when USE_MEKE is true and the Rossby number scaling of the biharmonic energy source is enabled by setting MEKE_BACKSCAT_RO_C > 0, which does not appear to be very common. To avoid logging the description of this ugly new logic in MOM_parameter_doc files where it does not impact the solutions, new logic was added to limit the logging of HOR_VISC_ANSWER_DATE. Also, as there are no known non-Boussinesq cases with this combination of MEKE parameters, the minimum value of HOR_VISC_ANSWER_DATE was changed to 20241201 when the model is in non-Boussinesq mode. Because this bug went undetected when it was first introduced, it probably is not widely used, and it might make sense to obsolete HOR_VISC_ANSWER_DATE and eliminate the older, inconsistent block of code. This commit could change answers for answer dates that are above 20241201 with the MEKE Rossby number scaling enabled via MEKE_BACKSCAT_RO_C > 0.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR includes a series of commits that replace the logical answers_2018
variables with 8-digit answer_date variables. Setting these new variables to
20181231 or lower values is equivalent to setting the corresponding answers_2018
variables to True, while the larger values (or dates) will be used to allow
for a succession of newer answers to eventually be supported. There are 16 new
runtime parameters, and corresponding new entries in the MOM_parameter_doc
files, but all answers are bitwise identical by default. Once these new
parameters have become a part of the main branch, the various experiments
should be modified so that the older ANSWERS_2018 parameters can eventually
be obsoleted.
The commits in this PR include: