register_ocean_eos Subroutine

private subroutine register_ocean_eos(cfg, schema)

&ocean_eos_nml: equation-of-state variant selector, the freezing-point (liquidus) coefficient set, and the potential-density reference pressure. eos enum mirrors parse_eos_variant in rdb_eos; tfreeze_set mirrors parse_tfreeze_set in the same module.

Arguments

Type IntentOptional Attributes Name
type(config_t), intent(in), target :: cfg
type(nml_schema_t), intent(inout) :: schema

Calls

proc~~register_ocean_eos~~CallsGraph proc~register_ocean_eos register_ocean_eos proc~group_add nml_group_t%group_add proc~register_ocean_eos->proc~group_add proc~nml_enum nml_enum proc~register_ocean_eos->proc~nml_enum proc~nml_real nml_real proc~register_ocean_eos->proc~nml_real proc~schema_add_group nml_schema_t%schema_add_group proc~register_ocean_eos->proc~schema_add_group error error proc~group_add->error proc~lower lower proc~group_add->proc~lower proc~schema_add_group->error proc~schema_add_group->proc~lower proc~move_group move_group proc~schema_add_group->proc~move_group

Called by

proc~~register_ocean_eos~~CalledByGraph proc~register_ocean_eos register_ocean_eos proc~build_rdb_schema build_rdb_schema proc~build_rdb_schema->proc~register_ocean_eos proc~read_config_from_string_impl read_config_from_string_impl proc~read_config_from_string_impl->proc~build_rdb_schema proc~read_config_impl read_config_impl proc~read_config_impl->proc~build_rdb_schema proc~read_config read_config proc~read_config->proc~read_config_impl proc~read_config_from_string read_config_from_string proc~read_config_from_string->proc~read_config_from_string_impl proc~build_pending_handle build_pending_handle proc~build_pending_handle->proc~read_config_from_string 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_pending rdb_ocean_create_pending proc~rdb_ocean_create_pending->proc~build_pending_handle

Variables

Type Visibility Attributes Name Initial
type(nml_group_t), private :: g
real(kind=wp), private, pointer :: pr
character(len=:), private, pointer :: ps

Source Code

   subroutine register_ocean_eos(cfg, schema)
      !! `&ocean_eos_nml`: equation-of-state variant selector, the
      !! freezing-point (liquidus) coefficient set, and the
      !! potential-density reference pressure.
      !! `eos` enum mirrors `parse_eos_variant` in rdb_eos;
      !! `tfreeze_set` mirrors `parse_tfreeze_set` in the same module.
      type(config_t), target, intent(in) :: cfg
      type(nml_schema_t), intent(inout) :: schema
      type(nml_group_t) :: g
      character(len=:), pointer :: ps
      real(wp), pointer :: pr

      g%name = "ocean_eos"
      g%doc = "Equation-of-state variant selector, liquidus set + reference pressure."
      ps => cfg%ocean%eos%eos
      call g%add(nml_enum("eos", ps, "Equation-of-state variant", &
                          allowed=[character(len=10) :: "linear", "wright", &
                                   "roquet_spv", "teos10"]))
      ps => cfg%ocean%eos%tfreeze_set
      call g%add(nml_enum("tfreeze_set", ps, &
                          "Named liquidus coefficient set for eos_freezing_point "// &
                          "(T_f = l1*S + l2 + l3*p): 'seaice' = SIS2/MOM6 "// &
                          "(-0.054, 0, -7.53e-8), 'isomip' = ISOMIP+ "// &
                          "(-0.0573, 0.0832, -7.53e-8)", &
                          allowed=[character(len=6) :: "seaice", "isomip"]))
      pr => cfg%ocean%eos%p_ref
      call g%add(nml_real("p_ref", pr, &
                          "Reference pressure for the potential density "// &
                          "ms%rho_layer (horizontally uniform by design; "// &
                          "0 => surface density)", &
                          units="Pa", min=0.0_wp))
      call schema%add_group(g)
   end subroutine register_ocean_eos