Configure-time validity of the (dt_therm_ratio,
dt_tracer_advect_ratio) pair. Both must be >= 1 and
dt_therm_ratio must be an integer multiple of
dt_tracer_advect_ratio so the ALE remap (which fires at the
DT_THERM cadence) never lands inside an open tracer-flux
accumulation window. The setup layer (configure_ocean_vmix)
calls this and error stops with a descriptive message on
.false.; exposed as a pure predicate so the validation logic
is unit-testable without constructing a full ocean state.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | dt_therm_ratio | |||
| integer, | intent(in) | :: | dt_tracer_advect_ratio |
pure function ocean_dt_tracer_advect_ratios_ok(dt_therm_ratio, & dt_tracer_advect_ratio) result(ok) !! Configure-time validity of the (`dt_therm_ratio`, !! `dt_tracer_advect_ratio`) pair. Both must be >= 1 and !! `dt_therm_ratio` must be an integer multiple of !! `dt_tracer_advect_ratio` so the ALE remap (which fires at the !! DT_THERM cadence) never lands inside an open tracer-flux !! accumulation window. The setup layer (`configure_ocean_vmix`) !! calls this and `error stop`s with a descriptive message on !! `.false.`; exposed as a pure predicate so the validation logic !! is unit-testable without constructing a full ocean state. integer, intent(in) :: dt_therm_ratio integer, intent(in) :: dt_tracer_advect_ratio logical :: ok ok = .true. if (dt_tracer_advect_ratio < 1) ok = .false. if (dt_therm_ratio < 1) ok = .false. if (ok) then if (mod(dt_therm_ratio, dt_tracer_advect_ratio) /= 0) ok = .false. end if end function ocean_dt_tracer_advect_ratios_ok