parse_cavity_freshwater Function

public pure function parse_cavity_freshwater(name) result(code)

Translate a &ocean_cavity_melt_nml freshwater string into a CAVITY_FW_* code. The accepted set MIRRORS the nml_enum registration in register_ocean_cavity_melt — the two lists move together.

Arguments

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

Return Value integer


Called by

proc~~parse_cavity_freshwater~~CalledByGraph proc~parse_cavity_freshwater parse_cavity_freshwater proc~configure_ocean_cavity_melt configure_ocean_cavity_melt proc~configure_ocean_cavity_melt->proc~parse_cavity_freshwater proc~validate_config validate_config proc~validate_config->proc~parse_cavity_freshwater proc~build_pending_handle build_pending_handle proc~build_pending_handle->proc~validate_config proc~engine_setup engine_setup proc~engine_setup->proc~configure_ocean_cavity_melt 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~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~build_pending_handle proc~rdb_ocean_create_from_string->proc~complete_ocean_create proc~rdb_ocean_create_pending rdb_ocean_create_pending proc~rdb_ocean_create_pending->proc~build_pending_handle 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

Variables

Type Visibility Attributes Name Initial
character(len=:), private, allocatable :: key

Source Code

   pure function parse_cavity_freshwater(name) result(code)
      !! Translate a `&ocean_cavity_melt_nml freshwater` string into a
      !! `CAVITY_FW_*` code.  The accepted set MIRRORS the `nml_enum`
      !! registration in `register_ocean_cavity_melt` — the two lists
      !! move together.
      character(len=*), intent(in) :: name
      character(len=:), allocatable :: key
      integer :: code
      key = trim(adjustl(name))
      select case (key)
      case ("virtual", "VIRTUAL", "virtual_salt")
         code = CAVITY_FW_VIRTUAL
      case ("mass", "MASS", "real", "real_mass")
         code = CAVITY_FW_MASS
      case default
         code = CAVITY_FW_INVALID
      end select
   end function parse_cavity_freshwater