Map &ocean_porous_nml source onto POROUS_SOURCE_*. An
unrecognised string returns -1 so the caller can fail loud.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
pure function parse_porous_source(name) result(src) !! Map `&ocean_porous_nml source` onto `POROUS_SOURCE_*`. An !! unrecognised string returns -1 so the caller can fail loud. character(len=*), intent(in) :: name integer :: src select case (trim(adjustl(name))) case ("resolved") src = POROUS_SOURCE_RESOLVED case ("file") src = POROUS_SOURCE_FILE case default src = -1 end select end function parse_porous_source