pv_variant_is_implemented Function

public pure function pv_variant_is_implemented(code) result(ok)

.true. only for a Coriolis-advection variant that has a real kernel wired into coriolis_adv_compute_tendencies (SADOURNY / SADOURNY_HK / SADOURNY_ENERGY). PV_VARIANT_AL81 returns .false. — the constant is reserved but the Arakawa-Lamb kernel is not yet written, and the AL81 promise (simultaneous energy + enstrophy conservation) must not be silently substituted by the enstrophy-only Sadourny kernel. PV_VARIANT_INVALID also returns .false.. The predicate is the single gate validate_config consumes (PR-6 fail-loud).

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: code

Return Value logical


Called by

proc~~pv_variant_is_implemented~~CalledByGraph proc~pv_variant_is_implemented pv_variant_is_implemented proc~validate_config validate_config proc~validate_config->proc~pv_variant_is_implemented 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 pv_variant_is_implemented(code) result(ok)
      !! `.true.` only for a Coriolis-advection variant that has a real
      !! kernel wired into `coriolis_adv_compute_tendencies`
      !! (SADOURNY / SADOURNY_HK / SADOURNY_ENERGY).  `PV_VARIANT_AL81`
      !! returns `.false.` — the constant is reserved but the
      !! Arakawa-Lamb kernel is not yet written, and the AL81 promise
      !! (simultaneous energy + enstrophy conservation) must not be
      !! silently substituted by the enstrophy-only Sadourny kernel.
      !! `PV_VARIANT_INVALID` also returns `.false.`.  The predicate is
      !! the single gate `validate_config` consumes (PR-6 fail-loud).
      integer, intent(in) :: code
      logical :: ok
      ok = (code == PV_VARIANT_SADOURNY) .or. &
           (code == PV_VARIANT_SADOURNY_HK) .or. &
           (code == PV_VARIANT_SADOURNY_ENERGY)
   end function pv_variant_is_implemented