README.md

samSim

Closed-loop simulation package for salmon CUs

Authors: Cameron Freshwater, Carrie Holt, Kendra Holt, Catarina Wor Date: 2019-02-01 (ONGOING)

Summary

This repository contains the necessary files to run stochastic closed-loop simulations parameterized with Pacific salmon stock-recruitment data. The principal function, recoverySim(), is intended to test 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.

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 samSim package is well suited to evaluating the rebuilding potential for depleted 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.

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.

After installing the package development prerequisites install samSim with:

devtools::install_github("Pacific-salmon-assess/samSim")

Files

All files are stored in the following directories:

data

Includes a collection of loose .rda files that are necessary to run the examples associated with certain samSim functions. Also includes four subdirectories:

man

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

outputs

Directory generated automatically by running recoverySim(). 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 will 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 samSim package, which is not recommended. However an equivalent directory is automatically generated by samSim when it is first run in a new working directory (see Running a simulation below for clarification).

R

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

reports

Includes supplementary documentation describing model development and input data.

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 samSim package and using the recoverySim() function. Generally this should occur in a fresh working directory (e.g. a new .Rproj), which will be 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

simPar

simPar 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:

CUPars

CUPars are .csv files 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 simPar file. Each row represents a specific CU.

Mandatory contents include:

Optional contents include:



CamFreshwater/samSim documentation built on Sept. 25, 2023, 10:22 a.m.