Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Single source of truth for “is the grounded-layer PGF gate armed?”
(&ocean_isopycnal_nml pgf_skip_nonoverlap →
ocean_pressure_force_t%skip_nonoverlap).
Two call sites must agree BEFORE any array is allocated:
ocean_state_init_from_config latches the answer so the PGF
slot’s allocation gate can decide whether FV_MOM6 needs z_centre
(it is read by nothing else on that path), and configure_ocean_pgf
re-evaluates it after the full config pass and fails loud if the two
disagree. Keeping the predicate in one place is what makes that
guard meaningful.
ONLY under VCOORD_LAGRANGIAN: that is the coordinate where layers
wedge out against the bed onto the angstrom_h floor while staying
massive one cell away, which is what makes the face PGF ill-posed and
leaves a spurious gradient AT REST. gprime differences interface
positions directly (no layer-centre Jacobian, no z_centre buffer),
so it is the one variant excluded here — configure_ocean_pgf warns
for it. mont IS covered: the Montgomery potential is exact at rest
wherever a layer is present on both sides of the face, but a grounded
layer sits at the bed on one side and at its flat-isopycnal height on
the other, so M stops being horizontally uniform and the residual
returns.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Source Code
pure function pgf_nonoverlap_gate_on(cfg,variant)result(on)!! Single source of truth for "is the grounded-layer PGF gate armed?"!! (`&ocean_isopycnal_nml pgf_skip_nonoverlap` →!! `ocean_pressure_force_t%skip_nonoverlap`).!!!! Two call sites must agree BEFORE any array is allocated:!! `ocean_state_init_from_config` latches the answer so the PGF!! slot's allocation gate can decide whether FV_MOM6 needs `z_centre`!! (it is read by nothing else on that path), and `configure_ocean_pgf`!! re-evaluates it after the full config pass and fails loud if the two!! disagree. Keeping the predicate in one place is what makes that!! guard meaningful.!!!! ONLY under `VCOORD_LAGRANGIAN`: that is the coordinate where layers!! wedge out against the bed onto the `angstrom_h` floor while staying!! massive one cell away, which is what makes the face PGF ill-posed and!! leaves a spurious gradient AT REST. `gprime` differences interface!! positions directly (no layer-centre Jacobian, no `z_centre` buffer),!! so it is the one variant excluded here — `configure_ocean_pgf` warns!! for it. `mont` IS covered: the Montgomery potential is exact at rest!! wherever a layer is present on both sides of the face, but a grounded!! layer sits at the bed on one side and at its flat-isopycnal height on!! the other, so `M` stops being horizontally uniform and the residual!! returns.use rdb_constants,only:VCOORD_LAGRANGIANtype(config_t),intent(in)::cfginteger,intent(in)::variant!! `OPGF_VARIANT_*` code (already parsed from `cfg%ocean%pgf%form`).logical::onon=cfg%ocean%isopycnal%pgf_skip_nonoverlap.and.&parse_ocean_vcoord_type(cfg%vcoord_type)==VCOORD_LAGRANGIAN.and.&(variant==OPGF_VARIANT_MONT.or.&variant==OPGF_VARIANT_FV_LITE.or.&variant==OPGF_VARIANT_FV_WRIGHT.or.&variant==OPGF_VARIANT_FV_MOM6)end function pgf_nonoverlap_gate_on