Allometry
Agate.Library.Allometry — Module
Utilities for size-dependent traits and interaction matrices.
Agate.Library.Allometry.AbstractParamDef — Type
AbstractParamDefAbstract supertype for construction-time parameter definitions.
Concrete parameter definitions describe how scalar or size-dependent parameter values are materialized during model construction.
Agate.Library.Allometry.AllometricParam — Type
AllometricParam(model, coeffs)
AllometricParam(model; kwargs...)Parameter definition evaluated from an allometric model and coefficient bundle.
Agate.Library.Allometry.ConstantParam — Type
ConstantParam(value)Parameter definition whose value is constant across all SizeClasses.
Agate.Library.Allometry.PalatabilityPredatorParameters — Type
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.
Agate.Library.Allometry.PalatabilityPreyParameters — Type
PalatabilityPreyParameters(diameter, protection)Prey traits used by allometric palatability kernels.
Fields
diameter: prey equivalent spherical diameter.protection: dimensionless prey protection factor, where0means no protection and1means complete protection in the protected palatability kernel.
Agate.Library.Allometry.PowerLaw — Type
PowerLaw()Callable allometric power-law model using spherical cell volume.
Agate.Library.Allometry.PowerLaw — Method
PowerLaw()(coeffs, diameter)Evaluate a PowerLaw allometric model.
Arguments
coeffs: named tuple withprefactorandexponententries.diameter: equivalent spherical diameter $d$.
Agate.Library.Allometry.allometric_palatability_unimodal — Method
allometric_palatability_unimodal(prey, predator)Compute unimodal allometric palatability from predator and prey diameters.
\[\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).
Agate.Library.Allometry.allometric_palatability_unimodal_protection — Method
allometric_palatability_unimodal_protection(prey, predator)Compute unimodal allometric palatability with multiplicative prey protection.
Agate.Library.Allometry.allometric_scaling_power — Method
allometric_scaling_power(a, b, diameter)Evaluate a power-law allometric scaling against spherical cell volume.
\[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.
Light
Agate provides reusable light formulations. Gridded PAR fields and their Oceananigans integration are provided by OceanBioME's PrescribedPhotosyntheticallyActiveRadiation.
Agate.Library.Light.CyclicalPAR — Type
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.
Agate.Library.Light.cyclical_par_at_depth — Method
cyclical_par_at_depth(z, t)Evaluate the idealized seasonal photosynthetically active radiation (PAR) field at depth z and time t.
\[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.
Mortality
Agate.Library.Mortality.linear_loss — Method
linear_loss(P, rate)Linear mortality (loss) rate.
Arguments
P: plankton concentrationrate: mortality (loss) rate
Nutrients
Agate.Library.Nutrients.frank_tnorm — Method
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.
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.
Agate.Library.Nutrients.liebig_minimum — Method
liebig_minimum(a, b, rest...)
liebig_minimum(values::NTuple)Return the minimum of the supplied limitation factors while preserving NaN propagation.
Agate.Library.Nutrients.monod_limitation — Method
monod_limitation(R, K)Return Monod (Michaelis-Menten) nutrient limitation $R / (K + R)$. The indeterminate R == K == 0 case returns zero.
Agate.Library.Nutrients.normalized_droop_limitation — Method
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.
Agate.Library.Nutrients.quota_uptake_regulation — Method
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.
Photosynthesis
Agate.Library.Photosynthesis — Module
Light-response kernels used by phytoplankton growth formulations.
Agate.Library.Photosynthesis.geider_light_response — Method
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.
Agate.Library.Photosynthesis.smith_light_limitation — Method
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.
Predation
Agate.Library.Predation — Module
Predation and grazing kernels.
Agate.Library.Predation.holling_type_ii — Method
holling_type_ii(P, K)Return the Holling (1959) type-II functional response $P / (K + P)$. The indeterminate P == K == 0 case returns zero.
Agate.Library.Predation.preferential_predation_loss — Method
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.
Remineralization
Agate.Library.Remineralization.linear_remineralization — Method
linear_remineralization(D, rate)Idealized remineralization of detritus into dissolved nutrients.
Arguments
D: detritus concentrationrate: remineralization rate
Temperature
Agate.Library.Temperature.q10_temperature_factor — Method
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 CelsiusQ10: Q10 coefficientreference_temperature: reference temperature in degrees Celsius