Allometry

Agate.Library.Allometry.AbstractParamDefType
AbstractParamDef

Abstract supertype for construction-time parameter definitions.

Concrete parameter definitions describe how scalar or size-dependent parameter values are materialized during model construction.

source
Agate.Library.Allometry.AllometricParamType
AllometricParam(model, coeffs)
AllometricParam(model; kwargs...)

Parameter definition evaluated from an allometric model and coefficient bundle.

Formulation

\[p(d_i) = model(coeffs, d_i)\]

where model is a callable and coeffs is a named tuple of coefficients. The keyword constructor stores kwargs as the coefficient named tuple.

source
Agate.Library.Allometry.ConstantParamType
ConstantParam(value)

Parameter definition whose value is constant across all SizeClasses.

Formulation

\[p(d_i) = p_0\]

where $p_0$ is value and $d_i$ is any SizeClass diameter.

source
Agate.Library.Allometry.PalatabilityPredatorParametersType
PalatabilityPredatorParameters(diameter, optimum_predator_prey_ratio, specificity)

Predator traits used by allometric palatability kernels.

Fields

  • diameter: predator equivalent spherical diameter.
  • optimum_predator_prey_ratio: preferred predator:prey diameter ratio.
  • specificity: sharpness of the unimodal prey-size preference.
source
Agate.Library.Allometry.PalatabilityPreyParametersType
PalatabilityPreyParameters(diameter, protection)

Prey traits used by allometric palatability kernels.

Fields

  • diameter: prey equivalent spherical diameter.
  • protection: dimensionless prey protection factor, where 0 means no protection and 1 means complete protection in the protected palatability kernel.
source
Agate.Library.Allometry.PowerLawType
PowerLaw()

Callable allometric power-law model using spherical cell volume.

Formulation

\[p(d) = a V(d)^b, \qquad V(d) = \frac{4}{3}\pi\left(\frac{d}{2}\right)^3\]

The expected coefficient names are prefactor for $a$ and exponent for $b$.

source
Agate.Library.Allometry.PowerLawMethod
PowerLaw()(coeffs, diameter)

Evaluate a PowerLaw allometric model.

Formulation

\[p(d) = a V(d)^b, \qquad V(d) = \frac{4}{3}\pi\left(\frac{d}{2}\right)^3\]

Arguments

  • coeffs: named tuple with prefactor and exponent entries.
  • diameter: equivalent spherical diameter $d$.
source
Agate.Library.Allometry.allometric_palatability_unimodalMethod
allometric_palatability_unimodal(prey, predator)

Compute unimodal allometric palatability from predator and prey diameters.

Formulation

\[\eta = \left[1 + \left(\frac{d_{pred}}{d_{prey}} - \rho^*\right)^2\right]^{-\sigma}\]

where $d_{pred}$ and $d_{prey}$ are predator and prey diameters, $\rho^*$ is the optimum predator:prey diameter ratio, and $\sigma$ is the specificity parameter.

Arguments

  • prey: PalatabilityPreyParameters(diameter, protection).
  • predator: PalatabilityPredatorParameters(diameter, optimum_predator_prey_ratio, specificity).
source
Agate.Library.Allometry.allometric_palatability_unimodal_protectionMethod
allometric_palatability_unimodal_protection(prey, predator)

Compute unimodal allometric palatability with multiplicative prey protection.

Formulation

\[\eta = (1 - p)\left[1 + \left(\frac{d_{pred}}{d_{prey}} - \rho^*\right)^2\right]^{-\sigma}\]

where $p$ is prey.protection. p = 0 leaves the allometric palatability unchanged, while larger values reduce palatability.

source
Agate.Library.Allometry.allometric_scaling_powerMethod
allometric_scaling_power(a, b, diameter)

Evaluate a power-law allometric scaling against spherical cell volume.

Formulation

\[f(d) = a V(d)^b, \qquad V(d) = \frac{4}{3}\pi\left(\frac{d}{2}\right)^3\]

where $d$ is equivalent spherical diameter, $V$ is spherical cell volume, $a$ is the prefactor, and $b$ is the exponent.

Arguments

  • a: scale/prefactor parameter.
  • b: exponent parameter.
  • diameter: cell equivalent spherical diameter.
source

Light

Agate provides reusable light formulations. Gridded PAR fields and their Oceananigans integration are provided by OceanBioME's PrescribedPhotosyntheticallyActiveRadiation.

Agate.Library.Light.CyclicalPARType
CyclicalPAR(z)

Cyclical, depth-attenuated PAR evaluated at fixed depth z. CyclicalPAR(z)(t) is convenient for box models and direct time-series evaluation. For gridded models, use cyclical_par_at_depth(z, t) in a spatial function passed to Oceananigans.Fields.FunctionField.

Formulation

60 * (1 - cos((t + 15days) * 2π / year)) * (1 / (1 + 0.2 * exp(-((mod(t, year) - 200days) / 50days)^2))) + 2

with depth attenuation:

PAR(z, t) = PAR⁰(t) * exp(0.2 * z)

source
Agate.Library.Light.cyclical_par_at_depthMethod
cyclical_par_at_depth(z, t)

Evaluate the idealized seasonal photosynthetically active radiation (PAR) field at depth z and time t.

Formulation

