Translate a &ocean_eos_nml tfreeze_set=... string into a
TFREEZE_SET_* code. Unlike parse_eos_variant this one does
NOT fall back to a default on a typo: it returns
TFREEZE_SET_INVALID and validate_config aborts. Silently
defaulting would turn a mistyped liquidus into a 0.03 °C shift
in the freezing point — a melt-rate sign change at the margin,
with no run-time symptom at all.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
pure function parse_tfreeze_set(name) result(code) !! Translate a `&ocean_eos_nml tfreeze_set=...` string into a !! `TFREEZE_SET_*` code. Unlike `parse_eos_variant` this one does !! NOT fall back to a default on a typo: it returns !! `TFREEZE_SET_INVALID` and `validate_config` aborts. Silently !! defaulting would turn a mistyped liquidus into a 0.03 °C shift !! in the freezing point — a melt-rate sign change at the margin, !! with no run-time symptom at all. character(len=*), intent(in) :: name integer :: code select case (trim(adjustl(name))) case ("seaice", "SEAICE", "sea_ice", "sis2") code = TFREEZE_SET_SEAICE case ("isomip", "ISOMIP", "isomip+", "isomip_plus") code = TFREEZE_SET_ISOMIP case default code = TFREEZE_SET_INVALID end select end function parse_tfreeze_set