parse_tfreeze_set Function

public pure function parse_tfreeze_set(name) result(code)

Translate a &ocean_eos_nml tfreeze_set=... string into a TFREEZE_SET_* code. Unlike parse_eos_variant this one does NOT fall back to a default on a typo: it returns TFREEZE_SET_INVALID and validate_config aborts. Silently defaulting would turn a mistyped liquidus into a 0.03 °C shift in the freezing point — a melt-rate sign change at the margin, with no run-time symptom at all.

Arguments

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

Return Value integer


Called by

proc~~parse_tfreeze_set~~CalledByGraph proc~parse_tfreeze_set parse_tfreeze_set proc~configure_ocean_drag configure_ocean_drag proc~configure_ocean_drag->proc~parse_tfreeze_set proc~validate_config validate_config proc~validate_config->proc~parse_tfreeze_set 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_drag 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

Source Code

   pure function parse_tfreeze_set(name) result(code)
      !! Translate a `&ocean_eos_nml tfreeze_set=...` string into a
      !! `TFREEZE_SET_*` code.  Unlike `parse_eos_variant` this one does
      !! NOT fall back to a default on a typo: it returns
      !! `TFREEZE_SET_INVALID` and `validate_config` aborts.  Silently
      !! defaulting would turn a mistyped liquidus into a 0.03 °C shift
      !! in the freezing point — a melt-rate sign change at the margin,
      !! with no run-time symptom at all.
      character(len=*), intent(in) :: name
      integer :: code
      select case (trim(adjustl(name)))
      case ("seaice", "SEAICE", "sea_ice", "sis2")
         code = TFREEZE_SET_SEAICE
      case ("isomip", "ISOMIP", "isomip+", "isomip_plus")
         code = TFREEZE_SET_ISOMIP
      case default
         code = TFREEZE_SET_INVALID
      end select
   end function parse_tfreeze_set