parse_kpp_sw_method Function

public pure function parse_kpp_sw_method(name) result(tag)

Map the &ocean_thermo_nml kpp_sw_method string to a KPP_SW_* tag; -1 for an unrecognised string (fail-loud at validate_config).

Arguments

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

Return Value integer


Called by

proc~~parse_kpp_sw_method~~CalledByGraph proc~parse_kpp_sw_method parse_kpp_sw_method proc~configure_ocean_lateral configure_ocean_lateral proc~configure_ocean_lateral->proc~parse_kpp_sw_method proc~kpp_sw_method_is_implemented kpp_sw_method_is_implemented proc~kpp_sw_method_is_implemented->proc~parse_kpp_sw_method proc~engine_setup engine_setup proc~engine_setup->proc~configure_ocean_lateral proc~validate_config validate_config proc~validate_config->proc~kpp_sw_method_is_implemented proc~build_pending_handle build_pending_handle proc~build_pending_handle->proc~validate_config 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~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

Source Code

   pure function parse_kpp_sw_method(name) result(tag)
      !! Map the `&ocean_thermo_nml kpp_sw_method` string to a
      !! `KPP_SW_*` tag; `-1` for an unrecognised string (fail-loud at
      !! `validate_config`).
      character(len=*), intent(in) :: name
      integer :: tag
      select case (trim(name))
      case ("all_sw")
         tag = KPP_SW_ALL
      case ("mxl_sw")
         tag = KPP_SW_MXL
      case ("lv1_sw")
         tag = KPP_SW_LV1
      case default
         tag = -1
      end select
   end function parse_kpp_sw_method