Skip to contents

Calculates daily nitrogen and phosphorus fluxes (ingestion, retention, excretion) for a fish using prey and predator elemental concentrations.

Usage

calculate_nutrient_balance(consumption, weight_gain, processed_nutrient_params)

Arguments

consumption

Vector of consumption by prey type (g/day)

weight_gain

Predator weight gain (g/day)

processed_nutrient_params

List with processed nutrient parameters

Value

List with nutrient results (N and P ingestion, retention, excretion)

Experimental

Nutrient regeneration modelling is an **experimental feature** under active development. This function can be called directly to compute daily N and P fluxes for a single time step, but it is **not yet integrated** into the main `run_fb4()` simulation loop. Full integration (automatic daily nutrient tracking, inclusion in `fb4_result` objects, and TMB backend support) is planned for a future release. The API may change.