Skip to contents

A fish object has all the life history data needed to model a finfish population

Details

Fish like to swim

Methods


Method new()

Used to store parameters describing the behavior of an object of class Fish

Usage

Fish$new(
  common_name = NA,
  scientific_name = NA,
  linf = NA,
  vbk = NA,
  t0 = -0.5,
  cv_len = 0.1,
  length_units = "cm",
  min_age = 0,
  max_age = NA,
  weight_a = NA,
  weight_b = NA,
  pups = 10,
  weight_units = "kg",
  fec_form = "weight",
  fec_expo = 1,
  length_50_mature = NA,
  length_95_mature = NA,
  delta_mature = 0.1,
  age_50_mature = NA,
  age_95_mature = NA,
  age_mature = NA,
  m = NA,
  steepness = 0.8,
  r0 = 10000,
  ssb0 = NA,
  density_dependence = "global_habitat",
  adult_diffusion = 4,
  recruit_diffusion = 10,
  query_fishlife = T,
  sigma_r = 0,
  rec_ac = 0,
  cores = 4,
  mat_mode = "age",
  default_wb = 2.8,
  tune_weight = FALSE,
  linf_buffer = 1.2,
  resolution = NA,
  patch_area = 1,
  habitat = list(),
  season_blocks = list(),
  recruit_habitat = NA,
  fished_depletion = 1,
  burn_years = 50,
  seasons = 1,
  explt_type = "f",
  init_explt = 0.1,
  get_common_name = FALSE,
  spawning_seasons = NA,
  max_hab_mult = 2,
  lorenzen_m = TRUE
)

Arguments

common_name

common name of the species (can be used to lookup information using taxize and fishlife)

scientific_name

common name of the species (can be used to lookup information in fishlife)

linf

asymptotic length of the species in a von Bertalanffy growth function

vbk

growth parameter k of the species in a von Bertalanffy growth function

t0

hypothetical age at which the fish would have length 0 (e.g. -0.5 years)

cv_len

coefficient of variation around the length at age relationship (in log space)

length_units

units of the length at age function (arbitrary)

min_age

minimum age tracked in the model. Best to leave at 0, as the model does not explicitly track delays for recruitment

max_age

maximum age tracked by the model (individuals this age or older are tracked in the plus group)

weight_a

alpha parameter in the allometric weight function alpha x length ^ beta

weight_b

beta parameter in the allometric weight function alpha x length ^ beta

pups

number of pups per individual for animals with pups rather than larvae

weight_units

units of the allometric weight function (defaults to kg)

fec_form

one of of "weight" (default) or "pups". When "weight", fecundity is a function of weight. When "pups", constant number of pups per individual produced

fec_expo

exponent for fecundity at weight relationship, 1 = isometric > 1 hyperallometric

length_50_mature

length at 50% maturity in a logistic maturity ogive

length_95_mature

length at 95% maturity in a logistic maturity ogive

delta_mature

as an alternative, the different in units of length between length_50_mature and length_95_mature

age_50_mature

age at 50% maturity in a logistic maturity ogive if maturity is age based

age_95_mature

age at 95% maturity in a logistic maturity ogive if maturity is age based

age_mature

an alternative option to just set one age mature, which ends up as the age_50_mature

m

instantaneous natural mortality rate. When lorenzen_m = TRUE, this is the average natural mortality across all ages

steepness

steepness parameter (h) in a Beverton-Holt spawner-recruit function

r0

asymptotic number of recruits under unfished conditions

ssb0

asymptotic spawning stock biomass of recruits under unfished conditions. Tunnes r0 to achieve

density_dependence

timing and nature of density dependence in the Beverton-Holt spawner recruit function, one of one of 'global_habitat','local_habitat','pre_dispersal','post_dispersal','global_ssb'

adult_diffusion

diffusion parameter D in the CTMC movement function for "adults" (not recruits)

recruit_diffusion

diffusion parameter D in the CTMC movement function for recruits

query_fishlife

TRUE or FALSE to query Fishlife for missing life history values. When set to FALSE all required life history values must be supplied by the user

sigma_r

the standard deviation of recruitment deviates in log-normal space

rec_ac

the autocorrelation of recruitment deviates

cores

the number of cores used to tun the weight relationship if used (deprecated)

mat_mode

specifies whether maturity is a function of age (default) or length

default_wb

deprecated

tune_weight

deprecated

linf_buffer

multiplier around linf to create length at age key, taking into account that some fish will be larger than Linf

resolution

a vector of length two with number of patches in X and Y dimensions

patch_area

area of each patch (e.g. KM2)

habitat

a matrix with dimensions X and Y specifying quality of adult (non-recruit) habitat. Determines taxis matrix

season_blocks

list with elements indicating blocks of seasons. For example, if there are four seasons, setting season_blocks = list(c(1,2),c(3,4)) indicates that seasons 1 and 2 are one block, 3 and 4 another. Allows for the model to be run at fine time scales while allowing some processes like movement or spawning to operate at coarser scales

recruit_habitat

a matrix with dimensions X and Y with quality of recruit habitat (scales r0 in space as well as recruit diffusion under applicable forms of density dependence)

fished_depletion

depletion (SSB/SSB0) under initial fished conditions

burn_years

number of years used to burn in the population to tune parameters without analytical solutions like SSB0

seasons

number of seasons per year. 4 would indicate quarterly time steps, 12 monthly, 365 daily.

explt_type

deprecated plot object of class fish

init_explt

instantaneous fishing mortality rate under initial fished conditions

get_common_name

TRUE or FALSE to lookup common name from scientific name. Requires internet connection

spawning_seasons

seasons in which spawning occurs

max_hab_mult

maximum value of that habitat matrix multiplier (to prevent some habitats from being >>> good, defaults to 2)

lorenzen_m

TRUE or FALSE to use the Lorenzen function to calculate natural mortality at age


Method plot()

Usage

Fish$plot(type = 2)

Arguments

type

Returns

a plot of the life history values Swim

Swim advances the population one time step


Method swim()

Usage

Fish$swim(
  burn_steps = 0,
  season = 1,
  f_p_a = NULL,
  last_n_p_a = NULL,
  adult_movement = NULL,
  tune_unfished = 0,
  rec_devs = NA
)

Arguments

burn_steps

number of steps for burn in period if applicable

season

the current season

f_p_a

matrix of fishing mortality by patch and age

last_n_p_a

matrix of initial numbers by patch and age

adult_movement

the adult movement matrix

tune_unfished

boolean indicating whether to tune unfished

rec_devs

externally supplied recruitment deviates

Returns

the population in the next time step


Method clone()

The objects of this class are cloneable with this method.

Usage

Fish$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.