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