API reference
Introspection
Agate.Introspection.model_summary — Function
model_summary(bgc) -> NamedTupleReturn a compact summary of a constructed biogeochemistry instance.
The returned NamedTuple contains:
tracers::Vector{Symbol}auxiliary_fields::Vector{Symbol}parameters::Vector{Symbol}has_sinking_velocities::Bool
Agate.Introspection.describe — Function
describe([io], bgc; verbose=false)Print a human-readable summary of bgc.
Set verbose=true to print full tracer / parameter lists.
Agate.Introspection.tracer_names — Function
tracer_names(bgc) -> Vector{Symbol}Return the ordered tracer symbols required by bgc.
This helper is intended for interactive inspection, so it materializes the underlying tracer-name tuple as a Vector{Symbol}.
The ordering matches Oceananigans / OceanBioME state-vector conventions.
Agate.Introspection.auxiliary_field_names — Function
auxiliary_field_names(bgc) -> Vector{Symbol}Return the ordered auxiliary field symbols required by bgc.
Auxiliary fields are non-tracer state fields (for example, light or temperature) that appear in tracer tendencies.
Agate.Introspection.parameter_names — Function
parameter_names(bgc) -> Vector{Symbol}Return the parameter keys available on bgc.parameters.
This list describes the resolved parameter fields available on the constructed biogeochemistry instance.
Agate.Introspection.plankton_groups — Function
plankton_groups(bgc) -> NamedTupleReturn a NamedTuple mapping plankton group symbols to the tracer symbols in each group. The group and tracer order follows the constructed runtime tracer layout.
Agate.Introspection.plankton_tracers — Function
plankton_tracers(bgc) -> Vector{Symbol}Return all plankton tracer symbols as a flat vector in runtime group order.
Agate.Introspection.plankton_diameters — Function
plankton_diameters(bgc) -> VectorReturn the equivalent spherical diameters for plankton tracers in the same order as plankton_tracers(bgc). Models without plankton diameter metadata return an empty vector.
Agate.Introspection.nonplankton_tracers — Function
nonplankton_tracers(bgc) -> Vector{Symbol}Return the tracer symbols that are not part of a plankton group.
Agate.Introspection.tracer_groups — Function
tracer_groups(bgc) -> NamedTupleReturn a structural grouping summary of the constructed tracer layout.
Agate.Introspection.interaction_matrix — Function
interaction_matrix(bgc, kind::Symbol) -> NamedTupleReturn an interaction matrix with consumer and prey labels.
Supported kind values are the available interaction matrix fields, such as :palatability and :assimilation. The returned NamedTuple contains kind, matrix, rows, columns, row_axis, and column_axis. Matrix orientation follows the runtime container: rows are consumers and columns are prey.
Interaction matrix introspection
using Agate
using Agate.Introspection
bgc = Agate.Models.NiPiZD.construct()
pal = interaction_matrix(bgc, :palatability)
pal.rows # consumer labels
pal.columns # prey labels
pal.matrix # consumer-by-prey matrixConstruction API
Agate.Manifests.export_manifest — Function
export_manifest(path, setup) -> pathWrite an Agate model setup manifest to path as pretty-printed JSON.
Agate.Manifests.construct_from_manifest — Function
construct_from_manifest(setup; grid=nothing, arch=nothing) -> bgc
construct_from_manifest(path::AbstractString; grid=nothing, arch=nothing) -> bgcReconstruct an Agate biogeochemistry object from an exported model setup.
Agate.Configuration.PFTSpecification — Type
Container for plankton functional-type specifications.
PFTSpecification wraps a NamedTuple of per-PFT traits and descriptors.
Agate.Factories.AbstractBGCFactory — Type
Abstract supertype for biogeochemical model factories.
Agate.Equations.CompiledEquation — Type
Wrap a callable tracer equation in a concrete, type-stable container.
CompiledEquation stores the kernel-callable function used for a single tracer tendency.
Agate.Construction.define_tracer_functions — Function
define_tracer_functions(parameters, tracers; auxiliary_fields=(:PAR,), tracer_index=nothing, sinking_velocities=nothing)Create an AgateBGCFactory from compiled tracer equations.
tracers must be a NamedTuple that maps tracer names to CompiledEquation values. Each wrapped callable must accept the Oceananigans biogeochemistry kernel signature
f(bgc, x, y, z, t, tracers..., auxiliary_fields...)Keyword arguments
auxiliary_fields: ordered auxiliary values appended to the tracer argument list.tracer_index: explicit positional tracer index. When omitted, a scalar-only index is built fromkeys(tracers).sinking_velocities: optional prebuilt sinking-velocity fields stored on the resulting factory.
Plankton communities and size structure
Agate.Configuration.build_plankton_community — Function
Build a plankton community from a base community spec.
This helper updates the size structure for one or more plankton groups, leaving all other group fields intact. Size-class counts are inferred from explicit diameter vectors or read from structured size definitions.
The ordering of groups in the returned NamedTuple is the ordering of base (i.e. keys(base)).
Keywords
diameters=(; ...): optional per-group size-structure inputs, keyed by group symbol.
Accepted size-structure inputs
Each group size structure must define class diameters either as a generated range or as explicit values. Accepted public forms are:
(n=3, min_esd=1, max_esd=10, splitting=:log_splitting)for a generated range.[1.0, 3.2, 10.0]for explicit class diameters.
Examples
community = build_plankton_community(base;
diameters=(Z=zoo_size_structure, P=phyto_size_structure),
)