Calculates the derivative for a single time step and saves the output
Arguments
- Rsim.scenario
Scenario object that contains all of the rsim rates and forcing functions generated by
rsim.scenario().- sim.year
Will inherit from apply functions
- sim.month
Will inherit from apply functions
- tstep
Sub-monthly time step usually set to 0.
Value
a data.frame object of model group (rows) values for 12 derivatives (columns):
Species, character names of model groupsDerivT, numeric net flow; Total Gain - Total Loss at the timestepTotGain, numeric Total Gain, all flows into the group at the timestepTotLoss, numeric Total Loss, all flows out of the group at the timestepFoodGain, numeric flows into the group from consuming prey at the timestepDetritalGain, numeric flows into the group from detritus at the timestepFishingGain, numeric flows into the group from fishing at the timestepUnAssimLoss, numeric flows out of the group due to unassimilated consumption at the timestepActiveRespLoss, numeric flows out of the group due to "heat loss" at the timtestepFoodLoss, numeric flows out of the group from being consumed by predators at the timestepMzeroLoss, numeric flows out of the group due to unaccounted mortality at the timestepFishingLoss, numeric flows out of the group due to fishing at the timestepDetritalLoss, numeric flows out of the group to detritus at the timestep
Examples
# Read in Rpath parameter file and generate model object
Rpath <- rpath(AB.params)
# Create a 50 yr Rsim scenario
Rsim.scenario <- rsim.scenario(Rpath, AB.params, years = 1:50)
# Calculate derivatives for year 2, month 6, first timestep
Rsim.deriv <- rsim.deriv(Rsim.scenario, sim.year=2, sim.month = 6, tstep = 0)
