parse_stretching_mode Function

public pure function parse_stretching_mode(str) result(mode)

Convert a namelist string to a STRETCH_* constant.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: str

Return Value integer


Source Code

   pure integer function parse_stretching_mode(str) result(mode)
      !! Convert a namelist string to a STRETCH_* constant.
      character(len=*), intent(in) :: str
      select case (trim(adjustl(str)))
      case ("log")
         mode = STRETCH_LOG
      case ("uniform")
         mode = STRETCH_UNIFORM
      case default
         mode = STRETCH_LOG
      end select
   end function parse_stretching_mode