Smallest n_inner >= 1 with dt_outer/n_inner <= dt_bt_safe,
for an ALREADY-LIMITED safe barotropic substep dt_bt_safe (s) —
the per-wet-cell minimum bt_cfl_dt_wet returns, reduced across
ranks. bt_auto_n_inner is this with dt_bt_safe formed from a
single (c_ext, l_cfl) pair.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | dt_outer |
Outer (baroclinic) step (s). |
||
| real(kind=wp), | intent(in) | :: | dt_bt_safe |
Largest stable barotropic substep, safety factor included (s). |
pure function bt_auto_n_inner_from_dt(dt_outer, dt_bt_safe) result(n_inner) !! Smallest `n_inner >= 1` with `dt_outer/n_inner <= dt_bt_safe`, !! for an ALREADY-LIMITED safe barotropic substep `dt_bt_safe` (s) — !! the per-wet-cell minimum `bt_cfl_dt_wet` returns, reduced across !! ranks. `bt_auto_n_inner` is this with `dt_bt_safe` formed from a !! single `(c_ext, l_cfl)` pair. real(wp), intent(in) :: dt_outer !! Outer (baroclinic) step (s). real(wp), intent(in) :: dt_bt_safe !! Largest stable barotropic substep, safety factor included (s). integer :: n_inner n_inner = max(1, ceiling(dt_outer/dt_bt_safe)) end function bt_auto_n_inner_from_dt