nu_h*dt/dx_min^2 — the single-axis viscous-diffusion stability
number checked against VISCOUS_CFL_LIMIT. dx_min MUST be the
smallest actual cell edge in the domain (e.g.
metrics_dx_min/ocean_stability_min_cell), never a nominal
&grid_nml dx/dy (degrees on non-Cartesian grids). dx_min<=0
(degenerate/unset grid) returns 0 (no constraint expressible).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | nu_h | |||
| real(kind=wp), | intent(in) | :: | dt | |||
| real(kind=wp), | intent(in) | :: | dx_min |
pure function ocean_viscous_cfl_number(nu_h, dt, dx_min) result(cfl) !! `nu_h*dt/dx_min^2` — the single-axis viscous-diffusion stability !! number checked against `VISCOUS_CFL_LIMIT`. `dx_min` MUST be the !! smallest actual cell edge in the domain (e.g. !! `metrics_dx_min`/`ocean_stability_min_cell`), never a nominal !! `&grid_nml dx`/`dy` (degrees on non-Cartesian grids). `dx_min<=0` !! (degenerate/unset grid) returns 0 (no constraint expressible). real(wp), intent(in) :: nu_h, dt, dx_min real(wp) :: cfl if (dx_min > 0.0_wp) then cfl = nu_h*dt/dx_min**2 else cfl = 0.0_wp end if end function ocean_viscous_cfl_number