Translate a namelist string into a PV_ADV_* code. An
unrecognised string returns PV_ADV_INVALID (fail-loud — a typo
must not silently degrade the PV interpolation). weno5/weno7
are implemented; they additionally require nghost >= 4/5
(pv_adv_required_nghost), checked at configure.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
pure function parse_pv_adv_scheme(name) result(code) !! Translate a namelist string into a `PV_ADV_*` code. An !! unrecognised string returns `PV_ADV_INVALID` (fail-loud — a typo !! must not silently degrade the PV interpolation). `weno5`/`weno7` !! are implemented; they additionally require `nghost >= 4`/`5` !! (`pv_adv_required_nghost`), checked at configure. character(len=*), intent(in) :: name integer :: code select case (trim(adjustl(name))) case ("centered", "CENTERED", "centred", "center") code = PV_ADV_CENTERED case ("weno3", "WENO3") code = PV_ADV_WENO3 case ("weno5", "WENO5") code = PV_ADV_WENO5 case ("weno7", "WENO7") code = PV_ADV_WENO7 case default code = PV_ADV_INVALID end select end function parse_pv_adv_scheme