Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .testing/tc0/MOM_input
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,20 @@ FIX_UNSPLIT_DT_VISC_BUG = False ! [Boolean] default = False
USE_LAND_MASK_FOR_HVISC = False ! [Boolean] default = False
GUST_CONST = 0.02 ! [Pa] default = 0.02
FIX_USTAR_GUSTLESS_BUG = False ! [Boolean] default = False

! Explicitly use the defaults from late 2024
EQN_OF_STATE = "WRIGHT" ! default = "WRIGHT_FULL"
REGRIDDING_ANSWER_DATE = 20181231
TIDES_ANSWER_DATE = 20230630
WAVE_INTERFACE_ANSWER_DATE = 20221231
MEKE_GM_SRC_ANSWER_DATE = 20240101
NDIFF_ANSWER_DATE = 20240101
KPP%ANSWER_DATE = 20240101
HOR_DIFF_ANSWER_DATE = 20240101
LOTW_BBL_ANSWER_DATE = 20190101
MEKE_GM_SRC_ALT_SLOPE_BUG = True
HOR_DIFF_LIMIT_BUG = True
BACKSCATTER_UNDERBOUND = True
DETERMINE_TEMP_CONVERGENCE_BUG = True
LA_MISALIGNMENT_BUG = True
IDL_HURR_SCM_EDGE_TAPER_BUG = True
17 changes: 17 additions & 0 deletions .testing/tc1/MOM_input
Original file line number Diff line number Diff line change
Expand Up @@ -595,3 +595,20 @@ BULKML_CONV_MOMENTUM_BUG = True ! [Boolean] default = True
PEN_SW_ABSORB_MINTHICK = 0.001 ! [m] default = 0.001
GUST_CONST = 0.02 ! [Pa] default = 0.02
FIX_USTAR_GUSTLESS_BUG = False ! [Boolean] default = False

! Explicitly use the defaults from late 2024
EQN_OF_STATE = "WRIGHT" ! default = "WRIGHT_FULL"
REGRIDDING_ANSWER_DATE = 20181231
TIDES_ANSWER_DATE = 20230630
WAVE_INTERFACE_ANSWER_DATE = 20221231
MEKE_GM_SRC_ANSWER_DATE = 20240101
NDIFF_ANSWER_DATE = 20240101
KPP%ANSWER_DATE = 20240101
HOR_DIFF_ANSWER_DATE = 20240101
LOTW_BBL_ANSWER_DATE = 20190101
MEKE_GM_SRC_ALT_SLOPE_BUG = True
HOR_DIFF_LIMIT_BUG = True
BACKSCATTER_UNDERBOUND = True
DETERMINE_TEMP_CONVERGENCE_BUG = True
LA_MISALIGNMENT_BUG = True
IDL_HURR_SCM_EDGE_TAPER_BUG = True
17 changes: 17 additions & 0 deletions .testing/tc2/MOM_input
Original file line number Diff line number Diff line change
Expand Up @@ -627,3 +627,20 @@ USE_MLD_ITERATION = False ! [Boolean] default = False
PEN_SW_ABSORB_MINTHICK = 0.001 ! [m] default = 0.001
GUST_CONST = 0.02 ! [Pa] default = 0.02
FIX_USTAR_GUSTLESS_BUG = False ! [Boolean] default = False

! Explicitly use the defaults from late 2024
EQN_OF_STATE = "WRIGHT" ! default = "WRIGHT_FULL"
REGRIDDING_ANSWER_DATE = 20181231
TIDES_ANSWER_DATE = 20230630
WAVE_INTERFACE_ANSWER_DATE = 20221231
MEKE_GM_SRC_ANSWER_DATE = 20240101
NDIFF_ANSWER_DATE = 20240101
KPP%ANSWER_DATE = 20240101
HOR_DIFF_ANSWER_DATE = 20240101
LOTW_BBL_ANSWER_DATE = 20190101
MEKE_GM_SRC_ALT_SLOPE_BUG = True
HOR_DIFF_LIMIT_BUG = True
BACKSCATTER_UNDERBOUND = True
DETERMINE_TEMP_CONVERGENCE_BUG = True
LA_MISALIGNMENT_BUG = True
IDL_HURR_SCM_EDGE_TAPER_BUG = True
18 changes: 18 additions & 0 deletions .testing/tc3/MOM_input
Original file line number Diff line number Diff line change
Expand Up @@ -480,3 +480,21 @@ KAPPA_SHEAR_ITER_BUG = True ! [Boolean] default = True
KAPPA_SHEAR_ALL_LAYER_TKE_BUG = True ! [Boolean] default = True
GUST_CONST = 0.02 ! [Pa] default = 0.02
FIX_USTAR_GUSTLESS_BUG = False ! [Boolean] default = False


! Explicitly use the defaults from late 2024
EQN_OF_STATE = "WRIGHT" ! default = "WRIGHT_FULL"
REGRIDDING_ANSWER_DATE = 20181231
TIDES_ANSWER_DATE = 20230630
WAVE_INTERFACE_ANSWER_DATE = 20221231
MEKE_GM_SRC_ANSWER_DATE = 20240101
NDIFF_ANSWER_DATE = 20240101
KPP%ANSWER_DATE = 20240101
HOR_DIFF_ANSWER_DATE = 20240101
LOTW_BBL_ANSWER_DATE = 20190101
MEKE_GM_SRC_ALT_SLOPE_BUG = True
HOR_DIFF_LIMIT_BUG = True
BACKSCATTER_UNDERBOUND = True
DETERMINE_TEMP_CONVERGENCE_BUG = True
LA_MISALIGNMENT_BUG = True
IDL_HURR_SCM_EDGE_TAPER_BUG = True
17 changes: 17 additions & 0 deletions .testing/tc4/MOM_input
Original file line number Diff line number Diff line change
Expand Up @@ -417,3 +417,20 @@ KAPPA_SHEAR_ITER_BUG = True ! [Boolean] default = True
KAPPA_SHEAR_ALL_LAYER_TKE_BUG = True ! [Boolean] default = True
USE_MLD_ITERATION = False ! [Boolean] default = False


! Explicitly use the defaults from late 2024
REGRIDDING_ANSWER_DATE = 20181231
TIDES_ANSWER_DATE = 20230630
WAVE_INTERFACE_ANSWER_DATE = 20221231
MEKE_GM_SRC_ANSWER_DATE = 20240101
NDIFF_ANSWER_DATE = 20240101
KPP%ANSWER_DATE = 20240101
HOR_DIFF_ANSWER_DATE = 20240101
LOTW_BBL_ANSWER_DATE = 20190101
MEKE_GM_SRC_ALT_SLOPE_BUG = True
HOR_DIFF_LIMIT_BUG = True
BACKSCATTER_UNDERBOUND = True
DETERMINE_TEMP_CONVERGENCE_BUG = True
LA_MISALIGNMENT_BUG = True
IDL_HURR_SCM_EDGE_TAPER_BUG = True

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
9 changes: 6 additions & 3 deletions src/core/MOM_PressureForce_FV.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2076,16 +2076,19 @@ subroutine PressureForce_FV_init(Time, G, GV, US, param_file, diag, CS, ADp, SAL
default=enable_bugs)
call get_param(param_file, mdl, "TIDES", CS%tides, &
"If true, apply tidal momentum forcing.", default=.false.)
call get_param(param_file, '', "DEFAULT_ANSWER_DATE", default_answer_date, default=99991231)
if (CS%tides) &
if (CS%tides) then
call get_param(param_file, mdl, "DEFAULT_ANSWER_DATE", default_answer_date, &
"This sets the default value for the various _ANSWER_DATE parameters.", &
default=99991231)
call get_param(param_file, mdl, "TIDES_ANSWER_DATE", CS%tides_answer_date, "The vintage of "//&
"self-attraction and loading (SAL) and tidal forcing calculations. Setting "//&
"dates before 20230701 recovers old answers (Boussinesq and non-Boussinesq "//&
"modes) when SAL is part of the tidal forcing calculation. The answer "//&
"difference is only at bit level and due to a reordered summation. Setting "//&
"dates before 20250201 recovers answers (Boussinesq mode) that interface "//&
"heights are modified before pressure force integrals are calculated.", &
default=20230630, do_not_log=(.not.CS%tides))
default=default_answer_date, do_not_log=(.not.CS%tides))
endif
call get_param(param_file, mdl, "CALCULATE_SAL", CS%calculate_SAL, &
"If true, calculate self-attraction and loading.", default=CS%tides)
if (CS%calculate_SAL) &
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 @@ -179,7 +179,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 @@ -2584,8 +2584,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
8 changes: 2 additions & 6 deletions src/parameterizations/lateral/MOM_thickness_diffuse.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2193,8 +2193,6 @@ subroutine thickness_diffuse_init(Time, G, GV, US, param_file, diag, CDp, CS)
! as the vertical structure of thickness diffusivity.
! Used to determine if FULL_DEPTH_KHTH_MIN should be
! available.
logical :: enable_bugs ! If true, the defaults for recently added bug-fix flags are set to
! recreate the bugs, or if false bugs are only used if actively selected.
logical :: use_meke = .false. ! If true, use the MEKE formulation for the thickness diffusivity.
integer :: default_answer_date ! The default setting for the various ANSWER_DATE flags.
integer :: i, j
Expand Down Expand Up @@ -2355,14 +2353,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.
call get_param(param_file, mdl, "ENABLE_BUGS_BY_DEFAULT", enable_bugs, &
default=.true., do_not_log=.true.) ! This is logged from MOM.F90.
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=enable_bugs, do_not_log=.not.CS%GM_src_alt)
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 @@ -523,7 +523,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 @@ -2463,8 +2463,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)
call get_param(param_file, mdl, "DRAG_DIFFUSIVITY_ANSWER_DATE", CS%drag_diff_answer_date, &
"The vintage of the order of arithmetic in the drag diffusivity calculations. "//&
"Values above 20250301 use less confusing expressions to set the bottom-drag "//&
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
6 changes: 1 addition & 5 deletions src/tracer/MOM_tracer_Z_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,6 @@ subroutine determine_temperature(temp, salt, R_tgt, EOS, p_ref, niter, k_start,
character(len=40) :: mdl = "determine_temperature" ! This subroutine's name.
logical :: domore(SZK_(GV)) ! Records which layers need additional iterations
logical :: adjust_salt, fit_together, convergence_bug, do_any
logical :: enable_bugs ! If true, the defaults for recently added bug-fix flags are set to
! recreate the bugs, or if false bugs are only used if actively selected.
integer, dimension(2) :: EOSdom ! The i-computational domain for the equation of state
integer :: i, j, k, is, ie, js, je, nz, itt

Expand All @@ -633,14 +631,12 @@ subroutine determine_temperature(temp, salt, R_tgt, EOS, p_ref, niter, k_start,
"based on the ratio of the thermal and haline coefficients. Otherwise try to "//&
"match the density by only adjusting temperatures within a maximum range before "//&
"revising estimates of the salinity.", default=.false., do_not_log=just_read)
call get_param(PF, mdl, "ENABLE_BUGS_BY_DEFAULT", enable_bugs, &
default=.true., do_not_log=.true.) ! This is logged from MOM.F90.
call get_param(PF, mdl, "DETERMINE_TEMP_CONVERGENCE_BUG", convergence_bug, &
"If true, use layout-dependent tests on the changes in temperature and salinity "//&
"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=enable_bugs, do_not_log=just_read)
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
9 changes: 2 additions & 7 deletions src/tracer/MOM_tracer_hor_diff.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1641,8 +1641,6 @@ subroutine tracer_hor_diff_init(Time, G, GV, US, param_file, diag, EOS, diabatic
! This include declares and sets the variable "version".
# include "version_variable.h"
character(len=40) :: mdl = "MOM_tracer_hor_diff" ! This module's name.
logical :: enable_bugs ! If true, the defaults for recently added bug-fix flags are set to
! recreate the bugs, or if false bugs are only used if actively selected.
integer :: default_answer_date

if (associated(CS)) then
Expand Down Expand Up @@ -1718,14 +1716,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.
call get_param(param_file, mdl, "ENABLE_BUGS_BY_DEFAULT", enable_bugs, &
default=.true., do_not_log=.true.) ! This is logged from MOM.F90.
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=enable_bugs, 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
6 changes: 1 addition & 5 deletions src/user/Idealized_Hurricane.F90
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ subroutine idealized_hurricane_wind_init(Time, G, US, param_file, CS)
logical :: continuous_Cd ! If true, use a continuous form for the simple drag coefficient as a
! function of wind speed with the idealized hurricane. When this is false, the
! linear shape for the mid-range wind speeds is specified separately.
logical :: enable_bugs ! If true, the defaults for recently added bug-fix flags are set to
! recreate the bugs, or if false bugs are only used if actively selected.

! This include declares and sets the variable "version".
# include "version_variable.h"
Expand Down Expand Up @@ -240,13 +238,11 @@ subroutine idealized_hurricane_wind_init(Time, G, US, param_file, CS)
call get_param(param_file, mdl, "IDL_HURR_SCM", CS%SCM_mode, &
"Single Column mode switch used in the SCM idealized hurricane wind profile.", &
default=.false.)
call get_param(param_file, mdl, "ENABLE_BUGS_BY_DEFAULT", enable_bugs, &
default=.true., do_not_log=.true.) ! This is logged from MOM.F90.
call get_param(param_file, mdl, "IDL_HURR_SCM_EDGE_TAPER_BUG", CS%edge_taper_bug, &
"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.and.enable_bugs, do_not_log=.not.CS%SCM_mode)
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
9 changes: 2 additions & 7 deletions src/user/MOM_wave_interface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,6 @@ subroutine MOM_wave_interface_init(time, G, GV, US, param_file, CS, diag)
character*(7), parameter :: COUPLER_STRING = "COUPLER"
character*(5), parameter :: INPUT_STRING = "INPUT"
integer :: default_answer_date ! The default setting for the various ANSWER_DATE flags
logical :: enable_bugs ! If true, the defaults for recently added bug-fix flags are set to
! recreate the bugs, or if false bugs are only used if actively selected.
logical :: use_waves
logical :: StatisticalWaves

Expand Down Expand Up @@ -337,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 @@ -538,12 +535,10 @@ subroutine MOM_wave_interface_init(time, G, GV, US, param_file, CS, diag)
call get_param(param_file, mdl, "LA_MISALIGNMENT", CS%LA_Misalignment, &
"Flag (logical) if using misalignment between shear and waves in LA", &
default=.false.)
call get_param(param_file, mdl, "ENABLE_BUGS_BY_DEFAULT", enable_bugs, &
default=.true., do_not_log=.true.) ! This is logged from MOM.F90.
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.and.enable_bugs, do_not_log=.not.CS%LA_Misalignment)
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
Loading