Supporting code for: Tulloch et al. (in review). Multi-species ecosystem modelling to support conservation of Southern Resident Killer Whales and Pacific salmon. Ecological Applications.
This repository contains the code and workflows used to build, calibrate, and apply a multi-species size-spectrum ecosystem model of the Salish Sea using the mizer framework. The model integrates 25 functional groups (salmon, marine mammals, groundfish, forage fish, invertebrates) and is used to explore ecosystem responses to fishing, climate variability, and conservation strategies.
The workflow has three main components:
-
Calibration and tuning (2011 baseline)
- Iterative adjustment of species parameters (feeding, reproduction, recruitment).
- Ensures realistic biomass, diet, growth, and resilience.
-
Historic runs (hindcast, 1986–2011)
- Spin-up and hindcast simulations with reconstructed fishing mortality.
- Validation against survey and catch data.
-
Scenario simulations (2011–2111)
- Forward projections under alternative management scenarios (e.g., reduced salmon fishing, pinniped changes, productivity shifts).
- Trade-off analysis for Southern Resident Killer Whale (SRKW) recovery and salmon conservation.
-
Tuning Runs
ss_mizer_2011_250515.Rmd: Interactive and manual parameter calibration.- Includes biomass calibration, yield curve analysis, and resilience adjustments.
-
Historic Runs
ss_mizer_2011_250813_runhistoric.Rmd- Code to reconstruct fishing effort, hindcast 1986–2011, and validate against data.
-
Simulation Runs
Simulations.R: Test script for scenario projections.- Includes functions for:
- Model tuning (marine mammals, predators, ecosystem parameters).
- Historical simulations and survey validation.
- Future effort scenarios (status quo, reduced salmon, etc.).
- Reference points (SSB at 50% unexploited).
- Scenario comparisons and visualizations.
- Export of outputs (biomass, abundance, yield, large fish indicator, etc.).
-
Parameter files:
- See code and data folders for relevant files
-
Historic effort data:
All_fisheries_effort_array_250526_modhake.csv(time series of relative fishing effort, 1986–2011).
-
Survey data:
- Marine mammal and salmon biomass indices for validation.
-
R ≥ 4.0
-
mizer+ extensions: -
tidyverse -
plotly -
ggplot2,reshape2,abind
Install with:
remotes::install_github("sizespectrum/mizerExperimental")
remotes::install_github("sizespectrum/mizerMR")
install.packages(c("tidyverse", "ggplot2", "plotly", "reshape2", "abind"))- Initialize model, tune to steady state
- Adjust feeding (
gamma,h), reproduction (erepro,R_max), and recruitment dynamics. - Use
tuneParams()interface and yield curves to test resilience. - Ensure realistic predator–prey dynamics and species coexistence.
- Spin-up to equilibrium with no fishing.
- Apply reconstructed fishing effort by fleet/gear.
- Validate against observed biomass and catch data.
- Test future effort scenarios:
- Run specific scenario simulations
- Project biomass, yield, and ecosystem indicators.
- Compare scenarios relative to reference points
- Model parameter sets (
.rds,.csv) at different stages (baseline, tuned, scenario-specific). - Time series outputs (CSV):
- Biomass, spawning stock biomass (SSB)
- Yield and catch
- Predation mortality (M2)
- Large Fish Indicator (LFI)
- Figures and animations:
- Spectra plots
- Biomass trajectories
- Scenario comparison plots
- Validation vs survey data
- File paths in scripts point to local directories (
/Dropbox/UBC/...). Update paths before running externally. - Effort matrices must be normalized relative to 2011 values before projecting scenarios.
- Species indices in parameter tuning (e.g.,
19:21= marine mammals) depend on the species ordering in your parameter files.
If using this code or model, please cite:
Tulloch, V., Morzaria-Luna, H., Murray, C., & Martin, T. (in review). Multi-species ecosystem modelling to support conservation of Southern Resident Killer Whales and Pacific salmon. Ecological Applications.