project_therMizer | R Documentation |
Runs the size-based model simulation and projects the size based model
through time. project_therMizer
is called using an object of type
therMizerParams, an object that contains the effort of the
fishing gears through time, and an object that contains the ocean temperature
in each realm through time. The method returns an object of type
therMizerSim which can then be explored with a range of summary and
plotting methods.
Project without an effort or ocean_temp argument.
Project with a constant effort and ocean_temp.
Project with time varying effort and ocean temperature
project_therMizer(object, effort, ocean_temp, n_plank, ...)
## S4 method for signature 'therMizerParams,missing,missing,missing'
project_therMizer(object,
effort, ocean_temp, n_plank, ...)
## S4 method for signature 'therMizerParams,numeric,numeric,numeric'
project_therMizer(object,
effort, ocean_temp, n_plank, t_max = 100, dt = 0.1, ...)
## S4 method for signature 'therMizerParams,array,array,array'
project_therMizer(object, effort,
ocean_temp, n_plank, t_save = 1, dt = 0.1,
initial_n = get_initial_n(object), initial_n_pp = object@cc_pp, ...)
object |
A |
effort |
The effort of each fishing gear through time. See notes below. |
ocean_temp |
The ocean temperature in each oceanic realm through time. See notes below. |
n_plank |
The log10 abundance-at-size for the plankton community. Has the dimensions of time step (or constant) x size. |
... |
Currently unused. |
t_max |
The maximum time the projection runs for. The default value is
100. However, this argument is not needed if an array is used for the
|
dt |
Time step of the solver. The default value is 0.1. |
t_save |
The frequency with which the output is stored. The default value is 1. |
initial_n |
The initial populations of the species. See the notes below. |
initial_n_pp |
The initial population of the background spectrum. It
should be a numeric vector of the same length as the |
An object of type therMizerSim
.
The effort
argument specifies the level of fishing effort during
the simulation. It can be specified in three different ways:
A single numeric value. This specifies the effort of all fishing gears which is constant through time (i.e. all the gears have the same constant effort).
A numerical vector which has the same length as the number of fishing
gears. The vector must be named and the names must correspond to the gear
names in the therMizerParams
object. The values in the vector specify the
constant fishing effort of each of the fishing gears, i.e. the effort is
constant through time but each gear may have a different fishing effort.
A numerical array with dimensions time step x gear. This specifies the
fishing effort of each gear at each time step. The first dimension, time,
must be named numerically and contiguously. The second dimension of the array
must be named and the names must correspond to the gear names in the
therMizerParams
argument.
If effort is specified as an array then the t_max
argument is ignored
and the maximum simulation time is the taken from the dimension names.
The ocean_temp
argument specifies the ocean temperature during the
simulation. It can be specified in three different ways:
A single numeric value. This specifies the temperature in all realms which is constant through time (i.e., all realms have the same constant temperature).
A numerical vector which has the same length as the number of realms.
The vector must be named and the names must correspond to the realm names in
the therMizerParams
object. The values in the vectory specify the
constant temperature for each of the realms, i.e., the temperature is
constant through time but each realm may have a different temperature.
A numerical array with dimensions time step x realm. This specifies
the temperature in each realm at each time step. The first dimenions, time,
must be named numerically and contiguously. The second dimension of the array
must be named and the names must correspond to the realm names in the
therMizerParams
argument.
If ocean_temp is specified as an array then the t_max
argument is ignored
and the maximum simulation time is taken from the dimension names
The initial_n
argument is a matrix with dimensions species x size. The
order of species must be the same as in the therMizerParams
argument. If
the initial population is not specified, the argument is set by default by
the get_initial_n
function which is set up for a North Sea model.
therMizerParams
## Not run:
# Data set with different fishing gears
data(NS_species_params_gears)
data(inter)
params <- therMizerParams(NS_species_params_gears, inter)
# With constant fishing effort for all gears for 20 time steps
sim <- project_therMizer(params, t_max = 20, effort = 0.5)
# With constant fishing effort which is different for each gear
effort <- c(Industrial = 0, Pelagic = 1, Beam = 0.5, Otter = 0.5)
sim <- project_therMizer(params, t_max = 20, effort = effort)
# With fishing effort that varies through time for each gear
gear_names <- c("Industrial","Pelagic","Beam","Otter")
times <- seq(from = 1, to = 10, by = 1)
effort_array <- array(NA, dim = c(length(times), length(gear_names)),
dimnames = list(time = times, gear = gear_names))
effort_array[,"Industrial"] <- 0.5
effort_array[,"Pelagic"] <- seq(from = 1, to = 2, length = length(times))
effort_array[,"Beam"] <- seq(from = 1, to = 0, length = length(times))
effort_array[,"Otter"] <- seq(from = 1, to = 0.5, length = length(times))
sim <- project_therMizer(params, effort = effort_array)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.