Which of the TWO contracts zstar_h_min carries for coord_type.
The single knob spells two different things, and which one it means is decided by the coordinate family, not by the value:
VCOORD_HMIN_INERT — the GEOMETRIC families (VCOORD_ZSTAR_FULL,
VCOORD_Z_FIXED, and VCOORD_ZSTAR — MOM6 z*, whose bed fillers
are z_fixed’s). Here zstar_h_min is the thickness handed to
filler layers that lie BELOW the local bed (or above the column
top). They hold no water; the floor exists ONLY so target_h is
never exactly zero and the h-dividing kernels cannot 1/0 (see
ocean_vcoord_build_zref_full). They are MEANT to be classified
vanished downstream, so this floor belongs AT OR BELOW the D4
skip/merge marker H_VANISHED (the gates are a strict >, so
equality still reads as vanished) — that is the design, not an
oversight. Lift it above H_VANISHED and the below-bed filler
silently becomes dynamically LIVE (real EOS density from ghost
T/S, a PGF column entry, a remap-drain concentration, a vdiff
interface) while the coordinate’s own surface-trim branch still
treats it as throwaway.
VCOORD_HMIN_KEEPALIVE — the DENSITY families (VCOORD_RHO,
VCOORD_HYCOM). Here the collapsed layers are real layers the
density inversion squeezed shut ANYWHERE in the column; they carry
tracer mass and the MOM6 min-thickness inflation debits it from
the thickest survivor. They must SURVIVE the remap drain, so that
path floors at max(zstar_h_min, 2*H_VANISHED) on purpose
(ocean_vcoord_compute_target_h_rho_impl). zstar_h_min itself
is additionally the pre-compaction strip threshold there, so a
large value is meaningful rather than wrong.
VCOORD_HMIN_UNUSED — every other family never reads the knob.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | coord_type |
|
pure integer function vcoord_h_min_role(coord_type) result(role) !! Which of the TWO contracts `zstar_h_min` carries for `coord_type`. !! !! The single knob spells two different things, and which one it means !! is decided by the coordinate family, not by the value: !! !! * `VCOORD_HMIN_INERT` — the GEOMETRIC families (`VCOORD_ZSTAR_FULL`, !! `VCOORD_Z_FIXED`, and `VCOORD_ZSTAR` — MOM6 z*, whose bed fillers !! are `z_fixed`'s). Here `zstar_h_min` is the thickness handed to !! filler layers that lie BELOW the local bed (or above the column !! top). They hold no water; the floor exists ONLY so `target_h` is !! never exactly zero and the h-dividing kernels cannot 1/0 (see !! `ocean_vcoord_build_zref_full`). They are MEANT to be classified !! vanished downstream, so this floor belongs AT OR BELOW the D4 !! skip/merge marker `H_VANISHED` (the gates are a strict `>`, so !! equality still reads as vanished) — that is the design, not an !! oversight. Lift it above `H_VANISHED` and the below-bed filler !! silently becomes dynamically LIVE (real EOS density from ghost !! T/S, a PGF column entry, a remap-drain concentration, a vdiff !! interface) while the coordinate's own surface-trim branch still !! treats it as throwaway. !! !! * `VCOORD_HMIN_KEEPALIVE` — the DENSITY families (`VCOORD_RHO`, !! `VCOORD_HYCOM`). Here the collapsed layers are real layers the !! density inversion squeezed shut ANYWHERE in the column; they carry !! tracer mass and the MOM6 min-thickness inflation debits it from !! the thickest survivor. They must SURVIVE the remap drain, so that !! path floors at `max(zstar_h_min, 2*H_VANISHED)` on purpose !! (`ocean_vcoord_compute_target_h_rho_impl`). `zstar_h_min` itself !! is additionally the pre-compaction strip threshold there, so a !! large value is meaningful rather than wrong. !! !! * `VCOORD_HMIN_UNUSED` — every other family never reads the knob. integer, intent(in) :: coord_type !! `VCOORD_*` code (from `parse_vcoord_type`). select case (coord_type) case (VCOORD_ZSTAR_FULL, VCOORD_Z_FIXED, VCOORD_ZSTAR) role = VCOORD_HMIN_INERT case (VCOORD_RHO, VCOORD_HYCOM) role = VCOORD_HMIN_KEEPALIVE case default role = VCOORD_HMIN_UNUSED end select end function vcoord_h_min_role