Decide whether a parsed tracer_recon code is honoured on this config, independent of the multilayer nghost/use_ppm_tracer quality guards (those apply only once this returns OK for a weno rung). Factored out as a pure predicate so the fail-loud decision is unit-testable without triggering error stop.
recon_code is the parse_tracer_recon result (may be < 0).
The coastal multilayer solver is the ONLY consumer, so a weno*
rung is rejected fail-loud on every other config:
* “pqm” → REJECT_PQM (deferred on all configs)
* unrecognised → REJECT_UNKNOWN
* sim_type=’ocean’ → REJECT_OCEAN (coastal-only in wave 1)
* coastal, not multilayer → REJECT_NO_ML (2D barotropic / NH)
“ppm” is always OK (the default path; bit-identical).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | recon_code |
parse_tracer_recon(cfg%tracer_recon) result. |
||
| logical, | intent(in) | :: | is_ocean |
.true. when sim_type == ‘ocean’. |
||
| logical, | intent(in) | :: | has_multilayer_tracers |
cfg%use_multilayer — the coastal multilayer tracer registry. |
pure function tracer_recon_support_status(recon_code, is_ocean, & has_multilayer_tracers) result(status) !! Decide whether a parsed tracer_recon code is honoured on this !! config, independent of the multilayer nghost/use_ppm_tracer !! quality guards (those apply only once this returns OK for a weno !! rung). Factored out as a pure predicate so the fail-loud !! decision is unit-testable without triggering error stop. !! !! `recon_code` is the parse_tracer_recon result (may be < 0). !! The coastal multilayer solver is the ONLY consumer, so a weno* !! rung is rejected fail-loud on every other config: !! * "pqm" → REJECT_PQM (deferred on all configs) !! * unrecognised → REJECT_UNKNOWN !! * sim_type='ocean' → REJECT_OCEAN (coastal-only in wave 1) !! * coastal, not multilayer → REJECT_NO_ML (2D barotropic / NH) !! "ppm" is always OK (the default path; bit-identical). integer, intent(in) :: recon_code !! parse_tracer_recon(cfg%tracer_recon) result. logical, intent(in) :: is_ocean !! .true. when sim_type == 'ocean'. logical, intent(in) :: has_multilayer_tracers !! cfg%use_multilayer — the coastal multilayer tracer registry. integer :: status if (recon_code == -2) then status = TRACER_RECON_REJECT_PQM else if (recon_code < 0) then status = TRACER_RECON_REJECT_UNKNOWN else if (recon_code == TRACER_RECON_PPM) then status = TRACER_RECON_OK else if (is_ocean) then status = TRACER_RECON_REJECT_OCEAN else if (.not. has_multilayer_tracers) then status = TRACER_RECON_REJECT_NO_ML else status = TRACER_RECON_OK end if end function tracer_recon_support_status