roms_tools.BGCMarbl.process_bgc_fields#
- BGCMarbl.process_bgc_fields(forcings)#
Complete the MARBL tracer set across one or more forcing objects.
Enforces that variables do not overlap across sources — the caller is responsible (via each object’s
use_vars) for partitioning sources so each tracer comes from exactly one of them; an overlap is a configuration error and raises. This method:Derives tracers from the key fields present in each object, in place:
Fe``→``Lig,DIC``→``DIC_ALT_CO2,ALK``→``ALK_ALT_CO2, andCHL``→ the phytoplankton/zooplankton set (``CHLis then dropped). A derived tracer is only added where it is not already present anywhere across the objects (an explicit tracer supplied by one source suppresses derivation of the same tracer from another source’s key field).Checks for overlap: after derivation, if any tracer is present in more than one object, raises
ValueErrornaming the tracer and every source that supplies it.Fills any tracer still missing across the union of objects with its constant open-ocean background (
_OCEAN_FILL), written into the first object that can supply a same-shaped template to fill from. Tracers with no background value defined are set to zero.Reports every constant fill, and warns for any tracer that fell back to zero.
- Parameters:
forcings (forcing object | list of forcing objects) – One or more already-built
type="bgc"forcing objects, modified in place.- Returns:
forcing object | list of forcing objects – The processed object(s): the single object when one was passed, or the list of objects otherwise.