Learn R Programming

mizer (version 3.0.0)

getFlux: Get flux into size bins

Description

Calculates the flux \(J_i(w)\) (numbers/year) entering each size class from the one below it. This is composed of an advective flux from somatic growth and a diffusive flux from the redistribution of individuals.

Usage

getFlux(object, ..., power = 0)

Value

  • MizerParams: An ArraySpeciesBySize object (species x size) with the flux entering each size class. The units are numbers/year when power = 0 and g^power/year otherwise.

  • MizerSim: An ArrayTimeBySpeciesBySize object (time step x species x size) with the flux at every time step. If drop = TRUE then dimensions of length 1 will be removed.

Arguments

object

A MizerParams or MizerSim object.

...

Additional arguments that depend on the class of object.

For a MizerParams object:

n

A matrix of species abundances (species x size). Defaults to the initial abundances stored in object.

n_pp

A vector of the resource abundance by size. Defaults to the initial resource abundance stored in object.

n_other

A named list of the abundances of other dynamical components. Defaults to the initial values stored in object.

t

The time for which to do the calculation. Defaults to 0.

For a MizerSim object:

time_range

The time range over which to return the rates. Either a vector of values, a vector of min and max time, or a single value. Defaults to the whole time range of the simulation.

drop

If TRUE then any dimension of length 1 is removed from the returned array.

power

The flux at weight \(w\) is multiplied by \(w\) raised to power. The default power = 0 gives the flux of individuals (numbers/year), whereas power = 1 gives the flux of biomass (grams/year).

Details

At the recruitment size, the flux is simply the recruitment rate \(R_{dd,i}\) (see getRDD()). For sizes below the recruitment size the flux is zero.

The flux at weight \(w\) is multiplied by \(w\) raised to the power given by the power argument, similar to the power argument of plotSpectra(). The default power = 0 returns the flux of individuals (numbers/year). With power = 1 the result is the flux of biomass (grams/year).

See Also

getEGrowth(), getRDD()

Other rate functions: getDiffusion(), getEGrowth(), getERepro(), getEReproAndGrowth(), getEncounter(), getFMort(), getFMortGear(), getFeedingLevel(), getMort(), getPredMort(), getPredRate(), getRDD(), getRDI(), getRates(), getResourceMort()

Examples

Run this code
# \donttest{
params <- NS_params
# Project with constant fishing effort for all gears for 20 time steps
sim <- project(params, t_max = 20, effort = 0.5)
# Get the flux at a particular time step
flux <- getFlux(params, n = N(sim)[15, , ], n_pp = NResource(sim)[15, ], t = 15)
# Flux for Sprat of size 2g
flux["Sprat", "2"]
# }

Run the code above in your browser using DataLab