Skip to contents

[Experimental] Scales the search volume, the maximum consumption rate, the metabolic rate and the external encounter rate all by the same factor in order to achieve a growth rate that allows individuals to reach their maturity size by their maturity age while keeping the feeding level and the critical feeding level unchanged. Then recalculates the size spectra using steadySingleSpecies().

Usage

matchGrowth(
  params,
  species = NULL,
  keep = c("egg", "biomass", "number"),
  info_level = default_info_level(),
  ...
)

Arguments

params

A MizerParams object

species

The species to be affected. Optional. By default all species for which growth information is available will be affected. A vector of species names, or a numeric vector with the species indices, or a logical vector indicating for each species whether it is to be affected (TRUE) or not.

keep

A string determining which quantity is to be kept constant. The choices are "egg" which keeps the egg density constant, "biomass" which keeps the total biomass of the species constant and "number" which keeps the total number of individuals constant.

info_level

Controls the amount of information messages that are shown. Higher levels lead to more messages, info_level = 0 gives silence. The default is taken from the mizer_info_level option, see default_info_level().

...

Additional arguments passed to the method.

Value

A modified MizerParams object with rescaled search volume, maximum consumption rate and metabolic rate and rescaled species parameters gamma,h, ks and k.

Details

Maturity size and age are taken from the w_mat and age_mat columns in the species_params data frame. If age_mat is missing, mizer calculates it from the von Bertalanffy growth curve parameters using age_mat_vB(). If those are not available either for a species, the growth rate for that species will not be changed.

Examples

# Rescale rates so all species reach maturity by their maturity age.
# The search volume gamma is adjusted to achieve the correct growth rate.
species_params(NS_params)["Cod", "gamma"]
#> [1] 1.599016e-10
params <- matchGrowth(NS_params)
#>  No `a` column so using a = 0.01 in w = a l^b, with w in g and l in cm.
#>  No `b` column so using the isometric default b = 3 in w = a l^b.
#>  `matchGrowth()` has rescaled the model and so moved it off its steady state. Run `tuneSteadyState()` to settle it again. You can check with `getSteadyResidual()`.
species_params(params)["Cod", "gamma"]
#> [1] 2.351462e-10
age_mat(params)["Cod"]
#>  No `a` column so using a = 0.01 in w = a l^b, with w in g and l in cm.
#>  No `b` column so using the isometric default b = 3 in w = a l^b.
#>  No `a` column so using a = 0.01 in w = a l^b, with w in g and l in cm.
#>  No `b` column so using the isometric default b = 3 in w = a l^b.
#>  No `a` column so using a = 0.01 in w = a l^b, with w in g and l in cm.
#>  No `b` column so using the isometric default b = 3 in w = a l^b.
#>  No `a` column so using a = 0.01 in w = a l^b, with w in g and l in cm.
#>  No `b` column so using the isometric default b = 3 in w = a l^b.
#>      Cod 
#> 1.954054