Resolve the &ocean_cavity_melt_nml gamma_s “unset” sentinel to
the ISOMIP+ default gamma_t/CAVITY_GAMMA_RATIO_ISOMIP
(Asay-Davis et al. (2016) Table 4 p. 2483; the 35 is Jenkins,
Nicholls & Corr (2010) p. 2309).
A NEGATIVE gamma_s means “not set by the user”; zero and
positive values are taken literally — zero is then refused as a
range error by validate_config rather than silently
re-triggering the default, because the three-equation form
divides by gamma_s.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | gamma_s |
The raw knob; negative = unset sentinel. |
||
| real(kind=wp), | intent(in) | :: | gamma_t |
Heat-transfer coefficient the default is a fraction of. |
pure function cavity_resolve_gamma_s(gamma_s, gamma_t) result(gamma_s_eff) !! Resolve the `&ocean_cavity_melt_nml gamma_s` "unset" sentinel to !! the ISOMIP+ default `gamma_t/CAVITY_GAMMA_RATIO_ISOMIP` !! (Asay-Davis et al. (2016) Table 4 p. 2483; the 35 is Jenkins, !! Nicholls & Corr (2010) p. 2309). !! !! A NEGATIVE `gamma_s` means "not set by the user"; zero and !! positive values are taken literally — zero is then refused as a !! range error by `validate_config` rather than silently !! re-triggering the default, because the three-equation form !! divides by `gamma_s`. real(wp), intent(in) :: gamma_s !! The raw knob; negative = unset sentinel. real(wp), intent(in) :: gamma_t !! Heat-transfer coefficient the default is a fraction of. real(wp) :: gamma_s_eff gamma_s_eff = merge(gamma_t/CAVITY_GAMMA_RATIO_ISOMIP, gamma_s, gamma_s < 0.0_wp) end function cavity_resolve_gamma_s