@@ -675,6 +675,7 @@ subroutine step_MOM(forces_in, fluxes_in, sfc_state, Time_start, time_int_in, CS
675
675
if (do_dyn) then
676
676
n_max = 1
677
677
if (time_interval > CS% dt) n_max = ceiling (time_interval/ CS% dt - 0.001 )
678
+ ntstep = 1 ! initialization
678
679
dt = time_interval / real (n_max)
679
680
thermo_does_span_coupling = (CS% thermo_spans_coupling .and. &
680
681
(CS% dt_therm > 1.5 * cycle_time))
@@ -966,10 +967,9 @@ subroutine step_MOM(forces_in, fluxes_in, sfc_state, Time_start, time_int_in, CS
966
967
967
968
! ===========================================================================
968
969
! This is the start of the tracer advection part of the algorithm.
969
- do_advection = .false.
970
970
if (tradv_does_span_coupling .or. .not. do_thermo) then
971
- do_advection = (CS% t_dyn_rel_adv + 0.5 * dt > dt_tr_adv)
972
- if (CS% t_dyn_rel_thermo + 0.5 * dt > dt_therm) do_advection = .true.
971
+ do_advection = (( CS% t_dyn_rel_adv + 0.5 * dt > dt_tr_adv) .or. &
972
+ (CS% t_dyn_rel_thermo + 0.5 * dt > dt_therm))
973
973
else
974
974
do_advection = ((MOD (n,ntastep) == 0 ) .or. (n== n_max))
975
975
endif
@@ -984,15 +984,12 @@ subroutine step_MOM(forces_in, fluxes_in, sfc_state, Time_start, time_int_in, CS
984
984
985
985
! ===========================================================================
986
986
! This is the second place where the diabatic processes and remapping could occur.
987
- if (do_thermo) then
988
- do_diabatic = .false.
989
- if (thermo_does_span_coupling .or. .not. do_dyn) then
990
- do_diabatic = (CS% t_dyn_rel_thermo + 0.5 * dt > dt_therm)
991
- else
992
- do_diabatic = ((MOD (n,ntstep) == 0 ) .or. (n== n_max))
993
- endif
987
+ if (thermo_does_span_coupling .or. .not. do_dyn) then
988
+ do_diabatic = (do_thermo .and. (CS% t_dyn_rel_thermo + 0.5 * dt > dt_therm))
989
+ else
990
+ do_diabatic = (do_thermo .and. ((MOD (n,ntstep) == 0 ) .or. (n== n_max)))
994
991
endif
995
- if ((CS% t_dyn_rel_adv== 0.0 ) .and. do_thermo .and. (.not. CS% diabatic_first) .and. do_diabatic) then
992
+ if ((CS% t_dyn_rel_adv== 0.0 ) .and. (.not. CS% diabatic_first) .and. do_diabatic) then
996
993
997
994
dtdia = CS% t_dyn_rel_thermo
998
995
! If the MOM6 dynamic and thermodynamic time stepping is being orchestrated
0 commit comments