Workshop Overview

The main goal of this workshop is to broaden the expertise of the participants in running and understanding the jack mackerel assessment model. The workshop will involve a combination of presentations and hands-on exercises. There will be optional exercises for participants to work on in their own time, and time will be set aside during the workshop for questions about them. Some competency in the R language will be helpful, but help will be provided as requested.

By the end of the workshop, participants should be able to:

  1. Know how the data are processed prior to inclusion in the assessment
  2. Have the technical capabilities to run the asssessment in different configurations, under scenarios with different data and/or model assumptions
  3. Understand the assessment process and know where to find the necessary components of it
  4. Be able to pull output from model runs to create custom model diagnostics
  5. Identify areas of improvement for the technical aspects of the assessment process

Workshop Logistics

Prior to the start of the workshop, it is expected that you will have:

Github Instructions

Largely adapted from a SPRFMO document and Dan Ovando’s tutorial.

Github is a web-based hosting service for software development projects. It allows the SC to share code and results under version control, and facilitates collaboration. The full suite of files and folders required to run the jack mackerel assessment are stored in a single repository.

The repository is stored online, on a cloud. Any updates or changes to the files within the repository can be commited and pushed directly onto the cloud. While you can make changes to the files via the web interface, you will need to download the repository to your local machine in order to run the jack mackerel assessment.

There are two ways for you to copy the repository from the cloud onto your local machine.

Downloading the repository as a ZIP file (easier)

Downloading the repository as a ZIP file gives you a snapshot of the repository at the time of the download. You will not have version control, and any changes you make will remain on your local machine.

  1. Navigate to the jjm repository
  2. In the top right hand corner, select the green Code button
  3. Select Download ZIP
  4. Unzip the downloaded file

R Instructions

R is a free language and software programme used largely for statistical computing and graphics. While not strictly required to run the jack mackerel assessment model, R is used to analyse the model outputs and create plots for diagnostics and result presentation. Currently, most of the plots found in the technical annex are produced using the jjmR package.

The jjmR package was adapted from the jjmTools package developed by scientists at IMARPE. The package contains many useful functions for the assessment process, and will form the basis for most of this workshop.

Even if you’ve previously installed jjmR, please go through this process again to ensure that you have the most updated version of the package.

To install the package:

  1. Open R (or RStudio) from your applications.

  2. Install the devtools package.

  3. Install the jjmR package.

You can copy and paste the code from below into the R console to do so.

install.packages("devtools")
devtools::install_github("SPRFMO/jjmR")

Running jjmR

  1. Open R (or RStudio) from your applications
  2. Navigate to the asssessment folder within the jjm repository
  3. Read in the SC09 assessment
  4. Make a Kobe plot based on the assessment results

You can copy and paste the code from below into the R console to do so.

setwd("NAMEOFYOURDIRECTORY/jjm/assessment") # Make sure to keep the quotation marks!

h1.mod <- jjmR::readJJM("h1_1.00", path = "config", input = "input")
jjmR::kobe(h1.mod)

If everything is installed correctly, you should see this Kobe plot. If not, please take note of any errors and ask about them.

ADMB Instructions (for advanced users only)

The jack mackerel assessment model is implemented in AD Model Builder. The code for the model structure (jjms.tpl) can be found in the src folder of the jjm repo, or here. This code is compiled into an executable file that will be stored somewhere on the Teams page. With those executable files, you will not have to install ADMB for most assessment runs and sensitivity analyses.

However, if you would like to make changes to the model’s structure in the source code, you will need ADMB to re-compile the executable file for your own use.

Instructions for ADMB installation can be found here.

To compile the jjms executable:

  1. Open a command window
  2. Check that admb is properly installed by running admb --version
  3. Navigate to your jjm/src directory with cd NAMEOFYOURDIRECTORY/jjm/src
  4. Run either make jjms or admb jjms

We will (most likely) not be spending a lot of time on this aspect of the assesssment process during the workshop. Should you be interested in learning more, please reach out!

Questions?

Please feel free to email Lee Qi at leeqi@uw.edu with any questions, errors, or concerns. I’d be happy to walk you through this document!