The namelist gate whose closure suppresses canonical diagnostic
name, for the “you asked for this and did not get it” warning.
"" for the four unconditional diagnostics (SSH/u/v/KE) — a hint
of "" means “this one should have registered; that is a bug,
not a config”. MUST be kept in lock-step with
register_default_diags’s gates; the count of non-empty hints
must equal the number of conditionally-registered canonical
diagnostics (test_ocean_diag/diag_gate_hint_covers_every_gate is
the lock — any PR that adds a new gated canonical diagnostic must
add its hint here or that test fails). This duplicates the gate
NAMES only, never the gate LOGIC — the single if in
register_default_diags remains the one place the gate is
evaluated.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
pure function canonical_diag_gate_hint(name) result(hint) !! The namelist gate whose closure suppresses canonical diagnostic !! `name`, for the "you asked for this and did not get it" warning. !! `""` for the four unconditional diagnostics (SSH/u/v/KE) — a hint !! of `""` means "this one should have registered; that is a bug, !! not a config". MUST be kept in lock-step with !! `register_default_diags`'s gates; the count of non-empty hints !! must equal the number of conditionally-registered canonical !! diagnostics (`test_ocean_diag/diag_gate_hint_covers_every_gate` is !! the lock — any PR that adds a new gated canonical diagnostic must !! add its hint here or that test fails). This duplicates the gate !! NAMES only, never the gate LOGIC — the single `if` in !! `register_default_diags` remains the one place the gate is !! evaluated. character(len=*), intent(in) :: name character(len=64) :: hint select case (trim(name)) case ("temperature", "salinity") hint = "&ocean_thermo_nml enable_thermodynamics" case ("age") hint = "&ocean_tracers_nml enable_ideal_age" case ("MLD_EPBL", "Kd_EPBL") hint = "&ocean_epbl_nml enable" case ("Kd_KSHEAR") hint = "&ocean_kappa_shear_nml enable" case ("ice_conc", "ice_thick") hint = "&ocean_ice_nml enable" case default hint = "" end select end function canonical_diag_gate_hint