BGCModel

Contents

BGCModel#

class roms_tools.BGCModel#

Abstract description of a ROMS biogeochemical model.

Subclasses describe a particular BGC model (e.g. MARBL) by declaring which tracers it writes to ROMS (tracer_vars()), which additional input variables it can interpret (known_vars()), and how to complete a partially-specified tracer set (process_bgc_fields()).

Two things are enforced at definition/instantiation time rather than at the first call: process_bgc_fields() is abstract (BGCModel() itself raises TypeError), and every concrete subclass must declare a non-empty _TRACER_VARS (checked in __init_subclass__) – an empty tracer set would make the model silently derive and fill nothing. Intermediate subclasses that leave process_bgc_fields() abstract are exempt from the tracer check.

Methods

BGCModel.known_vars()

Return every variable the model understands.

BGCModel.process_bgc_fields(forcings)

Complete the BGC tracer set across one or more forcing objects.

BGCModel.tracer_vars()

Return the set of tracer variables written to ROMS output.

BGCModel.variable_info()

Per-variable metadata (grid location, vector flags, validation) for all known_vars().

BGCModel.warn_missing(present)

Warn if any expected output tracers are still absent.

Attributes

BGCModel.name