Returns .true. when the windowed horizontal tracer-advect drain
should fire on the current outer step, evaluated with the
PRE-increment outer_step_count so it aligns bit-for-bit with
is_thermo_step() (which gates the ALE remap on the same count).
Cadence reasoning: at outer_step_count = 0 the IC-aligned first
window has not accumulated yet, so the drain must NOT fire then.
It fires when mod(outer_step_count, ratio) == 0 .and.
outer_step_count > 0 — i.e. exactly ratio accumulate-steps have
completed since the last reset. Because the config constraint
forces dt_therm_ratio to be an integer multiple of
dt_tracer_advect_ratio, every thermo step (where ALE fires) is
also a tracer-advect step, so the drain always precedes the ALE
remap and no accumulation window is ever cut by a remap.
ratio <= 1 ⇒ never (the every-step bypass owns that case).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_dyn_t), | intent(in) | :: | this |
pure function ocean_dyn_is_tracer_advect_step(this) result(yes) !! Returns `.true.` when the windowed horizontal tracer-advect drain !! should fire on the current outer step, evaluated with the !! PRE-increment `outer_step_count` so it aligns bit-for-bit with !! `is_thermo_step()` (which gates the ALE remap on the same count). !! !! Cadence reasoning: at `outer_step_count = 0` the IC-aligned first !! window has not accumulated yet, so the drain must NOT fire then. !! It fires when `mod(outer_step_count, ratio) == 0 .and. !! outer_step_count > 0` — i.e. exactly `ratio` accumulate-steps have !! completed since the last reset. Because the config constraint !! forces `dt_therm_ratio` to be an integer multiple of !! `dt_tracer_advect_ratio`, every thermo step (where ALE fires) is !! also a tracer-advect step, so the drain always precedes the ALE !! remap and no accumulation window is ever cut by a remap. !! `ratio <= 1` ⇒ never (the every-step bypass owns that case). class(ocean_dyn_t), intent(in) :: this logical :: yes if (this%dt_tracer_advect_ratio <= 1) then yes = .false. else yes = (this%outer_step_count > 0) .and. & (mod(this%outer_step_count, this%dt_tracer_advect_ratio) == 0) end if end function ocean_dyn_is_tracer_advect_step