Set up biological parameter inputs for closed-loop simulation
Setup_Sim_Biologicals.RdPopulates a simulation list (created by Setup_Sim_Dim) with
biological arrays needed to run the operating model: natural mortality,
weight-at-age (spawning, fishery, and survey), maturity-at-age, ageing
error, and an optional size-age transition matrix for length compositions.
All arrays must conform to the dimension structure stored in sim_list.
Usage
Setup_Sim_Biologicals(
sim_list,
natmort_input,
WAA_input,
WAA_fish_input,
WAA_srv_input,
MatAA_input,
AgeingError_input = NULL,
SizeAgeTrans_input = NULL
)Arguments
- sim_list
Simulation list object returned by
Setup_Sim_Dim, which defines the dimension sizes used to validate all input arrays.- natmort_input
Natural mortality array with dimensions
[n_pop × n_regions × n_yrs × n_ages × n_sexes × n_sims]. Note: natural mortality is not season-specific and therefore lacks ann_seasdimension.- WAA_input
Spawning weight-at-age array with dimensions
[n_pop × n_regions × n_yrs × n_seas × n_ages × n_sexes × n_sims]. Used to compute spawning stock biomass.- WAA_fish_input
Fishery weight-at-age array with dimensions
[n_pop × n_regions × n_yrs × n_seas × n_ages × n_sexes × n_fish_fleets × n_sims]. Used to compute fishery biomass and catch in weight.- WAA_srv_input
Survey weight-at-age array with dimensions
[n_pop × n_regions × n_yrs × n_seas × n_ages × n_sexes × n_srv_fleets × n_sims]. Used to compute survey biomass indices.- MatAA_input
Maturity-at-age array with dimensions
[n_pop × n_regions × n_yrs × n_seas × n_ages × n_sexes × n_sims]. Values should be proportions in \([0, 1]\). Whenrec_lag = 0(age-0 recruitment, set viaSetup_Sim_Rec), maturity at the recruit age (the first age class) must be exactly0for all populations, regions, years, seasons, and sexes – an error is raised otherwise.- AgeingError_input
Ageing error (age-length transition) array with dimensions
[n_yrs × n_model_ages × n_obs_ages × n_sims], where each[n_model_ages × n_obs_ages]slice is a row-stochastic matrix mapping true modelled ages to observed age bins. IfNULL(default), an identity matrix is constructed for each year and simulation, which assumes that modelled and observed age bins are identical in number and alignment. If observed age bins are a subset of modelled ages (e.g., observed ages 2–10 vs. modelled ages 1–10), the default identity matrix will cause a dimensional mismatch. In that case, supply a shifted identity matrix such asdiag(1, n_model_ages)[, obs_age_index]to correctly drop or collapse model ages into observed bins.- SizeAgeTrans_input
Size-age transition matrix array with dimensions
[n_pop × n_regions × n_yrs × n_seas × n_lens × n_ages × n_sexes × n_sims]. Each slice maps age classes to length bins and should be column-stochastic (columns sum to 1). Only required when fitting length compositions; defaults toNULL.
Value
The input sim_list with the following fields added or updated:
$natmortNatural mortality array.
$WAASpawning weight-at-age array.
$WAA_fishFishery weight-at-age array.
$WAA_srvSurvey weight-at-age array.
$MatAAMaturity-at-age array.
$AgeingErrorAgeing error array (identity matrix if not supplied).
$SizeAgeTransSize-age transition array (only added if supplied).