Translate a namelist string into an OPGF_VARIANT_* code.
Unrecognised values fall back to OPGF_VARIANT_FV_LITE (the
production default).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
pure function parse_opgf_variant(name) result(code) !! Translate a namelist string into an `OPGF_VARIANT_*` code. !! Unrecognised values fall back to `OPGF_VARIANT_FV_LITE` (the !! production default). character(len=*), intent(in) :: name integer :: code select case (trim(adjustl(name))) case ("mont", "MONT", "montgomery") code = OPGF_VARIANT_MONT case ("fv_lite", "FV_LITE", "fv-lite", "") code = OPGF_VARIANT_FV_LITE case ("fv_wright", "FV_WRIGHT", "fv-wright", "wright") code = OPGF_VARIANT_FV_WRIGHT case ("gprime", "GPRIME", "reduced_gravity") code = OPGF_VARIANT_GPRIME case ("fv_mom6", "FV_MOM6", "fv-mom6", "mom6_fv", "MOM6_FV") code = OPGF_VARIANT_FV_MOM6 case default code = OPGF_VARIANT_FV_LITE end select end function parse_opgf_variant