Skip to content

Commit 921a17c

Browse files
committed
Disable adjustment of BT mass source in RK2b corrector (#6)
Adds analogous code to MOM_dynamics_split_RK2b.F90 that is identical to the code that was added to MOM_dynamics_split_RK2.F90 to avoid readjusting the barotropic mass source to try to reconcile the baroclinic and barotropic sea surface heights. By default all answers are bitwise identical, but the runtime parameter BT_ADJ_CORR_MASS_SRC will not appear in the MOM_parameter_doc files for cases with SPLIT_RK2B set to True.
1 parent b8c807b commit 921a17c

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/core/MOM_dynamics_split_RK2b.F90

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ module MOM_dynamics_split_RK2b
154154
!! effective summed open face areas as a function
155155
!! of barotropic flow.
156156

157+
logical :: BT_adj_corr_mass_src !< If true, recalculates the barotropic mass source after
158+
!! predictor step. This should make little difference in the
159+
!! deep ocean but appears to help for vanished layers.
157160
logical :: split_bottom_stress !< If true, provide the bottom stress
158161
!! calculated by the vertical viscosity to the
159162
!! barotropic solver.
@@ -811,9 +814,11 @@ subroutine step_MOM_dyn_split_RK2b(u_av, v_av, h, tv, visc, Time_local, dt, forc
811814
! used in the next call to btstep. This call is at this point so that
812815
! hp can be changed if CS%begw /= 0.
813816
! eta_cor = ... (hidden inside CS%barotropic_CSp)
814-
call cpu_clock_begin(id_clock_btcalc)
815-
call bt_mass_source(hp, eta_pred, .false., G, GV, CS%barotropic_CSp)
816-
call cpu_clock_end(id_clock_btcalc)
817+
if (CS%BT_adj_corr_mass_src) then
818+
call cpu_clock_begin(id_clock_btcalc)
819+
call bt_mass_source(hp, eta_pred, .false., G, GV, CS%barotropic_CSp)
820+
call cpu_clock_end(id_clock_btcalc)
821+
endif
817822

818823
if (CS%begw /= 0.0) then
819824
! hp <- (1-begw)*h_in + begw*hp
@@ -1350,6 +1355,11 @@ subroutine initialize_dyn_split_RK2b(u, v, h, tv, uh, vh, eta, Time, G, GV, US,
13501355
call get_param(param_file, mdl, "SPLIT_BOTTOM_STRESS", CS%split_bottom_stress, &
13511356
"If true, provide the bottom stress calculated by the "//&
13521357
"vertical viscosity to the barotropic solver.", default=.false.)
1358+
call get_param(param_file, mdl, "BT_ADJ_CORR_MASS_SRC", CS%BT_adj_corr_mass_src, &
1359+
"If true, recalculates the barotropic mass source after "//&
1360+
"predictor step. This should make little difference in the "//&
1361+
"deep ocean but appears to help for vanished layers. If false, "//&
1362+
"uses the same mass source as from the predictor step.", default=.true.)
13531363
! call get_param(param_file, mdl, "FPMIX", CS%fpmix, &
13541364
! "If true, apply profiles of momentum flux magnitude and direction.", &
13551365
! default=.false.)

0 commit comments

Comments
 (0)