parse_porous_eta_interp Function

public pure function parse_porous_eta_interp(name) result(interp)

Map &ocean_porous_nml eta_interp onto POROUS_ETA_*. An unrecognised string returns -1 so the caller can fail loud.

Arguments

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

Return Value integer


Called by

proc~~parse_porous_eta_interp~~CalledByGraph proc~parse_porous_eta_interp parse_porous_eta_interp proc~configure_ocean_porous configure_ocean_porous proc~configure_ocean_porous->proc~parse_porous_eta_interp proc~engine_setup engine_setup proc~engine_setup->proc~configure_ocean_porous proc~complete_ocean_create complete_ocean_create proc~complete_ocean_create->proc~engine_setup proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_setup proc~driver_validate driver_validate proc~driver_validate->proc~engine_setup proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean proc~rdb_ocean_create_finalize rdb_ocean_create_finalize proc~rdb_ocean_create_finalize->proc~complete_ocean_create proc~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~complete_ocean_create

Source Code

   pure function parse_porous_eta_interp(name) result(interp)
      !! Map `&ocean_porous_nml eta_interp` onto `POROUS_ETA_*`.  An
      !! unrecognised string returns -1 so the caller can fail loud.
      character(len=*), intent(in) :: name
      integer :: interp
      select case (trim(adjustl(name)))
      case ("max")
         interp = POROUS_ETA_MAX
      case ("min")
         interp = POROUS_ETA_MIN
      case ("arithmetic")
         interp = POROUS_ETA_ARITH
      case ("harmonic")
         interp = POROUS_ETA_HARM
      case default
         interp = -1
      end select
   end function parse_porous_eta_interp