Run the annual cycle for a single simulation year
run_annual_cycle.RdOrchestrates the complete annual sequence of operating model processes for
year y and simulation replicate sim: initialises age
structure and generates first-year recruitment at y = 1; applies
population dynamics (movement, mortality, biomass); generates fishery
catches, indices, and compositions; generates survey indices and
compositions; releases conventional tags; generates fishery tag
recaptures (when any use_conv_fish_tagging = 1); and generates
recruitment for the following year (y + 1) when y < n_yrs.
Arguments
- y
Integer. Year index.
- sim
Integer. Simulation replicate index.
- sim_env
Simulation environment created by
Setup_sim_envand passed by reference. All annual-cycle helper functions modify this environment in place.
Details
The two standalone generate_recruitment() calls described above
(at y = 1 and for y + 1) only run when rec_lag != 0.
For rec_lag = 0 (age-0 recruitment), recruitment for year y
depends on year y's own SSB, which isn't known until
apply_pop_dy reaches spawn_seas within that year -
generate_recruitment() is called from inside apply_pop_dy()
instead, once that SSB is available.