Set up biological parameter inputs for closed-loop simulation
Source:R/setup_biologicals.R
Setup_Sim_Biologicals.RdSets natural mortality, weight-at-age, maturity-at-age, ageing error and an
optional size-age transition for the operating model. All arrays are validated
against the dimensions in sim_list. Call after Setup_Sim_Dim.
Usage
Setup_Sim_Biologicals(
sim_list,
natmort_input,
WAA_input,
WAA_fish_input,
WAA_srv_input,
MatAA_input,
AgeingError_input = NULL,
AgeingError_fish_input = NULL,
AgeingError_srv_input = NULL,
LenBinMap_input = NULL,
CAAL_LenBinMap_input = NULL,
SizeAgeTrans_input = NULL,
SizeAgeTrans_fish_input = NULL,
SizeAgeTrans_srv_input = NULL
)Arguments
- sim_list
Simulation list returned by
Setup_Sim_Dim.- natmort_input
Natural mortality array, either
[n_pop × n_regions × n_yrs × n_ages × n_sexes × n_sims]or withn_seasbetween years and ages. Values are rates per year in both forms, so mortality within a season is the rate timesseasdur.- WAA_input
Spawning weight-at-age array
[n_pop × n_regions × n_yrs × n_seas × n_ages × n_sexes × n_sims].- WAA_fish_input
Fishery weight-at-age array,
WAA_inputwith ann_fish_fleetsdim before the simulations.- WAA_srv_input
Survey weight-at-age array,
WAA_inputwith ann_srv_fleetsdim before the simulations.- MatAA_input
Maturity-at-age array dimensioned like
WAA_input, in \([0, 1]\). Maturity at the first age must be exactly0underrec_lag = 0, set throughSetup_Sim_Rec.- AgeingError_input
Ageing error array
[n_yrs × n_model_ages × n_obs_ages × n_sims], each slice row-stochastic.NULL(default) builds an identity matrix per year and simulation. For observed bins that are a subset of the model ages, supply a shifted identity such asdiag(1, n_model_ages)[, obs_age_index]instead.- AgeingError_fish_input
Optional per-fleet ageing error for the fishery fleets,
[n_yrs × n_ages × n_obs_ages × n_fish_fleets × n_sims], orNULL(default) to readAgeingError_input.- AgeingError_srv_input
As
AgeingError_fish_inputwithn_srv_fleetsin place ofn_fish_fleets.- LenBinMap_input
Matrix
[n_lens × n_obs_lens]mapping the model's length bins onto the bins the length compositions are recorded on, theLenBinMapofSetup_Mod_Biologicals.NULL(default) when the two coincide.- CAAL_LenBinMap_input
0/1 matrix
[n_lens × n_caal_lens]of the model length bins each conditional age-at-length row covers, theCAAL_LenBinMapofSetup_Mod_Biologicals.NULL(default) gives one row per model bin.- SizeAgeTrans_input
Size-age transition array
[n_pop × n_regions × n_yrs × n_seas × n_lens × n_ages × n_sexes × n_sims], column-stochastic over ages. Only needed when fitting length compositions. DefaultNULL.- SizeAgeTrans_fish_input, SizeAgeTrans_srv_input
Optional per-fleet size-age arrays
[n_pop x n_regions x n_yrs x n_seas x n_lens x n_ages x n_sexes x n_fleets x n_sims], each read at that fleet's own timing and used in place ofSizeAgeTrans_input. The self-test passes the fitted model's own keys here when growth was estimated.