Two-axis explicit forward-Euler diffusive number
kappa_h*dt_therm*(1/dx_min^2+1/dy_min^2), conservatively
evaluated at the SAME worst-case dx_min on both axes (matches
the “use the minimum cell” instruction; exact on an isotropic
worst cell, strictly more conservative than using the true
per-axis pair). dx_min<=0 returns 0.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | kappa_h | |||
| real(kind=wp), | intent(in) | :: | dt_therm | |||
| real(kind=wp), | intent(in) | :: | dx_min |
pure function ocean_diffusive_number(kappa_h, dt_therm, dx_min) result(dnum) !! Two-axis explicit forward-Euler diffusive number !! `kappa_h*dt_therm*(1/dx_min^2+1/dy_min^2)`, conservatively !! evaluated at the SAME worst-case `dx_min` on both axes (matches !! the "use the minimum cell" instruction; exact on an isotropic !! worst cell, strictly more conservative than using the true !! per-axis pair). `dx_min<=0` returns 0. real(wp), intent(in) :: kappa_h, dt_therm, dx_min real(wp) :: dnum if (dx_min > 0.0_wp) then dnum = kappa_h*dt_therm*(2.0_wp/dx_min**2) else dnum = 0.0_wp end if end function ocean_diffusive_number