Skip to contents

Calculates the derivative for a single time step and saves the output

Usage

rsim.deriv(Rsim.scenario, sim.year = 0, sim.month = 0, tstep = 0)

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 groups

  • DerivT, numeric net flow; Total Gain - Total Loss at the timestep

  • TotGain, numeric Total Gain, all flows into the group at the timestep

  • TotLoss, numeric Total Loss, all flows out of the group at the timestep

  • FoodGain, numeric flows into the group from consuming prey at the timestep

  • DetritalGain, numeric flows into the group from detritus at the timestep

  • FishingGain, numeric flows into the group from fishing at the timestep

  • UnAssimLoss, numeric flows out of the group due to unassimilated consumption at the timestep

  • ActiveRespLoss, numeric flows out of the group due to "heat loss" at the timtestep

  • FoodLoss, numeric flows out of the group from being consumed by predators at the timestep

  • MzeroLoss, numeric flows out of the group due to unaccounted mortality at the timestep

  • FishingLoss, numeric flows out of the group due to fishing at the timestep

  • DetritalLoss, 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)