\[I_0(t) = 60\left[1 - \cos\left(\frac{2\pi(t + 15\,days)}{year}\right)\right] \left[1 + 0.2\exp\left(-\left(\frac{mod(t, year)-200\,days}{50\,days}\right)^2\right)\right]^{-1} + 2\]

with vertical attenuation

\[I(z,t) = I_0(t)\exp(0.2z).\]

In Oceananigans coordinates, negative z is below the surface, so exp(0.2z) attenuates light with depth.

source

Mortality

Agate.Library.Mortality.linear_lossMethod
linear_loss(P, rate)

Linear mortality (loss) rate.

Formulation

$l$ * $P$

where:

  • $P$ = plankton concentration
  • $l$ = mortality (loss) rate

Arguments

  • P: plankton concentration
  • rate: mortality (loss) rate
source

Nutrients

Agate.Library.Nutrients.frank_tnormMethod
frank_tnorm(a, b, rest...; sharpness = 50)
frank_tnorm(values::NTuple; sharpness = 50)

Return the differentiable Frank t-norm approximation to Liebig's minimum for normalized limitation factors in [0, 1].

For two limitation factors a and b, let q = exp(-s), where s is sharpness. The Frank t-norm is

q = exp(-s)
F(a, b) = log(1 + ((q^a - 1) * (q^b - 1)) / (q - 1)) / log(q)

Positive sharpness values give the minimum-like branch of the Frank family, with larger values approaching liebig_minimum(a, b). The implementation uses an equivalent shifted form for numerical stability. For more than two factors, the associative binary operator is applied successively.

1 is the neutral element and 0 is absorbing. Finite sharpness provides a smooth derivative transition through nutrient co-limitation for automatic differentiation. The default sharpness = 50 keeps that transition localized while retaining a smooth crossover. Finite sharpness can underestimate the hard minimum when several small limitation factors are similar; increasing sharpness reduces that discrepancy while narrowing the smooth transition.

Domain

The Frank t-norm is defined for normalized limitation factors in [0, 1]. Inputs outside this interval can violate the minimum-like bounds or produce non-finite values.

sharpness is supplied explicitly as a numerical parameter; formulation identity is represented separately by the process-authoring layer.

source
Agate.Library.Nutrients.normalized_droop_limitationMethod
normalized_droop_limitation(internal, reference, minimum_quota, maximum_quota)

Return a normalized Droop growth limitation from an internal nutrient inventory and reference biomass inventory. The implied quota is internal / reference; limitation is zero at or below minimum_quota and one at or above maximum_quota. Between those bounds, the classical Droop response 1 - minimum_quota / quota is normalized so that maximum_quota maps exactly to one. Zero or negative reference biomass returns zero.

source
Agate.Library.Nutrients.quota_uptake_regulationMethod
quota_uptake_regulation(internal, reference, minimum_quota, maximum_quota, hill)

Return the bounded cellular-capacity factor used to regulate external nutrient uptake. The response is one at or below minimum_quota, declines with normalized quota according to hill, and is zero at or above maximum_quota. Zero or negative reference biomass returns zero so an absent plankton has no uptake capacity.

source

Photosynthesis

Agate.Library.Photosynthesis.geider_light_responseMethod
geider_light_response(PAR, alpha, maximum_rate, chlorophyll_to_carbon_ratio)

Evaluate the dimensionless Geider light-response factor.

\[L_G(I) = 1 - \exp\left(-\frac{\alpha^{chl}\theta^C I}{\mu_{max}}\right)\]

PAR is photosynthetically active radiation, alpha is the chlorophyll-specific initial slope, chlorophyll_to_carbon_ratio is $\theta^C$, and maximum_rate is the enclosing growth-process rate scale. Multiplying the returned factor by maximum_rate gives the light-dependent growth scale.

source
Agate.Library.Photosynthesis.smith_light_limitationMethod
smith_light_limitation(PAR, alpha, maximum_rate)

Evaluate the dimensionless Smith (1936) light-limitation factor.

\[L_S(I) = \frac{\alpha I}{\sqrt{\mu_{max}^2 + (\alpha I)^2}}\]

PAR is photosynthetically active radiation, alpha is the initial photosynthetic slope, and maximum_rate is the enclosing growth-process rate scale.

source

Predation

Agate.Library.Predation.preferential_predation_lossMethod
preferential_predation_loss(
    inventory, reference_inventory, consumer, maximum_grazing_rate,
    half_saturation, palatability
)

Return preferential grazing loss from one prey-state inventory, using reference_inventory to determine the shared grazing intensity.

source

Remineralization

Agate.Library.Remineralization.linear_remineralizationMethod
linear_remineralization(D, rate)

Idealized remineralization of detritus into dissolved nutrients.

Formulation

r * D

where:

  • D = detritus concentration
  • r = remineralization rate

Arguments

  • D: detritus concentration
  • rate: remineralization rate
source

Temperature

Agate.Library.Temperature.q10_temperature_factorMethod
q10_temperature_factor(T, Q10)
q10_temperature_factor(T, Q10, reference_temperature)

Compute the Q10 temperature factor relative to a reference temperature. The two-argument form uses a reference temperature of zero.

Arguments

  • T: temperature in degrees Celsius
  • Q10: Q10 coefficient
  • reference_temperature: reference temperature in degrees Celsius
source