Translate a &ocean_eos_nml eos=... string into an
EOS_VARIANT_* code. Unrecognised values fall back to
EOS_VARIANT_LINEAR (the default = bit-identical to runs that
omit the knob). Membership in the device-callable set is
enforced separately by eos_validate at configure time.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
pure function parse_eos_variant(name) result(code) !! Translate a `&ocean_eos_nml eos=...` string into an !! `EOS_VARIANT_*` code. Unrecognised values fall back to !! `EOS_VARIANT_LINEAR` (the default = bit-identical to runs that !! omit the knob). Membership in the device-callable set is !! enforced separately by `eos_validate` at configure time. character(len=*), intent(in) :: name integer :: code select case (trim(adjustl(name))) case ("linear", "LINEAR") code = EOS_VARIANT_LINEAR case ("wright", "WRIGHT", "wright_97", "wright97") code = EOS_VARIANT_WRIGHT_97 case ("roquet_spv", "ROQUET_SPV", "roquet", "ROQUET") code = EOS_VARIANT_ROQUET_SPV case ("teos10", "TEOS10", "teos-10") code = EOS_VARIANT_TEOS10 case default code = EOS_VARIANT_LINEAR end select end function parse_eos_variant