Skip to content

Commit

Permalink
*Update defaults for EQN_OF_STATE and 14 parameters
Browse files Browse the repository at this point in the history
  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.

  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.
  • Loading branch information
Hallberg-NOAA committed Jan 7, 2025
1 parent 7ca5ed9 commit 94d95c1
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/ALE/MOM_regridding.F90
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ subroutine initialize_regridding(CS, GV, US, max_depth, param_file, mdl, coord_m
"Values below 20190101 result in the use of older, less accurate expressions "//&
"that were in use at the end of 2018. Higher values result in the use of more "//&
"robust and accurate forms of mathematically equivalent expressions.", &
default=20181231, do_not_log=.not.GV%Boussinesq) ! ### change to default=default_answer_date)
default=default_answer_date, do_not_log=.not.GV%Boussinesq)
if (.not.GV%Boussinesq) regrid_answer_date = max(regrid_answer_date, 20230701)
call set_regrid_params(CS, regrid_answer_date=regrid_answer_date)
endif
Expand Down
2 changes: 1 addition & 1 deletion src/core/MOM_PressureForce_FV.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1777,7 +1777,7 @@ subroutine PressureForce_FV_init(Time, G, GV, US, param_file, diag, CS, SAL_CSp,
"The vintage of self-attraction and loading (SAL) and tidal forcing calculations in "//&
"Boussinesq mode. Values below 20230701 recover the old answers in which the SAL is "//&
"part of the tidal forcing calculation. The change is due to a reordered summation "//&
"and the difference is only at bit level.", default=20230630)
"and the difference is only at bit level.", default=default_answer_date)
endif
call get_param(param_file, mdl, "CALCULATE_SAL", CS%calculate_SAL, &
"If true, calculate self-attraction and loading.", default=CS%tides)
Expand Down
2 changes: 1 addition & 1 deletion src/equation_of_state/MOM_EOS.F90
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ module MOM_EOS
character*(12), parameter :: EOS_ROQUET_RHO_STRING = "ROQUET_RHO" !< A string for specifying the equation of state
character*(12), parameter :: EOS_ROQUET_SPV_STRING = "ROQUET_SPV" !< A string for specifying the equation of state
character*(12), parameter :: EOS_JACKETT06_STRING = "JACKETT_06" !< A string for specifying the equation of state
character*(12), parameter :: EOS_DEFAULT = EOS_WRIGHT_STRING !< The default equation of state
character*(12), parameter :: EOS_DEFAULT = EOS_WRIGHT_FULL_STRING !< The default equation of state

integer, parameter :: TFREEZE_LINEAR = 1 !< A named integer specifying a freezing point expression
integer, parameter :: TFREEZE_MILLERO = 2 !< A named integer specifying a freezing point expression
Expand Down
3 changes: 1 addition & 2 deletions src/parameterizations/lateral/MOM_hor_visc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2545,8 +2545,7 @@ subroutine hor_visc_init(Time, G, GV, US, param_file, diag, CS, ADp)
"biharmonic viscosity when no Laplacian viscosity is applied. The default "//&
"is true for historical reasons, but this option probably should not be used "//&
"because it can contribute to numerical instabilities.", &
default=.true., do_not_log=.not.((CS%better_bound_Kh).and.(CS%better_bound_Ah)))
!### The default for BACKSCATTER_UNDERBOUND should be false.
default=.false., do_not_log=.not.((CS%better_bound_Kh).and.(CS%better_bound_Ah)))

call get_param(param_file, mdl, "SMAG_BI_CONST",Smag_bi_const, &
"The nondimensional biharmonic Smagorinsky constant, "//&
Expand Down
4 changes: 2 additions & 2 deletions src/parameterizations/lateral/MOM_thickness_diffuse.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2275,12 +2275,12 @@ subroutine thickness_diffuse_init(Time, G, GV, US, param_file, diag, CDp, CS)
"MEKE_GM_SRC_ALT is true. Values below 20240601 recover the answers from the "//&
"original implementation, while higher values use expressions that satisfy "//&
"rotational symmetry.", &
default=20240101, do_not_log=.not.CS%GM_src_alt) ! ### Change default to default_answer_date.
default=default_answer_date, do_not_log=.not.CS%GM_src_alt)
call get_param(param_file, mdl, "MEKE_GM_SRC_ALT_SLOPE_BUG", CS%MEKE_src_slope_bug, &
"If true, use a bug that limits the positive values, but not the negative values, "//&
"of the slopes used when MEKE_GM_SRC_ALT is true. When this is true, it breaks "//&
"all of the symmetry rules that MOM6 is supposed to obey.", &
default=.true., do_not_log=.not.CS%GM_src_alt) ! ### Change default to False.
default=.false., do_not_log=.not.CS%GM_src_alt)

call get_param(param_file, mdl, "MEKE_GEOMETRIC", CS%MEKE_GEOMETRIC, &
"If true, uses the GM coefficient formulation from the GEOMETRIC "//&
Expand Down
2 changes: 1 addition & 1 deletion src/parameterizations/vertical/MOM_CVMix_KPP.F90
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ logical function KPP_init(paramFile, G, GV, US, diag, Time, CS, passive)
"The vintage of the order of arithmetic in the CVMix KPP calculations. Values "//&
"below 20240501 recover the answers from early in 2024, while higher values "//&
"use expressions that have been refactored for rotational symmetry.", &
default=20240101) !### Change to: default=default_answer_date)
default=default_answer_date)

call closeParameterBlock(paramFile)

Expand Down
3 changes: 1 addition & 2 deletions src/parameterizations/vertical/MOM_set_diffusivity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2399,8 +2399,7 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_
"calculations. Values below 20240630 recover the original answers, while "//&
"higher values use more accurate expressions. This only applies when "//&
"USE_LOTW_BBL_DIFFUSIVITY is true.", &
default=20190101, do_not_log=.not.CS%use_LOTW_BBL_diffusivity)
!### Set default as default=default_answer_date, or use SET_DIFF_ANSWER_DATE.
default=default_answer_date, do_not_log=.not.CS%use_LOTW_BBL_diffusivity)

CS%id_Kd_BBL = register_diag_field('ocean_model', 'Kd_BBL', diag%axesTi, Time, &
'Bottom Boundary Layer Diffusivity', 'm2 s-1', conversion=GV%HZ_T_to_m2_s)
Expand Down
2 changes: 1 addition & 1 deletion src/tracer/MOM_neutral_diffusion.F90
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ logical function neutral_diffusion_init(Time, G, GV, US, param_file, diag, EOS,
"Values of 20240330 or below recover the answers from the original form of the "//&
"neutral diffusion code, while higher values use mathematically equivalent "//&
"expressions that recover rotational symmetry.", &
default=20240101) !### Change this default later to default_answer_date.
default=default_answer_date)

! Initialize and configure remapping
if ( .not.CS%continuous_reconstruction ) then
Expand Down
2 changes: 1 addition & 1 deletion src/tracer/MOM_tracer_Z_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ subroutine determine_temperature(temp, salt, R_tgt, EOS, p_ref, niter, k_start,
"to determine when the iterations have converged when DETERMINE_TEMP_ADJUST_T_AND_S "//&
"is false. For realistic equations of state and the default values of the "//&
"various tolerances, this bug does not impact the solutions.", &
default=.true., do_not_log=just_read) !### Change the default to false.
default=.false., do_not_log=just_read)

call get_param(PF, mdl, "DETERMINE_TEMP_T_MIN", T_min, &
"The minimum temperature that can be found by determine_temperature.", &
Expand Down
5 changes: 2 additions & 3 deletions src/tracer/MOM_tracer_hor_diff.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1683,12 +1683,11 @@ subroutine tracer_hor_diff_init(Time, G, GV, US, param_file, diag, EOS, diabatic
"along-isopycnal mixed layer to interior mixing code, while higher values use "//&
"mathematically equivalent expressions that recover rotational symmetry "//&
"when DIFFUSE_ML_TO_INTERIOR is true.", &
default=20240101, do_not_log=.not.CS%Diffuse_ML_interior)
!### Change the default later to default_answer_date.
default=default_answer_date, do_not_log=.not.CS%Diffuse_ML_interior)
call get_param(param_file, mdl, "HOR_DIFF_LIMIT_BUG", CS%limit_bug, &
"If true and the answer date is 20240330 or below, use a rotational symmetry "//&
"breaking bug when limiting the tracer properties in tracer_epipycnal_ML_diff.", &
default=.true., do_not_log=((.not.CS%Diffuse_ML_interior).or.(CS%answer_date>=20240331)))
default=.false., do_not_log=((.not.CS%Diffuse_ML_interior).or.(CS%answer_date>=20240331)))
CS%ML_KhTR_scale = 1.0
if (CS%Diffuse_ML_interior) then
call get_param(param_file, mdl, "ML_KHTR_SCALE", CS%ML_KhTR_scale, &
Expand Down
2 changes: 1 addition & 1 deletion src/user/Idealized_Hurricane.F90
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ subroutine idealized_hurricane_wind_init(Time, G, US, param_file, CS)
"If true and IDL_HURR_SCM is true, use a bug that does all of the tapering and "//&
"inflow angle calculations for radii between RAD_EDGE and RAD_AMBIENT as though "//&
"they were at RAD_EDGE.", &
default=CS%SCM_mode, do_not_log=.not.CS%SCM_mode) !### Change the default to false.
default=.false., do_not_log=.not.CS%SCM_mode)
if (.not.CS%SCM_mode) CS%edge_taper_bug = .false.
call get_param(param_file, mdl, "IDL_HURR_SCM_LOCY", CS%dy_from_center, &
"Y distance of station used in the SCM idealized hurricane wind profile.", &
Expand Down
6 changes: 2 additions & 4 deletions src/user/MOM_wave_interface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,7 @@ subroutine MOM_wave_interface_init(time, G, GV, US, param_file, CS, diag)
"\t >= 20230101 - More robust expressions for Update_Stokes_Drift\n"//&
"\t >= 20230102 - More robust expressions for get_StokesSL_LiFoxKemper\n"//&
"\t >= 20230103 - More robust expressions for ust_2_u10_coare3p5", &
default=20221231, do_not_log=.not.GV%Boussinesq)
!### In due course change the default to default=default_answer_date)
default=default_answer_date, do_not_log=.not.GV%Boussinesq)
if (.not.GV%Boussinesq) CS%answer_date = max(CS%answer_date, 20230701)

! Langmuir number Options
Expand Down Expand Up @@ -539,8 +538,7 @@ subroutine MOM_wave_interface_init(time, G, GV, US, param_file, CS, diag)
call get_param(param_file, mdl, "LA_MISALIGNMENT_BUG", CS%LA_misalign_bug, &
"If true, use a code with a sign error when calculating the misalignment between "//&
"the shear and waves when LA_MISALIGNMENT is true.", &
default=CS%LA_Misalignment, do_not_log=.not.CS%LA_Misalignment)
!### Change the default for LA_MISALIGNMENT_BUG to .false.
default=.false., do_not_log=.not.CS%LA_Misalignment)
call get_param(param_file, mdl, "MIN_LANGMUIR", CS%La_min, &
"A minimum value for all Langmuir numbers that is not physical, "//&
"but is likely only encountered when the wind is very small and "//&
Expand Down

0 comments on commit 94d95c1

Please sign in to comment.