.true. unless variant == OPGF_VARIANT_GPRIME with nz /= 2
(PR-6 fail-loud). The reduced-gravity gprime PGF hard-writes
ONLY k=1 (bottom) and k=2 (top) — with nz > 2 layers k=3..nz
carry zero pressure gradient AND the “top” branch lands on layer
2 of nz (the abyss under the bottom-up convention); with nz < 2
the kernel early-returns leaving the whole PGF zero. The guard
is gprime-specific — every other variant supports general nz, so
this returns .true. for them regardless of nz. Wired into
validate_config against cfg%nz_layers (config-time).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | variant | |||
| integer, | intent(in) | :: | nz |
pure function gprime_nz_is_supported(variant, nz) result(ok) !! `.true.` unless `variant == OPGF_VARIANT_GPRIME` with `nz /= 2` !! (PR-6 fail-loud). The reduced-gravity gprime PGF hard-writes !! ONLY k=1 (bottom) and k=2 (top) — with `nz > 2` layers k=3..nz !! carry zero pressure gradient AND the "top" branch lands on layer !! 2 of nz (the abyss under the bottom-up convention); with `nz < 2` !! the kernel early-returns leaving the whole PGF zero. The guard !! is gprime-specific — every other variant supports general nz, so !! this returns `.true.` for them regardless of `nz`. Wired into !! `validate_config` against `cfg%nz_layers` (config-time). integer, intent(in) :: variant, nz logical :: ok ok = (variant /= OPGF_VARIANT_GPRIME) .or. (nz == 2) end function gprime_nz_is_supported