Skip to content
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

*+HOR_VISC_ANSWER_DATE logic fix #759

Merged

Conversation

Hallberg-NOAA
Copy link
Member

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.

  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.
@Hallberg-NOAA Hallberg-NOAA added bug Something isn't working documentation Improvements or additions to documentation answer-changing A change in results (actual or potential) labels Nov 25, 2024
Copy link
Member

@marshallward marshallward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took me a while to work out that pre-2019 code has been inadvertently running the corrected version. Hence <2019 and >2024 now must use the corrected version. LGTM

@marshallward
Copy link
Member

Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/25592 ✔️ 🟡

@marshallward marshallward merged commit 2b72682 into NOAA-GFDL:dev/gfdl Nov 26, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answer-changing A change in results (actual or potential) bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants