Skip to content

Commit afb33c7

Browse files
committed
matchGrowth() now also rescales the external encounter rate.
1 parent 5fb6f2a commit afb33c7

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

NEWS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Development version
22

3+
- `matchGrowth()` now also rescales the external encounter rate.
34
- `setExtEncounter()` no longer resets the external encounter rate to zero when
45
called without the `ext_encounter` argument.
5-
66
- The function `plotBiomassObservedVsModel()` now plots the ratio of modelled
77
to observed biomass as default (`ratio = T`), as this is more useful visually to
88
see how far off modelled biomass is from observed biomass.

R/matchGrowth.R

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#' Adjust model to produce observed growth
22
#'
3-
#' Scales the search volume, the maximum consumption rate and the metabolic rate
3+
#' Scales the search volume, the maximum consumption rate, the metabolic rate
4+
#' and the external encounter rate
45
#' all by the same factor in order to achieve a growth rate that allows
56
#' individuals to reach their maturity size by their maturity age while keeping
67
#' the feeding level and the critical feeding level unchanged. Then recalculates
@@ -51,6 +52,7 @@ matchGrowth <- function(params, species = NULL,
5152
params@search_vol[sel, ] <- params@search_vol[sel, ] * factor
5253
params@intake_max[sel, ] <- params@intake_max[sel, ] * factor
5354
params@metab[sel, ] <- params@metab[sel, ] * factor
55+
params@ext_encounter[sel] <- params@ext_encounter[sel] * factor
5456
params@species_params$gamma[sel] <- sp$gamma[sel] * factor
5557
params@species_params[sel, "h"] <- sp[sel, "h"] * factor
5658
if ("ks" %in% names(sp)) {

man/matchGrowth.Rd

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)