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

+Add a better variant of add_LOTW_BBL_diffusivity #671

Merged

Conversation

Hallberg-NOAA
Copy link
Member

Added a refactored version of the code in add_LOTW_BBL_diffusivity() that is more accurate by avoiding a subtraction of two large numbers to determine the distance from the surface and more reproducible by avoiding the use of the Fortran sum() function. This new version of the code is mathematically equivalent to the original, and it is selected by setting the new runtime parameter LOTW_BBL_ANSWER_DATE to be greater than 20240630. This probably could have been done reusing the existing parameter SET_DIFF_ANSWER_DATE, but this would have meant answer changes for some cases that set this to a high value. By default the original code is used, but the default should be changed later to follow the value of DEFAULT_ANSWER_DATE. By default, all answers are bitwise identical but there is a new runtime parameter in some cases.

@Hallberg-NOAA Hallberg-NOAA added the Parameter change Input parameter changes (addition, removal, or description) label Jun 9, 2024
Copy link

@MJHarrison-GFDL MJHarrison-GFDL left a comment

Choose a reason for hiding this comment

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

Based on the comments provided and a review of the code, these changes are implemented as described and accepted.

  Added a refactored version of add_LOTW_BBL_diffusivity that is more accurate
by avoiding a subtraction of two large numbers to determine the distance from
the surface and more reproducible by avoiding the use of the Fortran sum
function.  This new version of the code is mathematically equivalent to the
original, and it is selected by setting the new runtime parameter
LOTW_BBL_ANSWER_DATE to be greater than 20240630.  This probably could have been
done reusing the existing parameter SET_DIFF_ANSWER_DATE, but this would have
meant answer changes for some cases that set this to a high value.  By default
the original code is used, but the default should be changed later to follow the
value of DEFAULT_ANSWER_DATE.  By default, all answers are bitwise identical but
there is a new runtime parameter in some cases.
@Hallberg-NOAA Hallberg-NOAA force-pushed the better_add_LOTW_BBL_diff branch from c4791cf to c92de48 Compare July 9, 2024 20:37
@Hallberg-NOAA
Copy link
Member Author

Hallberg-NOAA commented Jul 9, 2024

This PR has conditionally passed the pipeline testing at gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/24049 with the expected warnings about there being new runtime parameters.

@marshallward marshallward merged commit c4a72df into NOAA-GFDL:dev/gfdl Jul 10, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Parameter change Input parameter changes (addition, removal, or description)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants