Skip to content

Conversation

@Hallberg-NOAA
Copy link
Collaborator

This series of 3 commits updates the defaults for a total of 21 runtime parameters, and obsoletes another 7 runtime parameters, as agreed to in MOM6 consortium-wide meetings on July 29, 2024, December 16, 2024 and June 2, 2025.

The default equation of state is now EQN_OF_STATE = "WRIGHT_FULL", in place of the buggy previous default of "WRIGHT".

The 8 answer date parameters REGRIDDING_ANSWER_DATE, TIDES_ANSWER_DATE, WAVE_INTERFACE_ANSWER_DATE, MEKE_GM_SRC_ANSWER_DATE, NDIFF_ANSWER_DATE, KPP%ANSWER_DATE, HOR_DIFF_ANSWER_DATE and LOTW_BBL_ANSWER_DATE all now take their default values from DEFAULT_ANSWER_DATE.

The bug-retention parameters MEKE_GM_SRC_ALT_SLOPE_BUG, HOR_DIFF_LIMIT_BUG, BACKSCATTER_UNDERBOUND, DETERMINE_TEMP_CONVERGENCE_BUG, LA_MISALIGNMENT_BUG, IDL_HURR_SCM_EDGE_TAPER_BUG, VISC_REM_BUG and FRICTWORK_BUG are now false by default.

With these changes, MASS_WEIGHT_IN_PRESSURE_GRADIENT_TOP now takes its default value from the setting for MASS_WEIGHT_IN_PRESSURE_GRADIENT. Similarly, the default for DRAG_DIFFUSIVITY_ANSWER_DATE is now set to follow SET_DIFF_ANSWER_DATE. KELVIN_WAVE_VEL_NUDGING_TIMESCALE is now set to a negative value by default, forcing the user to provide a valid value at runtime. SHELFWAVE_CORRECT_AMPLITUDE now defaults to True.

The parameters BETTER_BOUND_KH, BETTER_BOUND_AH, USE_DIABATIC_TIME_BUG, FIX_UNSPLIT_DT_VISC_BUG, CFL_BASED_TRUNCATIONS and KD_BACKGROUND_VIA_KDML_BUG have all been obsoleted and are no longer valid MOM6 runtime parameters.

These code changes can change answers if any of the impacted parameters are taking their default values, but answers will not change if they are set explicitly. The easiest way to determine what parameters must now be set explicitly to retain existing answers is to run a configuration twice with versions of the model from before and after this PR, and to compare the MOM_parameter_doc.all files to determine which parameters have been changed by the changing defaults. The 3rd of the 3 commits, which obsoletes several parameters, also has the effect of changing the order with which some of the retained parameters are logged in the MOM_parameter_doc.all files, so identifying which parameters need to be set explicitly to handle changes to their defaults is simpler if only the first two commits are considered.

The specific commits in this PR include:

  Updated the default values of 15 runtime parameters, as agreed upon in a MOM6
consortium wide conversations on July 29, 2024 and December 16, 2024.  The most
prominent of these is that the default equation of state is now EQN_OF_STATE =
"WRIGHT_FULL", in place of the buggy previous default of "WRIGHT".

  The 8 answer date parameters REGRIDDING_ANSWER_DATE, TIDES_ANSWER_DATE,
WAVE_INTERFACE_ANSWER_DATE, MEKE_GM_SRC_ANSWER_DATE, NDIFF_ANSWER_DATE,
KPP%ANSWER_DATE, HOR_DIFF_ANSWER_DATE and LOTW_BBL_ANSWER_DATE all now take
their default values from DEFAULT_ANSWER_DATE.

  The bug-retention parameters MEKE_GM_SRC_ALT_SLOPE_BUG, HOR_DIFF_LIMIT_BUG,
BACKSCATTER_UNDERBOUND, DETERMINE_TEMP_CONVERGENCE_BUG, LA_MISALIGNMENT_BUG and
IDL_HURR_SCM_EDGE_TAPER_BUG are now false by default.

  The MOM_input files for the test cases in the `.testing/tc[01234]` directories
were updated to explicitly set all of these parameters to their previous default
values if they are used in the relevant cases, as well as parameters that will
be change following discussions from June 2, 2205.

  Bitwise identical answers are recovered if all 15 of these parameters are set
explicitly, but answers can change if any of these parameters take default
values.  All of these default changes are the consensus decision of
consortium-wise MOM6 dev calls.
  Updated the default values of 6 runtime parameters, as agreed upon in a MOM6
consortium wide conversations on June 2, 2025. VISC_REM_BUG and FRICTWORK_BUG
are now false by default. MASS_WEIGHT_IN_PRESSURE_GRADIENT_TOP now takes its
default value from the setting for MASS_WEIGHT_IN_PRESSURE_GRADIENT.  Similarly,
the default for DRAG_DIFFUSIVITY_ANSWER_DATE is now set to follow
SET_DIFF_ANSWER_DATE. KELVIN_WAVE_VEL_NUDGING_TIMESCALE is now set to a negative
value by default, forcing the user to provide a valid value at runtime.
SHELFWAVE_CORRECT_AMPLITUDE now defaults to True.
  Obsoleted 7 runtime parameters that always take the same value, as agreed upon
in a MOM6 consortium wide conversations on June 2, 2025, and added tests to
catch these parameters in MOM_obsolete_params.  The parameters that were
obsoleted include BETTER_BOUND_KH, BETTER_BOUND_AH, USE_DIABATIC_TIME_BUG,
FIX_UNSPLIT_DT_VISC_BUG, CFL_BASED_TRUNCATIONS and KD_BACKGROUND_VIA_KDML_BUG.
The runtime parameter MAXVEL still exists, but it is logged in a different order
than before, changing the contents of the MOM_parameter_doc files. All answers
are bitwise identical in cases that run, but cases that use these parameters
will experience a fatal error.
This was referenced Aug 5, 2025
Copy link
Collaborator

@kshedstrom kshedstrom left a comment

Choose a reason for hiding this comment

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

I approve this PR. It does change some of my answers, so I must have been using some bad, old options.

@Hallberg-NOAA
Copy link
Collaborator Author

If you would like to recover your previous answers, @kshedstrom, please note that you can figure out which parameters would need to be set explicitly by comparing the MOM_parameter_doc.all files generated by runs with the old and updated versions of the code.

@kshedstrom
Copy link
Collaborator

Indeed, I get my old answers back with these two lines:

#override TIDES_ANSWER_DATE = 20230630
#override WAVE_INTERFACE_ANSWER_DATE = 20221231

@jiandewang
Copy link
Collaborator

@Hallberg-NOAA While I am testing this PR, a minor compiling warning issue (see NOAA-EMC#159 ) is detected in previous #1668 (which bypassed our previous review radar). Is it fine for you to make corrections on MOM_generic_tracer.F90 to eliminate compiling warning (as it's not allowed by NCEP operational) and add in this PR ?

Copy link
Collaborator

@abozec abozec left a comment

Choose a reason for hiding this comment

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

COAPS approves.

@mathomp4
Copy link
Collaborator

mathomp4 commented Aug 8, 2025

GMAO might be a bit delayed in approval.

As it is, this PR is non-zero-diff for our model. But, following the advice of @Hallberg-NOAA, I compared the MOM_parameter_doc.all files and I found 15 differences. And if I add all 15 of those to our MOM_override file, it's zero-diff.

But...weirdly, looking at the log file from our model (which prints out a lot of stuff), it almost seems to me it shouldn't be given differences I see in diagnostic prints. Scratch that. I was comparing the wrong runs. The diagnostic prints look good.

I'm going to need to consult @sinakhani on this to see if we want to keep those 15 new overrides, or accept this PR and an answer change.

@jiandewang
Copy link
Collaborator

so far I am able to retain UFS baseline for 025x025, 05x05 and 1x1 settings. Still working on other settings, can't image how many different settings we have in UFS. Also I just ringed DA group (NOAA-EMC/GDASApp#1852)

@Hallberg-NOAA
Copy link
Collaborator Author

@jiandewang, not noting these compile-time warnings with the previous PR to main was an oversight, but this is something that I think can be addressed easily enough as a part of this PR without imposing much of a burden on the rest of the consortium, especially as the changes will be entirely restricted to the stub version of MOM_generic_tracer.F90. What compiler and what options are you using that generate these warnings, so that we can reproduce them and can make sure that we have these warnings cleared up before we try again?

@jiandewang
Copy link
Collaborator

@Hallberg-NOAA thanks for your kindness to address this warning issue here which will speed up UFS updating.

ifort compiling flag:
-g -traceback -fpp -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -align array64byte -qno-opt-dynamic-align -diag-disable 5462 -diag-disable 7712 -diag-disable 8291 -real-size 64 -g -traceback -i4 -r8 -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -sox -O2 -debug minimal -fp-model source -module mod -c

  Added code to set all intent(out) arguments in the stub version of the
MOM_generic_tracer routines MOM_generic_tracer_stock(),
MOM_generic_tracer_min_max() and MOM_generic_tracer_get() to avoid compile-time
warnings.  These stub routines are never supposed to be used, and there would be
a fatal error during the registration phase if they are used.  The values that
are set in these stub routines are extremely large or otherwise nonsensical so
that it would make it easier to debug them if they were used accidentally.  All
answers are bitwise identical in any cases that run successfully.
@Hallberg-NOAA
Copy link
Collaborator Author

I have now updated this PR with an additional commit that should eliminate the compile-time warnings in the stub version of MOM_generic_tracer.F90 that @jiandewang describes above. This commit should not change any answers for anyone, and there will be a fatal error during tracer registration if this stub version of the module is being used.

@jiandewang
Copy link
Collaborator

Thanks @Hallberg-NOAA

@jiandewang
Copy link
Collaborator

thanks @Hallberg-NOAA no more compiling warning. And I can retain current UFS baseline by explicitly setting some parameteres (all recorded at NOAA-EMC#160). Approval this PR.

@jiandewang jiandewang self-requested a review August 13, 2025 17:35
Copy link
Collaborator

@dougiesquire dougiesquire left a comment

Choose a reason for hiding this comment

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

Thanks @Hallberg-NOAA. ACCESS-NRI approve.

@mathomp4
Copy link
Collaborator

I talked with @sinakhani and GMAO approves. We know the way to keep zero-diff and he is investigating the new settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants