Skip to content

Commit 56a772c

Browse files
authored
Merge pull request mom-ocean#1670 from Hallberg-NOAA/update_param_defaults_2025
+*Update parameter defaults for 2024 and 2025, including EQN_OF_STATE
2 parents b18bca2 + c5bb2bc commit 56a772c

31 files changed

+190
-368
lines changed

.testing/tc0/MOM_input

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ DIAG_AS_CHKSUM = True
235235
DEBUG = True
236236
GRID_ROTATION_ANGLE_BUGS = True ! [Boolean] default = True
237237
USE_GM_WORK_BUG = True ! [Boolean] default = True
238-
FIX_UNSPLIT_DT_VISC_BUG = False ! [Boolean] default = False
239238
USE_LAND_MASK_FOR_HVISC = False ! [Boolean] default = False
240239
GUST_CONST = 0.02 ! [Pa] default = 0.02
241240
FIX_USTAR_GUSTLESS_BUG = False ! [Boolean] default = False
241+

.testing/tc1.a/MOM_tc_variant

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#override SPLIT=False
2-
#override FIX_UNSPLIT_DT_VISC_BUG = False ! [Boolean] default = False
2+
#override UNSPLIT_DT_VISC_BUG = True ! [Boolean] default = False

.testing/tc1.b/MOM_tc_variant

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#override SPLIT=False
22
#override USE_RK2=True
3-
#override FIX_UNSPLIT_DT_VISC_BUG = False ! [Boolean] default = False
3+
#override UNSPLIT_DT_VISC_BUG = True ! [Boolean] default = False

.testing/tc1/MOM_input

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,3 +595,17 @@ BULKML_CONV_MOMENTUM_BUG = True ! [Boolean] default = True
595595
PEN_SW_ABSORB_MINTHICK = 0.001 ! [m] default = 0.001
596596
GUST_CONST = 0.02 ! [Pa] default = 0.02
597597
FIX_USTAR_GUSTLESS_BUG = False ! [Boolean] default = False
598+
599+
600+
! Explicitly use the defaults from late 2024
601+
EQN_OF_STATE = "WRIGHT" ! default = "WRIGHT_FULL"
602+
HOR_DIFF_ANSWER_DATE = 20240101
603+
HOR_DIFF_LIMIT_BUG = True
604+
605+
! Explicitly use the defaults from early 2025
606+
VISC_REM_BUG = True
607+
DRAG_DIFFUSIVITY_ANSWER_DATE = 20250101
608+
FRICTWORK_BUG = True
609+
HOR_DIFF_ANSWER_DATE = 20240101
610+
HOR_DIFF_LIMIT_BUG = True
611+
MASS_WEIGHT_IN_PRESSURE_GRADIENT_TOP = False

.testing/tc2/MOM_input

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,3 +627,16 @@ USE_MLD_ITERATION = False ! [Boolean] default = False
627627
PEN_SW_ABSORB_MINTHICK = 0.001 ! [m] default = 0.001
628628
GUST_CONST = 0.02 ! [Pa] default = 0.02
629629
FIX_USTAR_GUSTLESS_BUG = False ! [Boolean] default = False
630+
631+
! Explicitly use the defaults from late 2024
632+
EQN_OF_STATE = "WRIGHT" ! default = "WRIGHT_FULL"
633+
TIDES_ANSWER_DATE = 20230630
634+
NDIFF_ANSWER_DATE = 20240101
635+
BACKSCATTER_UNDERBOUND = True
636+
637+
! Explicitly use the defaults from early 2025
638+
VISC_REM_BUG = True
639+
DRAG_DIFFUSIVITY_ANSWER_DATE = 20250101
640+
FRICTWORK_BUG = True
641+
NDIFF_ANSWER_DATE = 20240101
642+
MASS_WEIGHT_IN_PRESSURE_GRADIENT_TOP = False

.testing/tc3/MOM_input

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,3 +480,8 @@ KAPPA_SHEAR_ITER_BUG = True ! [Boolean] default = True
480480
KAPPA_SHEAR_ALL_LAYER_TKE_BUG = True ! [Boolean] default = True
481481
GUST_CONST = 0.02 ! [Pa] default = 0.02
482482
FIX_USTAR_GUSTLESS_BUG = False ! [Boolean] default = False
483+
484+
! Explicitly use the defaults from early 2025
485+
VISC_REM_BUG = True
486+
DRAG_DIFFUSIVITY_ANSWER_DATE = 20250101
487+
FRICTWORK_BUG = True

.testing/tc4/MOM_input

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,12 @@ DEBUG = True
411411

412412
INTERPOLATE_RES_FN = True ! [Boolean] default = True
413413
GILL_EQUATORIAL_LD = False ! [Boolean] default = False
414-
FIX_UNSPLIT_DT_VISC_BUG = False ! [Boolean] default = False
415414
USE_LAND_MASK_FOR_HVISC = False ! [Boolean] default = False
416415
KAPPA_SHEAR_ITER_BUG = True ! [Boolean] default = True
417416
KAPPA_SHEAR_ALL_LAYER_TKE_BUG = True ! [Boolean] default = True
418417
USE_MLD_ITERATION = False ! [Boolean] default = False
419418

419+
! Explicitly use the defaults from early 2025
420+
VISC_REM_BUG = True
421+
FRICTWORK_BUG = True
422+
MASS_WEIGHT_IN_PRESSURE_GRADIENT_TOP = False

config_src/external/GFDL_ocean_BGC/MOM_generic_tracer.F90

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module MOM_generic_tracer
1616
! ### These imports should not reach into FMS directly ###
1717

1818
use MOM_ALE_sponge, only : ALE_sponge_CS
19-
use MOM_coms, only : EFP_type
19+
use MOM_coms, only : EFP_type, real_to_EFP
2020
use MOM_diag_mediator, only : diag_ctrl
2121
use MOM_error_handler, only : MOM_error, FATAL
2222
use MOM_file_parser, only : param_file_type
@@ -195,8 +195,14 @@ function MOM_generic_tracer_stock(h, stocks, G, GV, CS, names, units, stock_inde
195195
integer :: MOM_generic_tracer_stock !< Return value, the
196196
!! number of stocks calculated here.
197197

198+
integer :: m
198199
MOM_generic_tracer_stock = 0
199200

201+
! These should never be used, but they are set to avoid compile-time warnings
202+
do m=1,size(names) ; names(m) = "" ; enddo
203+
do m=1,size(units) ; units(m) = "" ; enddo
204+
do m=1,size(stocks) ; stocks(m) = real_to_EFP(0.0) ; enddo
205+
200206
end function MOM_generic_tracer_stock
201207

202208
!> This subroutine finds the global min and max of either of all available
@@ -227,8 +233,24 @@ function MOM_generic_tracer_min_max(ind_start, got_minmax, gmin, gmax, G, CS, na
227233
integer :: MOM_generic_tracer_min_max !< Return value, the
228234
!! number of tracers done here.
229235

236+
integer :: m
237+
230238
MOM_generic_tracer_min_max = 0
231239

240+
! These should never be used, but they are set to avoid compile-time warnings. Note that the minimum values
241+
! are delibarately set to be larger than the maximum values.
242+
got_minmax(:) = .false.
243+
gmax(:) = -huge(gmax)
244+
gmin(:) = huge(gmin)
245+
do m=1,size(names) ; names(m) = "" ; enddo
246+
do m=1,size(units) ; units(m) = "" ; enddo
247+
if (present(xgmin)) xgmin(:) = 0.0
248+
if (present(ygmin)) ygmin(:) = 0.0
249+
if (present(zgmin)) zgmin(:) = 0.0
250+
if (present(xgmax)) xgmax(:) = 0.0
251+
if (present(ygmax)) ygmax(:) = 0.0
252+
if (present(zgmax)) zgmax(:) = 0.0
253+
232254
end function MOM_generic_tracer_min_max
233255

234256
!> This subroutine calculates the surface state and sets coupler values for
@@ -271,6 +293,8 @@ subroutine MOM_generic_tracer_get(name,member,array, CS)
271293
! arbitrary units [A]
272294
character(len=128), parameter :: sub_name = 'MOM_generic_tracer_get'
273295

296+
array(:,:,:) = huge(array)
297+
274298
end subroutine MOM_generic_tracer_get
275299

276300
!> This subroutine deallocates the memory owned by this module.

src/ALE/MOM_regridding.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ subroutine initialize_regridding(CS, GV, US, max_depth, param_file, mdl, coord_m
313313
"Values below 20190101 result in the use of older, less accurate expressions "//&
314314
"that were in use at the end of 2018. Higher values result in the use of more "//&
315315
"robust and accurate forms of mathematically equivalent expressions.", &
316-
default=20181231, do_not_log=.not.GV%Boussinesq) ! ### change to default=default_answer_date)
316+
default=default_answer_date, do_not_log=.not.GV%Boussinesq)
317317
if (.not.GV%Boussinesq) regrid_answer_date = max(regrid_answer_date, 20230701)
318318
call set_regrid_params(CS, regrid_answer_date=regrid_answer_date)
319319
endif

src/core/MOM.F90

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,6 @@ module MOM
314314
logical :: useMEKE !< If true, call the MEKE parameterization.
315315
logical :: use_stochastic_EOS !< If true, use the stochastic EOS parameterizations.
316316
logical :: useWaves !< If true, update Stokes drift
317-
logical :: use_diabatic_time_bug !< If true, uses the wrong calendar time for diabatic processes,
318-
!! as was done in MOM6 versions prior to February 2018.
319317
real :: dtbt_reset_period !< The time interval between dynamic recalculation of the
320318
!! barotropic time step [T ~> s]. If this is negative dtbt is never
321319
!! calculated, and if it is 0, dtbt is calculated every step.
@@ -840,15 +838,9 @@ subroutine step_MOM(forces_in, fluxes_in, sfc_state, Time_start, time_int_in, CS
840838

841839
rel_time = 0.0
842840
do n=1,n_max
843-
if (CS%use_diabatic_time_bug) then
844-
! This wrong form of update was used until Feb 2018, recovered with CS%use_diabatic_time_bug=T.
845-
CS%Time = Time_start + real_to_time(US%T_to_s*int(floor(rel_time+0.5*dt+0.5)))
846-
rel_time = rel_time + dt
847-
else
848-
rel_time = rel_time + dt ! The relative time at the end of the step.
849-
! Set the universally visible time to the middle of the time step.
850-
CS%Time = Time_start + real_to_time(US%T_to_s*(rel_time - 0.5*dt))
851-
endif
841+
rel_time = rel_time + dt ! The relative time at the end of the step.
842+
! Set the universally visible time to the middle of the time step.
843+
CS%Time = Time_start + real_to_time(US%T_to_s*(rel_time - 0.5*dt))
852844
! Set the local time to the end of the time step.
853845
Time_local = Time_start + real_to_time(US%T_to_s*rel_time)
854846

@@ -878,16 +870,12 @@ subroutine step_MOM(forces_in, fluxes_in, sfc_state, Time_start, time_int_in, CS
878870
endif
879871

880872
end_time_thermo = Time_local
881-
if (dtdia > dt .and. .not. CS%use_diabatic_time_bug) then
873+
if (dtdia > dt) then
882874
! If necessary, temporarily reset CS%Time to the center of the period covered
883875
! by the call to step_MOM_thermo, noting that they begin at the same time.
884-
! This step was missing prior to Feb 2018, and is skipped with CS%use_diabatic_time_bug=T.
885876
CS%Time = CS%Time + real_to_time(0.5*US%T_to_s*(dtdia-dt))
886-
endif
887-
if (dtdia > dt .or. CS%use_diabatic_time_bug) then
888877
! The end-time of the diagnostic interval needs to be set ahead if there
889878
! are multiple dynamic time steps worth of thermodynamics applied here.
890-
! This line was not conditional prior to Feb 2018, recovered with CS%use_diabatic_time_bug=T.
891879
end_time_thermo = Time_local + real_to_time(US%T_to_s*(dtdia-dt))
892880
endif
893881

@@ -903,8 +891,7 @@ subroutine step_MOM(forces_in, fluxes_in, sfc_state, Time_start, time_int_in, CS
903891
CS%t_dyn_rel_thermo = -dtdia
904892
if (showCallTree) call callTree_waypoint("finished diabatic_first (step_MOM)")
905893

906-
if (dtdia > dt .and. .not. CS%use_diabatic_time_bug) & ! Reset CS%Time to its previous value.
907-
! This step was missing prior to Feb 2018, recovered with CS%use_diabatic_time_bug=T.
894+
if (dtdia > dt) & ! Reset CS%Time to its previous value.
908895
CS%Time = Time_start + real_to_time(US%T_to_s*(rel_time - 0.5*dt))
909896
endif ! end of block "(CS%diabatic_first .and. (CS%t_dyn_rel_adv==0.0))"
910897

@@ -1004,8 +991,7 @@ subroutine step_MOM(forces_in, fluxes_in, sfc_state, Time_start, time_int_in, CS
1004991

1005992
! If necessary, temporarily reset CS%Time to the center of the period covered
1006993
! by the call to step_MOM_thermo, noting that they end at the same time.
1007-
! This step was missing prior to Feb 2018, and is skipped with CS%use_diabatic_time_bug=T.
1008-
if (dtdia > dt .and. .not. CS%use_diabatic_time_bug) &
994+
if (dtdia > dt) &
1009995
CS%Time = CS%Time - real_to_time(0.5*US%T_to_s*(dtdia-dt))
1010996

1011997
! Apply diabatic forcing, do mixing, and regrid.
@@ -1024,8 +1010,7 @@ subroutine step_MOM(forces_in, fluxes_in, sfc_state, Time_start, time_int_in, CS
10241010
endif
10251011

10261012
! Reset CS%Time to its previous value.
1027-
! This step was missing prior to Feb 2018, and is skipped with CS%use_diabatic_time_bug=T.
1028-
if (dtdia > dt .and. .not. CS%use_diabatic_time_bug) &
1013+
if (dtdia > dt) &
10291014
CS%Time = Time_start + real_to_time(US%T_to_s*(rel_time - 0.5*dt))
10301015
endif
10311016

@@ -2733,11 +2718,6 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, &
27332718
default=default_answer_date, do_not_log=non_Bous)
27342719
if (non_Bous) CS%answer_date = 99991231
27352720

2736-
call get_param(param_file, "MOM", "USE_DIABATIC_TIME_BUG", CS%use_diabatic_time_bug, &
2737-
"If true, uses the wrong calendar time for diabatic processes, as was "//&
2738-
"done in MOM6 versions prior to February 2018. This is not recommended.", &
2739-
default=.false.)
2740-
27412721
call get_param(param_file, "MOM", "SAVE_INITIAL_CONDS", save_IC, &
27422722
"If true, write the initial conditions to a file given "//&
27432723
"by IC_OUTPUT_FILE.", default=.false.)

0 commit comments

Comments
 (0)