Largest nu_h (m^2/s) that keeps ocean_viscous_cfl_number at
or below limit, at fixed dt/dx_min — the “reduce nu_h
below …” half of the audit’s suggested fix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | dt | |||
| real(kind=wp), | intent(in) | :: | dx_min | |||
| real(kind=wp), | intent(in) | :: | limit |
pure function ocean_viscous_cfl_max_nu_h(dt, dx_min, limit) result(nu_h_max) !! Largest `nu_h` (m^2/s) that keeps `ocean_viscous_cfl_number` at !! or below `limit`, at fixed `dt`/`dx_min` — the "reduce nu_h !! below ..." half of the audit's suggested fix. real(wp), intent(in) :: dt, dx_min, limit real(wp) :: nu_h_max if (dt > 0.0_wp) then nu_h_max = limit*dx_min**2/dt else nu_h_max = 0.0_wp end if end function ocean_viscous_cfl_max_nu_h