1 Preface

What is Gmacs ?

Gmacs is a statistical size-structured population modeling framework designed to be flexible, scalable, and useful for both data-limited and data-rich situations. As most of the standard assessment models, it allows to determine the impact fishing on both the historical and the current abundance of the population and to evaluate sustainable rate of removals (i.e., catches).

The framework can incorporate multiple data types from a variety of sources (fisheries, surveys) by combing all of them in the form of an integrated analysis (Maunder and Punt, 2013; Punt et al., 2013)). This approach allows various kinds of data with different (and sometimes incomplete) collection histories to provide complementary information about fished stocks.

Initially developed to assess red king crab stocks of Alaska, Gmacs is designed with similar flexibility to that provided by age-structured stock assessment modelling frameworks like Stock Synthesis and CASAL. Similar to these model, Gmacs has a population sub-model that simulates stock biological dynamics (growth, maturity,fecundity, recruitment, molting), an observation sub-model that estimates expected values for different kind of data (e.g. fishery and/or survey abundance indices, fisheries discard data, size composition data, …) and a statistical sub-model that quantify the goodness of fit and provides best-fitting parameters estimates and associated variance.

Gmacs is an open source program coded in C++ and implemented in Automatic Differentiation Model Builder (ADMB; Fournier et al. (2012)) for parameter estimation.

Prerequisites

Before getting Gmacs installed, make sure you have all the software you need to run Gmacs (and associate tools) correctly:

  • AD Model Builder: Gmacs is available for download as a series of source files. In order to use Gmacs, you will need to build these source files into an executable. To do this, you will need a recent version of AD Model Builder (ADMB). We recommend downloading the latest version of ADMB from the ADMB GitHub repository and building ADMB from source. Alternatively, recent pre-compiled builds of ADMB can be downloaded from the ADMB website. Instructions for installing ADMB from pre-compiled builds can be found on the ADMB website as well. For more details about how work ADMB, please see the user manual.

  • R: If you are reading this book, you probably have R already installed. If that is not the case and you plan to use both the gmr package and the Rmarkdown resources to build stock assessment documents, you will need R. If you are a new R user and would like to learn how to use R, we would recommend the following two books R cookbook and R for data Science which are designed to get you up and running with R.

  • Rstudio: Despite any text editor can be used to view and edit Rmarkdown files, we recommend to use Rstudio if you plan to use the Rmarkdown resources to build stock assessment documents. Its editor will make it easier to work with R Markdown. You can download Rstudio here.

Getting Gmacs installed

Here we provide detailed instruction on how to ho about installing Gmacs on the most popular operating systems (Windows, Mac or linux computers).

Installing Gmacs

The latest version of Gmacs can be download here.

  • Quick start for windows machines
    1. Download gmacs-develop.zip.
    2. Unzip the folder to create c:/gmacs-develop or something similar.
    3. Open an ADMB Command windows.
    4. Navigate to c:/gmacs-develop/src and type make.bat.
    5. The Gmacs executable (gmacs.exe) should be built inside the src/ folder.
    6. See Chapter 7 for building your own model.
  • Quick start for Mac machines
    1. Download gmacs-develop.zip.
    2. Unzip the folder to create /users/Your-name/gmacs-develop or something similar.
    3. Open a Terminal
    4. Navigate to /users/Your-name/gmacs-develop/src.
    5. Edit the make file to reference your local machine.
    6. Return to Terminal and type make to get started.
    7. The Gmacs executable (gmacs.exe) should be built inside the src/ folder.
    8. See Chapter 7 for building your own model.
  • Installation on Linux

Installing ADMB on Linux is easy via GitHub….

What are the available tools for working with Gmacs?

Numerous tools have been developed to facilitate and spread the use of Gmacs. This include various repositories on GitHub as well as:

  • gmr: a purpose-built R package for plotting Gmacs outputs and work with Gmacs files in R.
  • Gmad: a dedicated library to generate stock assessment documents in pdf form using Gmacs outputs.

How can I learn how to use Gmacs and associated tools?

This book is the first place to learn more about how to use Gmacs. Its different chapters should make you able to start using Gmacs in a relatively simple way. To learn more about model equations and population dynamics considered within Gmacs, please see the general model description paper to come. We suggest walking through the available vignettes to familiarize with Gmacs.

The basic vignette included in the gmr R package provides help for installing the package and an overview of the available functions.

How can I get help?

The first thing to do is to have a look at the Frequently Asked Questions page. beyond the FAQ page:

  • Is there an specific email address where people can ask help?
  • Do you want to create a kind of forum?

How can I follow/contribute to Gmacs development?

Should we consider the possibility for the user to report bugs or request features through an issue on GitHub, suggest code changes (pull request), or suggest changes to the Gmacs manual.

How can I report issues?

Post in the Forum or open an issue in the Gmacs repo.

The Gmacs development team

Table 1.1 summarizes the people who have worked on the Gmacs project since its inception.

Table 1.1: Gmacs development team - Contributors.
Contributors Organisation
Jim Ianelli Alaska Fisheries Science center - NOAA
D’Arcy Webber Quantfish
Cody Szuwalski Alaska Fisheries Science center - NOAA
Jack Turnock Alaska Fisheries Science center - NOAA
Jie Zheng Alaska Department of Fish and Game
Hamachan Hamazaki Alaska Department of Fish and Game
Athol Whitten School of Aquatic and Fishery Sciences - University of Washington
Andre Punt School of Aquatic and Fishery Sciences - University of Washington
David Fournier Otter Research Ltd.
John Levitt