Low level API
Agate.Utils.define_tracer_functions
— Functiondefine_tracer_functions(
parameters,
tracers;
auxiliary_fields=[:PAR],
helper_functions=nothing,
sinking_velocities=nothing,
)
Create an Oceananigans.Biogeochemistry model type.
Arguments
parameters
: NamedTuple of values of the form ((<field name> = <default value>, ...)tracers
: Dictionary of the form (<tracer name> => <tracer method expression>, ...)
Keywords
auxiliary_fields
: an iterable of auxiliary field variables, defaults to[:PAR]
helper_functions
: optional path to a file of helper functions used in tracer expressionssinking_velocities
: optional NamedTuple of constant sinking, of fields (i.e.ZFaceField(...)
) for any tracers which sink returned by OceanBioME.Sediments: sinking_tracers.
Note that the field names defined in parameters
can't be any of [:x, :y, :z, :t], as these are reserved for coordinates, and they must include all parameters used in the tracers
expressions.
The tracer expressions must use methods that are either defined within this module or passed in the helper_functions
file.
Example
using Agate
parameters = (α=2 / 3, β=4 / 3, δ=1, γ=1)
tracers = Dict("R" => :(α * R - β * R * F), "F" => :(-γ * F + δ * R * F))
LV = define_tracer_functions(parameters, tracers)