MOM6 fac_fn: the WENO-Z nonlinear factor (1+tau/b)^2, EXACT-clamped
(not an additive epsilon) to a dominant value when the smoothness
indicator b is degenerate (|b| <= eps*tau), so a locally constant
stencil takes over without a 0/0. Shared by weno3/5/7.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | tau | |||
| real(kind=wp), | intent(in) | :: | b |
pure function fac_weno(tau, b) result(fac) !! MOM6 `fac_fn`: the WENO-Z nonlinear factor `(1+tau/b)^2`, EXACT-clamped !! (not an additive epsilon) to a dominant value when the smoothness !! indicator `b` is degenerate (`|b| <= eps*tau`), so a locally constant !! stencil takes over without a 0/0. Shared by weno3/5/7. !$acc routine seq real(wp), intent(in) :: tau, b real(wp) :: fac if (abs(b) > PV_WENO_EPS_REL*tau) then fac = (1.0_wp + tau/b)**2 else fac = PV_WENO_FAC_DEGEN end if end function fac_weno