parse_eos_variant Function

public pure function parse_eos_variant(name) result(code)

Translate a &ocean_eos_nml eos=... string into an EOS_VARIANT_* code. Unrecognised values fall back to EOS_VARIANT_LINEAR (the default = bit-identical to runs that omit the knob). Membership in the device-callable set is enforced separately by eos_validate at configure time.

Arguments

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

Return Value integer


Called by

proc~~parse_eos_variant~~CalledByGraph proc~parse_eos_variant parse_eos_variant proc~configure_ocean_drag configure_ocean_drag proc~configure_ocean_drag->proc~parse_eos_variant 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~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_eos_variant(name) result(code)
      !! Translate a `&ocean_eos_nml eos=...` string into an
      !! `EOS_VARIANT_*` code.  Unrecognised values fall back to
      !! `EOS_VARIANT_LINEAR` (the default = bit-identical to runs that
      !! omit the knob).  Membership in the device-callable set is
      !! enforced separately by `eos_validate` at configure time.
      character(len=*), intent(in) :: name
      integer :: code
      select case (trim(adjustl(name)))
      case ("linear", "LINEAR")
         code = EOS_VARIANT_LINEAR
      case ("wright", "WRIGHT", "wright_97", "wright97")
         code = EOS_VARIANT_WRIGHT_97
      case ("roquet_spv", "ROQUET_SPV", "roquet", "ROQUET")
         code = EOS_VARIANT_ROQUET_SPV
      case ("teos10", "TEOS10", "teos-10")
         code = EOS_VARIANT_TEOS10
      case default
         code = EOS_VARIANT_LINEAR
      end select
   end function parse_eos_variant