parse_buoyancy_coeffs Function

public pure function parse_buoyancy_coeffs(name) result(tag)

Map the &ocean_vmix_nml buoyancy_coeffs string to a BUOY_COEFFS_* tag; BUOY_COEFFS_INVALID for an unrecognised string, which configure_ocean_vmix turns into a fail-loud abort (never a silent fallback to the constants). The accepted set must match the nml_enum allowed= list in register_ocean_vmix.

Arguments

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

Return Value integer


Called by

proc~~parse_buoyancy_coeffs~~CalledByGraph proc~parse_buoyancy_coeffs parse_buoyancy_coeffs proc~configure_ocean_lateral configure_ocean_lateral proc~configure_ocean_lateral->proc~parse_buoyancy_coeffs proc~engine_setup engine_setup proc~engine_setup->proc~configure_ocean_lateral 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_buoyancy_coeffs(name) result(tag)
      !! Map the `&ocean_vmix_nml buoyancy_coeffs` string to a
      !! `BUOY_COEFFS_*` tag; `BUOY_COEFFS_INVALID` for an unrecognised
      !! string, which `configure_ocean_vmix` turns into a fail-loud abort
      !! (never a silent fallback to the constants).  The accepted set
      !! must match the `nml_enum allowed=` list in `register_ocean_vmix`.
      character(len=*), intent(in) :: name
      integer :: tag
      select case (trim(name))
      case ("constant")
         tag = BUOY_COEFFS_CONSTANT
      case ("eos")
         tag = BUOY_COEFFS_EOS
      case default
         tag = BUOY_COEFFS_INVALID
      end select
   end function parse_buoyancy_coeffs