register_ocean_vdiff Subroutine

private subroutine register_ocean_vdiff(cfg, schema)

&ocean_vdiff_nml: backward-Euler vertical-friction folding knobs.

Arguments

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

Calls

proc~~register_ocean_vdiff~~CallsGraph proc~register_ocean_vdiff register_ocean_vdiff proc~group_add nml_group_t%group_add proc~register_ocean_vdiff->proc~group_add proc~nml_logical nml_logical proc~register_ocean_vdiff->proc~nml_logical proc~nml_real nml_real proc~register_ocean_vdiff->proc~nml_real proc~schema_add_group nml_schema_t%schema_add_group proc~register_ocean_vdiff->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_vdiff~~CalledByGraph proc~register_ocean_vdiff register_ocean_vdiff proc~build_rdb_schema build_rdb_schema proc~build_rdb_schema->proc~register_ocean_vdiff 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

Source Code

   subroutine register_ocean_vdiff(cfg, schema)
      !! `&ocean_vdiff_nml`: backward-Euler vertical-friction folding knobs.
      type(config_t), target, intent(in) :: cfg
      type(nml_schema_t), intent(inout) :: schema
      type(nml_group_t) :: g
      logical, pointer :: pl
      real(wp), pointer :: pr

      g%name = "ocean_vdiff"
      g%doc = "Backward-Euler vertical-friction solver knobs."
      pl => cfg%ocean%vdiff%implicit_stress
      call g%add(nml_logical("implicit_stress", pl, &
                             "Fold wind stress into the vdiff surface (k=nz) RHS"))
      pl => cfg%ocean%vdiff%accel_visc_rem
      call g%add(nml_logical("accel_visc_rem", pl, &
                             "RETIRED (refused when set)", &
                             dead_on_ocean_path="RETIRED -- PR-3's audit found no MOM6 "// &
                             "state-update equivalent: btstep_layer_accel applies the "// &
                             "depth-mean barotropic acceleration uniformly across every "// &
                             "layer, no visc_rem weight. Setting it .true. is a "// &
                             "fail-loud configure error (validate_config). The real MOM6 "// &
                             "visc_rem*velocity mechanisms are ocean_bt_nml "// &
                             "renorm_visc_rem and rescale_strong_drag."))
      pl => cfg%ocean%vdiff%implicit_drag
      call g%add(nml_logical("implicit_drag", pl, &
                             "Fold bottom drag into the vdiff bed (k=1) diagonal"))
      pl => cfg%ocean%vdiff%implicit_top_drag
      call g%add(nml_logical("implicit_top_drag", pl, &
                             "Fold the ice-shelf top drag into the vdiff surface "// &
                             "(k=nz) diagonal, masking the wind RHS under cover"))
      pl => cfg%ocean%vdiff%hvel_mom6
      call g%add(nml_logical("hvel_mom6", pl, &
                             "MOM6 HARMONIC_VISC parity: harmonic momentum face "// &
                             "thickness with the near-bed upwind blend, and arithmetic "// &
                             "h_shear. Suppresses grounded-sliver momentum as MOM6 does"))
      pl => cfg%ocean%vdiff%hvel_harmonic
      call g%add(nml_logical("hvel_harmonic", pl, &
                             "MOM6 HARMONIC_VISC for the hvel_mom6 face thickness: .false. = "// &
                             "MOM6 default (arithmetic + z_clear near-bed harmonic blend), "// &
                             ".true. = harmonic + near-bed upwind-arithmetic blend"))
      pr => cfg%ocean%vdiff%hbbl_visc
      call g%add(nml_real("hbbl_visc", pr, &
                          "Bottom-layer scale for the hvel_mom6 botfn blend without the BBL "// &
                          "glue, and the glue's HBBL when ocean_bdrag hbbl = 0 (MOM6 HBBL)", &
                          units="m"))
      pl => cfg%ocean%vdiff%bbl_glue
      call g%add(nml_logical("bbl_glue", pl, &
                             "MOM6 BOTTOMDRAGLAW: per-face set_viscous_BBL kv_bbl/bbl_thick "// &
                             "from the ocean_bdrag law (quadratic or linear); kv_bbl botfn "// &
                             "glue at near-bed interfaces + piston bed row replace the bed "// &
                             "drag apply. Requires hvel_mom6"))
      pr => cfg%ocean%vdiff%bbl_piston
      call g%add(nml_real("bbl_piston", pr, &
                          "Historical constant BBL piston u* (hand-built slots only; a "// &
                          "configured glue takes its drag from ocean_bdrag)", &
                          units="m/s", min=0.0_wp))
      pl => cfg%ocean%vdiff%hvel_upwind
      call g%add(nml_logical("hvel_upwind", pl, &
                             "Near-bed upwind blend in the hvel_mom6 thickness build "// &
                             "(.false. = pure harmonic; the u-sign blend flip-flops on "// &
                             "roundoff at rest and collapses the BBL glue, PGF_BUG.md par.9.8)"))
      call schema%add_group(g)
   end subroutine register_ocean_vdiff