Skip to content

noaa-nwfsc/Skagit-IBM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Individual-based Model of Juvenile Chinook Salmon in the Skagit River Estuary

This repository is a C++ implementation of an individual-based model of the behavior of juvenile Chinook salmon in estuarine waters. The project currently focuses on the Skagit River estuary channel network, although the model itself can be used to simulate other environments.

Authors

This software is in development by Abby Bratt and Kaj Bostrom.

About the model

Our model simulates the movement of individual fish through a network of habitat "nodes", each node representing a certain area of waterway accessible to fish.

Pictured is a portion of the map of the Skagit River delta that the model uses - this image was captured from the model GUI.

In order to model cohort statistics such as mean residence time, growth, and habitat preference, we model the bioenergetics of individual fish as well as their mortality risk, and use these models to inform the behavioral model of fish movement.

Additionally, we use hydrological data to approximate water temperature and flow speed in the simulated environment.

Setup

Compiling the model and its dependencies requires the following libraries and tools to be installed:

  • automake
  • autoconf
  • libtool
  • zlib
  • curl
  • clang

These dependencies are installable on Mac via Homebrew; once you have installed Homebrew, run brew install curl automake autoconf libtool zlib to get the required packages. A version of clang is available as part of the XCode developer tools, which can be installed using the command xcode-select --install.

Compilation of the GUI also requires a recent (>=3.0) version of wxWidgets. On Mac, this can be obtained using Homebrew with brew install wxmac.

  1. Open a terminal. Clone this repository, then navigate to your local copy:

     git clone [email protected]:aebratt/fish_cpp_hyak.git 
     cd fish_cpp_hyak
    
  2. Fetch additional dependencies (netCDF, rapidJSON) and compile them:

     ./setup.sh
    
  3. Compile the model executables:

     make
    

    and/or

     make gui
    

Running the model

  • To run the model without a graphical interface:

      bin/headless *name of run listing file* *name of folder where output should be saved* *config file*
    

By default, the model will use the environmental configuration in the file default_config_env_from_file.json, which directs the model to load one of the three maps, plus the hydrodynamic and recruit data from files stored in the data directory. If you wish to use another configuration, you can specify it as the third argument to the executable.

For example, to test the 2004 map I could run:

    bin/headless test_run_listings.csv test_output_2004 config_test_2004_map.json
  • To run the graphical model:

      bin/gui *name of run listing file* *name of folder where output should be saved* *config file*
    

Output

See OUTPUT_README.md for documentation on the model's output formats.

Adapting the model

In order to customize the behavior of the model for a given scenario, there are three main sets of parameters that you will likely need to modify:

  • Parameters that are built into the model and must be specified before compilation:

    • The bioenergetic parameters, defined as constants at the top of src/fish.cpp
    • The hydrology model parameters, defined as constants at the top of src/hydro.cpp
  • Parameters that are specified via the JSON configuration file and are loaded at runtime:

    • The environment data, including the map definition, recruitment data, and hydrology data

      For information on the format of these parameters see CONFIG_README.md

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published