Introduction

Here we further test the function calc_age2length to see if small fish ever appear with full census sampling. If they don’t, perhaps the default CV in the function needs modification? This question is triggered by the sampling for NOBA Greenland halibut, in which fish below 50 cm didn’t show up.

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. For full explanation of methods, see the file linked at the beginning of each section.

Simulate a survey part 4: sample for length composition (testing revised function)

Full methods are explained here.

We will apply examples here to only one species, Greenland halibut in NOBA, 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.

ss.name <- funct.group.names[funct.group.names == "Green_halibut"]

# get survey nums with full (no) selectivity
ss_survey_testNall <- create_survey(dat = truth$nums,
                                 time = c(0:111),
                                 species = ss.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
ss_numsallhigh <- sample_fish(ss_survey_testNall, effNhigh)


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

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

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

ss_resnall <-  sample_fish(ss_aggresnall, effNhigh, sample = FALSE)

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

ss_length_census <- calc_age2length(structn = ss_structnall,
                                 resn = ss_resnall,
                                 nums = ss_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. What I am concerned about here is whether we get very small fish at any time step:

Are there fish <50 cm long at any output timestep? If not, does this make sense? There appear to be a few, such as timestep 4. Hard to see at this level.

Aggregate length comp over all of these time steps (first 22+ years):

This suggests that the smallest Greenland turbot in the ecosystem are ~25 cm over all of the timesteps we checked. Does this make sense?

Quick test with saved CCA census output

Here we check the CCA model (Atlantis Summit Common Scenario 1) saved length census output for small species at Isaac’s suggestion:

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?

Do we need to change something about the length comp estimation?