Description Usage Arguments Details Value References Examples
View source: R/calc_ration_growthfac.R
Calculates the amount of food required for fish of a given species and length class to grow according to the von Bertalanffy growth curve in a time step.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | calc_ration_growthfac(
k,
Linf,
nsc,
nfish,
l_bound,
u_bound,
mid,
W_a,
W_b,
phi_min,
vary_growth = TRUE,
growth_eff = 0.5,
growth_eff_decay = 0.11
)
|
k |
A numeric vector of length |
Linf |
A numeric vector of length |
nsc |
A numeric value representing the number of length classes in the model. |
nfish |
A numeric value representing the number of species in the model. |
l_bound |
A numeric vector of length |
u_bound |
A numeric vector of length |
mid |
A numeric vector of length |
W_a |
A numeric vector of length |
W_b |
A numeric vector of length |
phi_min |
A numeric value representing the time step of the model. |
vary_growth |
A logical statement indicating whether growth efficiency should vary for each species ( |
growth_eff |
If |
growth_eff_decay |
A numeric value specifying the rate at which growth efficiency decreases as length approaches |
The weight increments of the i
th species in the j
th length class is calculated by determining the amount an individual will grow in one time step, phi_min
, if it were to follow the von Bertalanffy growth curve
L22=(Linf[i]-mid[j])*(1-exp(-k[i]*phi_min))
.
The weight of a fish at the mid-point of the size class is calculated using the length-weight relationship
wgt[j,i] = a[i]*mid[j]^b[i]
,
and similarly the expected change in weight of the the fish is calculated as
growth_inc = (W_a[i]*L22^W_b[i])
.
It also has a growth efficiency
g_eff[j, i]=(1-(wgt[j,i]/(W_a[i]*Linf[i]^W_b[i]))^growth_eff_decay)*growth_eff
if vary_growth==TRUE
or g_eff[j, i]=growth_eff
otherwise.
ration
is then calculated by
growth_inc*(1/g_eff[j, i])
.
A list object containing ration
, sc_Linf
, wgt
and g_eff
. ration
is a matrix with dimensions nsc
and nfish
representing the amount of food required for fish of a given species and length class to grow according to the von Bertalanffy growth curve in a time step. sc_Linf
is a numeric vector of length nfish
representing the length class at which each species reaches Linf
. wgt
is a matrix with dimensions nsc
and nfish
representing the weight of each species in each length class. g_eff
is a matrix with dimensions nsc
and nfish
representing the growth efficiency of each species in each length class.
von Bertalanffy, L. (1957). Quantitative Laws in Metabolism and Growth. The Quarterly Review of Biology, 32:217-231
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # Set up the inputs to the function - species-independent parameters
nfish <- nrow(NS_par)
nsc <- 32
maxsize <- max(NS_par$Linf)*1.01 # the biggest size is 1% bigger than the largest Linf
l_bound <- seq(0, maxsize, maxsize/nsc); l_bound <- l_bound[-length(l_bound)]
u_bound <- seq(maxsize/nsc, maxsize, maxsize/nsc)
mid <- l_bound+(u_bound-l_bound)/2
# Set up the inputs to the function - species-specific parameters
Linf <- NS_par$Linf # the von-Bertalanffy asymptotic length of each species (cm).
W_a <- NS_par$W_a # length-weight conversion parameter.
W_b <- NS_par$W_b # length-weight conversion parameter.
k <- NS_par$k # the von-Bertalnaffy growth parameter.
Lmat <- NS_par$Lmat # the length at which 50\% of individuals are mature (cm).
# Get phi_min
tmp <- calc_phi(k, Linf, nsc, nfish, u_bound, l_bound, calc_phi_min=FALSE,
phi_min=0.1) # fixed phi_min
phi_min <- tmp$phi_min
# Calculate growth increments
tmp <- calc_ration_growthfac(k, Linf, nsc, nfish, l_bound, u_bound, mid, W_a, W_b, phi_min)
ration <- tmp$ration
sc_Linf <- tmp$sc_Linf
wgt <- tmp$wgt
g_eff <- tmp$g_eff
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.