Is there anything in this configuration that WRITES
multilayer_state_t%p_top?
p_top = metrics%p_ice_ref + sf%p_surf has exactly two
producers, and both halves count:
&ocean_psurf_nml enable — the atmospheric surface-pressure
seam, which fills sf%p_surf and refreshes p_top once per
outer step in ocean_dyn_step_split;&ocean_cavity_dyn_nml enable — the STATIC ice-shelf load
p_ice_ref = rho_ref*GRAVITY*z_draft, assembled into
p_top by configure_ocean_cavity. Static is not the same
as absent: the draft never changes, so the configure-time
assembly is the final value and there is nothing to refresh.Used by the &ocean_pgf_nml p_top_in_bc inert-knob warning,
which must name both — a cavity run is precisely the case where
p_top_in_bc is not merely live but REQUIRED (for a draft that
varies), so warning that it is inert there was telling the user
the opposite of the truth.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_t), | intent(in) | :: | cfg |
pure function p_top_has_producer(cfg) result(has) !! Is there anything in this configuration that WRITES !! `multilayer_state_t%p_top`? !! !! `p_top = metrics%p_ice_ref + sf%p_surf` has exactly two !! producers, and both halves count: !! !! * `&ocean_psurf_nml enable` — the atmospheric surface-pressure !! seam, which fills `sf%p_surf` and refreshes `p_top` once per !! outer step in `ocean_dyn_step_split`; !! * `&ocean_cavity_dyn_nml enable` — the STATIC ice-shelf load !! `p_ice_ref = rho_ref*GRAVITY*z_draft`, assembled into !! `p_top` by `configure_ocean_cavity`. Static is not the same !! as absent: the draft never changes, so the configure-time !! assembly is the final value and there is nothing to refresh. !! !! Used by the `&ocean_pgf_nml p_top_in_bc` inert-knob warning, !! which must name both — a cavity run is precisely the case where !! `p_top_in_bc` is not merely live but REQUIRED (for a draft that !! varies), so warning that it is inert there was telling the user !! the opposite of the truth. type(config_t), intent(in) :: cfg logical :: has has = cfg%ocean%psurf%enable .or. cfg%ocean%cavity_dyn%enable end function p_top_has_producer