&ocean_cavity_dyn_nml draft_config -> CAVITY_DRAFT_*.
Returns CAVITY_DRAFT_INVALID on an unrecognised spelling — the
caller fails loud; there is no silent default.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
pure function parse_cavity_draft_config(name) result(code) !! `&ocean_cavity_dyn_nml draft_config` -> `CAVITY_DRAFT_*`. !! Returns `CAVITY_DRAFT_INVALID` on an unrecognised spelling — the !! caller fails loud; there is no silent default. character(len=*), intent(in) :: name integer :: code select case (trim(adjustl(name))) case ("none", "") code = CAVITY_DRAFT_NONE case ("flat") code = CAVITY_DRAFT_FLAT case ("linear", "linear_x") code = CAVITY_DRAFT_LINEAR case ("file") code = CAVITY_DRAFT_FILE case default code = CAVITY_DRAFT_INVALID end select end function parse_cavity_draft_config