Introduction

Now we delve into the calculation of true age classes and weight-at-age from standard Atlantis output age class, which is generally in 10 stages of maxage/10 true age classes for all but the newest Atlantis models. Note that modern Atlantis models can output true age classes in two output files (from the wiki):

ANNAGEBIO.nc: This output provides numbers in each annual age class (so mapped from Atlantis “age class” which can contain multiple years to true annual age classes). Set flag_age_output to 1 to get this output. Tracers provided are:

  • Numbers at age per species

ANNAGECATCH.nc: This output provides numbers at annual age class (so mapped from Atlantis “age class” which can contain multiple years to true annual age classes) in the catch and discards (summed over all fleets). Set flag_age_output to 1 to get this output. Tracers provided are:

  • Numbers at age per species in the catch
  • Numbers at age per species in the discards

Future atlantisom users should take advantage of this direct output, and some atlantisom functions will have to be rewritten to use it.

However, The CCA model does not produce this output, and other legacy models may not, so we still need the atlantisom functions calc_stage2age and the associated calc_Z. This function will be tested. However, it produces numbers at age but not weight. Weight-at-true-age is needed as an input to stock assessment models using empirical weight at age. See discussion here.

Therefore, our first step is understanding what the 10 class weight at age (output as mulength from calc_age2length) looks like for a variety of species.

For all setup, etc, please see previous files. Full methods are explained here and here.

This page has visualizations for the NOBA model example, CERES Global Sustainability. At the end of the file we also review saved outputs from the CCA model example, Atlantis Summit Common Scenario 1.

Simulate a survey part 5: weight at st(age) census

Full methods are explained here.

We will apply examples here to just a few NOBA species to examine within-year variability: - Cod “North_atl_cod”, likely a test assessment species - Herring “Norwegian_ssh”, likely a test assessment species - Greenland halibut “Green_halibut”, which grows to a large size.

To create a census, the user specifies the timing of the survey, which species are captured, the spatial coverage of the survey, the species-specific survey efficiency (“q”), and the selectivity at age for each species. The following settings should achieve a survey that samples all Atlantis model output timesteps, all fish and shark species, and all model polygons, with perfect efficiency and full selectivity for all ages.

Here we use create_survey on the numbers output of run_truth to create the survey census of age composition (for just one species in this case). The sample_fish applies the median for aggregation and does not apply multinomial sampling if sample=FALSE in the function call.

Because we don’t want to wait 24 hours for this, we will look at only the first 112 time steps.

spp.name <- funct.group.names[funct.group.names %in% c("North_atl_cod",
                                                       "Norwegian_ssh",
                                                       "Green_halibut")]

# get survey nums with full (no) selectivity
survey_testNall <- create_survey(dat = truth$nums,
                                 time = c(0:111),
                                 species = spp.name,
                                 boxes = boxall,
                                 effic = effic1,
                                 selex = selex1)

# this one is high but not equal to total for numerous groups
effNhigh <- data.frame(species=survspp, effN=rep(1e+8, length(survspp)))

# apply default sample fish as before to get numbers
numsallhigh <- sample_fish(survey_testNall, effNhigh)


# aggregate true resn per survey design
aggresnall <- aggregateDensityData(dat = truth$resn,
                                 time = c(0:111),
                                 species = spp.name,
                                 boxes = boxall)

# aggregate true structn per survey design
aggstructnall <- aggregateDensityData(dat = truth$structn,
                                 time = c(0:111),
                                 species = spp.name,
                                 boxes = boxall)

#dont sample these, just aggregate them using median
structnall <- sample_fish(aggstructnall, effNhigh, sample = FALSE)

resnall <-  sample_fish(aggresnall, effNhigh, sample = FALSE)

Length sample with user specified max length bin (200 cm):

length_census <- calc_age2length(structn = structnall,
                                 resn = resnall,
                                 nums = numsallhigh,
                                 biolprm = truth$biolprm, fgs = truth$fgs,
                                 maxbin = 200,
                                 CVlenage = 0.1, remove.zeroes=TRUE)

We should get the upper end of Greenland halibut with a 200cm max length bin. That shouldnt matter for weight at age. This is all timesteps for each species by agecl.

How much does weight at age class vary over time? Here are a couple of annual cycles:

There are some interesting jumps between age classes. Most pronounced for herring. All of these species would be split into two true ages per age class. Interpolation could be interesting.

Change in wt at age over time for age classes using an annual mid-year snapshot (survey) (first 22+ years of NOBA model run):

Quick test with saved CCA census output

Here we check the CCA model (Atlantis Summit Common Scenario 1) saved length and weight census output for small species at Isaac’s suggestion (all three of the following are true age classes, NumAgeClassSize=1 per Atlantis agecl bin:

source(here("config/CCConfig.R"))

length_censussurvsamp <- readRDS(file.path(d.name, paste0(scenario.name, "length_censussurvsamp.rds")))

Sardine:

Anchovy:

Herring:

How do these three look? Herring had a rough period from model years 15-30 or so.

Now for some CCA groups with multiple true ages per stage.

Pacific hake, 2 true ages per class:

Bocaccio rockfish, 5 true ages per age class:

Yelloweye rockfish, most extreme at 12 true ages per age class:

I’m not sure any of this helps us decide how to interpolate, but there is clearly contrast in weight at age (class) in both models and example runs.