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 DETERMINE_TEMP_CONVERGENCE_BUG parameter #654

Merged

Conversation

Hallberg-NOAA
Copy link
Member

Added the new runtime parameter DETERMINE_TEMP_CONVERGENCE_BUG to avoid using layout-dependent tests for temperature and salinity tolerances to determine when to stop iterating in determine_temperature(). Also added logic that correctly determines when iterations can be stopped because no further changes occur, and rearranged to loops to avoid revisiting layers that have converged.

Because the default tolerances for the temperature, salinity and density changes are set to be the same and the partial derivatives of density with temperature and salinity are less than 1 in the MKS units used here for a realistic equation of state of seawater, this bug does not impact any of the existing regression test cases, but this bug could lead to non-reproducibility with non-default values.

This commit changes the entries in the MOM_parameter_doc files that have Z_INIT_ALE_REMAPPING = .false. and FIT_TO_TARGET_DENSITY_IC = .true., by adding a new runtime parameter and by not logging DETERMINE_TEMP_T_TOLERANCE and DETERMINE_TEMP_T_TOLERANCE if they are not used because DETERMINE_TEMP_CONVERGENCE_BUG is false. By default, all answers are bitwise identical.

  Added the new runtime parameter DETERMINE_TEMP_CONVERGENCE_BUG to avoid using
layout-dependent tests for temperature and salinity tolerances to determine when
to stop iterating in determine_temperature.  Also added logic that correctly
determines when iterations can be stopped because no further changes occur, and
rearranged to loops to avoid revisiting layers that have converged.

  Because the default tolerances for the temperature, salinity and density
changes are set to be the same and the partial derivatives of density with
temperature and salinity are less than 1 in the MKS units used here for a
realistic equation of state of seawater, this bug does not impact any of the
existing regression test cases, but this bug could lead to non-reproducibility
with non-default values.

  This commit changes the entries in the MOM_parameter_doc files that have
Z_INIT_ALE_REMAPPING = .false. and FIT_TO_TARGET_DENSITY_IC = .true., by adding
a new runtime parameter and by not logging DETERMINE_TEMP_T_TOLERANCE and
DETERMINE_TEMP_T_TOLERANCE if they are not used because
DETERMINE_TEMP_CONVERGENCE_BUG is false.  By default, all answers are bitwise
identical.
@Hallberg-NOAA Hallberg-NOAA added bug Something isn't working Parameter change Input parameter changes (addition, removal, or description) labels May 27, 2024
@MJHarrison-GFDL MJHarrison-GFDL self-requested a review June 3, 2024 21:09
@MJHarrison-GFDL MJHarrison-GFDL self-assigned this Jun 3, 2024
@MJHarrison-GFDL
Copy link

I agree wholeheartedly with these changes. This will effectively avoid layout dependent results after initialization for certain configurations and this bug should be disabled for new layered configurations with realistic initialization.

@marshallward
Copy link
Member

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

@marshallward marshallward merged commit d6500bc into NOAA-GFDL:dev/gfdl Jun 5, 2024
10 checks passed
@Hallberg-NOAA Hallberg-NOAA deleted the determine_temp_bug_flag branch June 5, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Parameter change Input parameter changes (addition, removal, or description)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants