Smallest barotropic substep count n_inner such that the substep
dt_outer/n_inner satisfies the 2-D external-gravity-wave CFL:
dt_bt <= cfl_safety * l_cfl / c_ext,
with l_cfl the 2-D CFL length (metrics_bt_cfl_length) and c_ext
the external wave speed sqrt(g*H_max). MOM6 set_dtbt analogue, now
with the cross-direction term included (the legacy estimate used a
1-D length and under-counted n_inner by ~sqrt(2) on square cells,
leaving the effective 2-D CFL at ~0.92 for cfl_bt_safety=0.65 — on the
edge of the forward-backward scheme’s stability).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | dt_outer | |||
| real(kind=wp), | intent(in) | :: | cfl_safety | |||
| real(kind=wp), | intent(in) | :: | c_ext | |||
| real(kind=wp), | intent(in) | :: | l_cfl |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | private | :: | dt_bt_safe |
pure function bt_auto_n_inner(dt_outer, cfl_safety, c_ext, l_cfl) result(n_inner) !! Smallest barotropic substep count `n_inner` such that the substep !! `dt_outer/n_inner` satisfies the 2-D external-gravity-wave CFL: !! dt_bt <= cfl_safety * l_cfl / c_ext, !! with `l_cfl` the 2-D CFL length (`metrics_bt_cfl_length`) and `c_ext` !! the external wave speed `sqrt(g*H_max)`. MOM6 set_dtbt analogue, now !! with the cross-direction term included (the legacy estimate used a !! 1-D length and under-counted n_inner by ~sqrt(2) on square cells, !! leaving the effective 2-D CFL at ~0.92 for cfl_bt_safety=0.65 — on the !! edge of the forward-backward scheme's stability). real(wp), intent(in) :: dt_outer, cfl_safety, c_ext, l_cfl integer :: n_inner real(wp) :: dt_bt_safe dt_bt_safe = cfl_safety*l_cfl/c_ext n_inner = bt_auto_n_inner_from_dt(dt_outer, dt_bt_safe) end function bt_auto_n_inner