README.md

TESAsamSim

Closed-loop simulation package for salmon CUs for 2021 TESA workshop

Authors: Carrie Holt, adapted from samSim by Cameron Freshwater & revised by Kendra Holt Date: 2021-01-27 (ONGOING)

Summary

This repository contains the necessary files to run stochastic closed-loop simulations parameterized with Pacific salmon stock-recruitment data. The principal function, genericRecoverySimulator(), is intended to simulate the population dynamics for multiple populations of Pacific salmon and then evaluate the performance of different management procedures (broadly a mix of harvest control rules and assessment methods) across operating models representing distinct ecological hypotheses. A suite of performance metrics are generated that allow analysts to evaluate different management procedures ability to achieve multiple, interacting conservation- and catch-based objectives. In short, the model is intended to provide a framework for the quantitative component of a management strategy evaluation. This simulation model is a more generic, simplifed version of 'samSim' initially developed to evaluate recovery strategies applied to Fraser River sockeye and Nass chum salmon.

The focal unit of the simulated dynamics are conservation units (CUs) - genetically distinct aggregates of one or more spawning populations that are unlikely to recolonize in the event of extirpation. Under Canada's Wild Salmon Policy these will be the target of future rebuilding strategies. Thus the TESAsamSim package (and the original samSim package) are well suited for evaluating management procedures for CUs in a mixed-stock context, but should not be used to evaluate the dynamics of subpopulations within CUs and should only be used to evaluate multiple management units (distinct aggregates of CUs managed quasi-independently) with care. Although this model simulates multiple CUs within an aggregate simulataneously, for the purposes of this TESA workshop, we will be using time-series from only 1 CU. In particular, for this workshop we will simulate the dynamics for 5 CUs of coho salmon from the interior Fraser River as documented in Arbeider et al. (2020), but will explore performance of time-varying assessment models on only 1 CU. Future work can incorporate multi-CU dynamics.

A summary of relevant files and how to run a simulation are provided below. Most functions contain relatively detailed documentation (and sometimes functioning examples). Details on the operating model (biological dynamics and fishery interactions) and the management procedures (harvest control rule and assessment process) will be provided in a vignette to come. The following documentation is adapted from that for the samSim package.

After installing the package development prerequisites You can install TESAsamSim with:

devtools::install_github("TESA-workshops/TESAsamSim")

Files

All files are stored in the following directories:

data

Includes data input files. For the 2021 TESA workshop, we will be using example data from Interior Fraser River coho salmon in the directory, IFCohoPars. See Input Files section below.

man

Includes the .rd files used to populate help files for each function. Created automatically via roxygen.

outputs

Directory generated automatically by running genericRecoverySimulator(). Contains a diagnostics directory that includes diagnostic plots and simData that includes output data files summarizing performance. Note that in practice this specific output directory may not be used by the analyst because its contents are only populated when the source code is ran or when the function is run within the TESAsamSim package, which is not necessarily recommended. However an equivalent directory is automatically generated by TESAsamSim when it is first run in a new working directory (see Running a simulation below for clarification).

R

Contains genericRecoverySimulator() function as well as necessary helper and post-processing functions.

Rmd

Includes Rmarkdown files that include an example simulation run, as well as descriptions model structure and parameterization.

src

Includes scripts necessary for several helper C++ functions.

Running a simulation

Simulations are run by installing the TESAsamSim package and using the genericRecoverySimulator() function. Generally this should occur in a fresh working directory (e.g. a new .Rproj), which will automatically generate an outputs directory and necessary subdirectories. Parameter values are passed to the function using a series of .csv files with the simPar and cuPar arguments being most critical. simPar contains parameter values that are shared among CUs and define a given scenario (e.g. species, simulation length, OM and MP characteristics). cuPar contains parameters that are CU-specific including at a minimum names and SR model type, but typically stock-recruit parameters as well. See Input file details below. Details of how to pass a suite of scenarios to the simulation model are provided in Rmd/exampleSimRun.Rmd.

Input file details

cohoSimPar

cohoSimPar is a .csv file that contains the input parameters that characterize a specific simulation run, but which are shared among CUs. Each row represents a unique scenario (i.e. combination of operating model and management procedure). Generally it is easiest to create multiple simPar input files, each of which contain a coherent analysis (e.g. one input focusing on the effects of different harvest control rules across changing productivity regimes, a second input examining the effects of survey effort), but this is not strictly necessary. Contents include:

cohoCUPars

cohoCUPars is a .csv file that contain CU-specific input parameters. Note that these parameters should not vary among simulation runs. Differences in operating models that involve CU-specific traits (e.g. population dynamics) can typically be introduced via options in the cohoSimPar file. Each row represents a specific CU.

Mandatory contents include:

Optional contents include:

cohoRecDatTrm

cohoRecDatTrm is a .csv file that contains the historical spawner and recruitment data for plotting purposes. The column labels are as follows: - stk - CU identification number (can be assigned arbitrarily or based on previous modeling exercises) - yr - brood year - ets - effective total spawner numbers, accounting for proportional spawning success - totalSpwn - total spawner numbers. For interior Fraser Coho, this is equal to ets. - rec2 - abundance of adult recruitment at age 2, aligned by brood year - rec3 - abundance of adult recruitment at age 3, aligned by brood year - rec4 - abundance of adult recruitment at age 4, aligned by brood year - rec5 - abundance of adult recruitment at age 5, aligned by brood year - rec6 - abundance of adult recruitment at age 6, aligned by brood year

Changes from samSim package

1) Removing species-specific code references. Life history types will be specified through new fields in the CUPars.csv input file (e.g., firstAgeRec, maxAgeRec, obsBYlag) 2) Removing performance measures specific to the TAM harvest control rule option used for Fraser sockeye 3) Adding a new SR model option that includes a marine survival co-variate (needed in the short-term for Interior Fraser Coho) 4) Adding performance measures needed to calculate LRPs



Pacific-salmon-assess/TESAsamSim documentation built on Feb. 5, 2021, 9:25 p.m.