gprime_nz_is_supported Function

public 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).

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: variant
integer, intent(in) :: nz

Return Value logical


Called by

proc~~gprime_nz_is_supported~~CalledByGraph proc~gprime_nz_is_supported gprime_nz_is_supported proc~validate_config validate_config proc~validate_config->proc~gprime_nz_is_supported proc~build_pending_handle build_pending_handle proc~build_pending_handle->proc~validate_config 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

Source Code

   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