register_ocean_bdrag Subroutine

private subroutine register_ocean_bdrag(cfg, schema)

&ocean_bdrag_nml: bottom-drag selector + coefficients. form enum mirrors parse_bdrag_variant in rdb_ocean_bottom_drag.

Arguments

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

Calls

proc~~register_ocean_bdrag~~CallsGraph proc~register_ocean_bdrag register_ocean_bdrag proc~group_add nml_group_t%group_add proc~register_ocean_bdrag->proc~group_add proc~nml_enum nml_enum proc~register_ocean_bdrag->proc~nml_enum proc~nml_logical nml_logical proc~register_ocean_bdrag->proc~nml_logical proc~nml_real nml_real proc~register_ocean_bdrag->proc~nml_real proc~schema_add_group nml_schema_t%schema_add_group proc~register_ocean_bdrag->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_bdrag~~CalledByGraph proc~register_ocean_bdrag register_ocean_bdrag proc~build_rdb_schema build_rdb_schema proc~build_rdb_schema->proc~register_ocean_bdrag 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
logical, private, pointer :: pl
real(kind=wp), private, pointer :: pr
character(len=:), private, pointer :: ps

Source Code

   subroutine register_ocean_bdrag(cfg, schema)
      !! `&ocean_bdrag_nml`: bottom-drag selector + coefficients.
      !! `form` enum mirrors `parse_bdrag_variant` in rdb_ocean_bottom_drag.
      type(config_t), target, intent(in) :: cfg
      type(nml_schema_t), intent(inout) :: schema
      type(nml_group_t) :: g
      real(wp), pointer :: pr
      character(len=:), pointer :: ps
      logical, pointer :: pl

      g%name = "ocean_bdrag"
      g%doc = "Bottom-drag selector + coefficients."
      ps => cfg%ocean%bdrag%form
      call g%add(nml_enum("form", ps, "Bottom-drag variant", &
                          allowed=[character(len=9) :: "quadratic", "linear"]))
      pr => cfg%ocean%bdrag%cd
      call g%add(nml_real("cd", pr, "Quadratic drag coefficient (0 disables)"))
      pr => cfg%ocean%bdrag%r
      call g%add(nml_real("r", pr, "Linear Rayleigh coefficient (0 disables)", units="1/s"))
      pr => cfg%ocean%bdrag%hbbl
      call g%add(nml_real("hbbl", pr, "BBL thickness for distributed drag (0 = bed-only)", &
                          units="m"))
      pr => cfg%ocean%bdrag%bg_vel
      call g%add(nml_real("bg_vel", pr, "Background velocity floor for distributed drag", &
                          units="m/s"))
      pr => cfg%ocean%bdrag%bbl_thick_min
      call g%add(nml_real("bbl_thick_min", pr, "Minimum effective BBL thickness", units="m"))
      pr => cfg%ocean%bdrag%bed_factor
      call g%add(nml_real("bed_factor", pr, "Multiplier on the bed-layer drag tendency only"))
      pl => cfg%ocean%bdrag%channel_drag
      call g%add(nml_logical("channel_drag", pl, &
                             "Enable per-layer lateral side-wall (channel) Rayleigh drag"))
      pr => cfg%ocean%bdrag%cdrag_side
      call g%add(nml_real("cdrag_side", pr, &
                          "Side-wall drag coefficient (0 disables channel drag)"))
      pl => cfg%ocean%bdrag%implicit
      call g%add(nml_logical("implicit", pl, &
                             "Backward-Euler implicit drag (stable for thin bottom layers)"))
      call schema%add_group(g)
   end subroutine register_ocean_bdrag