inSTREAM and inSALMO: Overview

What are inSTREAM and inSALMO?

inSTREAM (the individual-based Stream TRout Environmental Assessment Model) is an individual-based model (IBM) of trout in a stream environment; it predicts how trout populations respond to many kinds of environmental and biological change. The simulated environment includes spatially and temporally varying in hydraulic conditions (depth, velocity, cover providing velocity shelter), temperature, turbidity, and food availability. The model trout adapt to changing conditions mainly by selecting which habitat to use, making a tradeoff between growth rate and mortality risk. Trout feed and grow, experience various kinds of mortality, and reproduce.

inSALMO is a modification of inSTREAM to represent the freshwater life stages of anadromous salmonids. It was first developed for Chinook salmon but has also been adapted to steelhead trout and coho salmon. inSALMO has been used design and evaluate habitat restoration projects and to examine effects of alternative flow and temperature regimes on salmon spawning, rearing, and outmigration success.

Numerous publications using these models are on our publications page.

What can inSTREAM be used for?

inSTREAM was originally designed as an instream flow assessment tool: a model for predicting how fish populations respond to changes in stream flow and temperature, as occur downstream of dams. IBMs have many potential advantages over conventional, habitat-based tools for instream flow assessment (e.g., PHABSIM). In particular, inSTREAM can predict the effects of alternative flow regimes (not just minimum flows), and the cumulative effects of changes in flow, temperature, and other variables often affected by dams.

inSTREAM is also useful for assessing the effects of environmental processes other than instream flow and temperature. For example, the model can predict population-level effects of changes in turbidity, physical habitat and channel shape (including habitat restoration), food production, and species introductions.

We also use inSTREAM as a tool for basic ecological research. Many questions and theories of ecology are very difficult to test rigorously in the field, but are easily tested in inSTREAM. We have used simulation experiments to examine such questions as: (1) What is the relation between animal density and habitat quality— is the habitat where animals are most often found really the best habitat? (2) What controls negative power-law self-thinning in stream trout— is it the allometric metabolic relationship, as theorized? (3) How do animals make tradeoffs between mortality risk and growth?

Who can use inSTREAM? What does it cost?

inSTREAM and inSALMO are public domain products distributed free of charge. See links below to download the current release and supporting documentation. We appreciate potential users contacting us so we know who is trying to do what and can provide support.

Sponsors of inSTREAM's development have include the Electric Power Research Institute, USDA Forest Service, US Environmental Protection Agency, Pacific Gas and Electric, Southern California Edison, Argonne National Laboratory and Western Area Power Administration, and the US Bureau of Reclamation.

Where did inSTREAM come from?

Current versions of inSTREAM are the offspring of a long line of models and research projects.

  • Version 1 (1999) was based on the rainbow and brown trout IBM of Van Winkle et al. (1998, Ecological Modelling 110 :175-207), but the model was substantially revised and implemented in completely new software. The software allows the user to choose how many, and which, trout species to simulate; separate parameters (and even different behaviors) can be provided for each species. Most importantly, the software provides graphical interfaces to observe and test habitat conditions and trout behavior.
  • Version 2 (2000) was applied to the cutthroat trout population of Little Jones Creek, but still allows simulation of multiple trout species. An Experiment Manager was added: this tool automatically generates and executes multiple model runs representing scenarios (in which inputs are altered) and replicates of each scenario. This version was documented in: Railsback and Harvey 2001 (PSW-GTR-182, Pacific Southwest Research Station); and used in: Railsback and Harvey 2002 (Ecology 83: 1817-1830).
  • Version 2.2 (2002) added the capability to simulate multiple stream reaches. The user can control how reaches are linked, and whether trout can move among reaches in one, both, or neither direction.
  • Version 3 (2003) included two major changes to address the problem of how sub-daily changes in flow (e.g., from peaking hydropower or recreational boating releases) affect fish and their populations. First, trout decide whether to feed or hide, whereas previous versions assumed trout all feed during the day and hide at night. Second, the trout repeat their choice of whether to feed or hide, and which habitat to use, several times per day: at any time flow changes significantly, and every switch from night to day or day to night. Version 3 was described and used in: Railsback et al. 2005 (Ecology 86:947-959).
  • Versions 4.x were updates and modifications of Version 2.2 designed specifically for public release and routine use in environmental impact assessment.
  • Version 5 (2012) provided a major update in software usability. Its Windows version is packaged in a new graphical user interface that eliminates the need to install Swarm. Version 5 also separates inSTREAM from specific hydraulic models: users can simulate cell depths and velocities using any one- or two-dimensional hydraulic model, process habitat variables using GIS, and provide these inputs to inSTREAM in a generic format. This is also the first version that supports multiple stream reaches that are fully two-dimensional.
  • Version 6 (2013) updated version 3 (with sub-daily flow changes and adaptive selection of feeding vs. hiding) with the usability improvements of Version 5. It provides a graphical user interface with help files, and multiple river reaches that are fully two-dimensional.
  • Version 7 is the current release as of 2021. It is a major update that includes re-programming inSTREAM in the NetLogo software platform and many changes to the model's formulation.

How do the models work?

Except as noted, inSTREAM and inSALMO use the following key assumptions .

  • Four time steps per day, representing dawn, day, dusk, and night. (Most versions before inSTREAM 7 used a one-day time step).
  • A spatial resolution of several square meters. Habitat is modeled as polygonal cells large enough to contain the feeding area of at least one large fish.
  • Stream flow, water temperature, and turbidity (and sometimes food availability) as the external variables driving the model over time.
  • Food, feeding cover, and hiding cover as the resources that trout compete with each other for.

inSTREAM is object-oriented and simulates four kinds of objects: stream reaches, habitat cells, fish, and redds (nests created by spawning trout).

Each model reach represents a contiguous section of habitat, and is made up of cells. Reaches can be linked to represent how fish move through a stream or watershed.

Habitat cells determine their depth and velocity from the stream flow rate; this calculation uses a lookup table imported from any two-dimension hydraulic model. Habitat cells also track the availability of food, velocity shelters for drift-feeding fish, and spawning gravel.

The model fish conduct four major actions each time step.

  • Spawning: Adult fish spawn if they meet a number of readiness criteria. Upon spawning, fish find appropriate habitat and create a new redd, with the number and size of eggs depending on the spawner's characteristics.
  • Habitat and activity selection: Each fish examines the surrounding area and decides whether to feed or conceal itself, and moves to the site with the best habitat that is not already occupied by larger fish. Defining the "best" habitat is crucial for the success of the whole model and has been a major focus of our research. We assume fish move to habitat offering the highest probability of surviving and growing to sexual maturity over a specified horizon (e.g., 60 days). Survival and growth to maturity are functions of (a) habitat-related mortality (extreme temperatures or velocities), (b) predation mortality, and (c) food intake (which affects starvation mortality and growth). We do not explicitly impose territorial or non-territorial behavior. Instead, we model how much food is available in each habitat cell and how much food is used up by the larger fish in the cell. The amount of food an additional fish would get is a function of food production in the cell, the fish's feeding ability, and food consumption by larger fish in the cell. This formulation allows a number of complex and realistic movement behaviors to emerge.
  • Feeding and growth: We simulate energy intake resulting from two feeding strategies: stationary drift feeding and searching the stream bottom. Intake varies with depth, velocity, fish size, and food availability. Energy consumption due to swimming also depends on the feeding strategy and the availability of velocity shelters. We assume fish use the most profitable of the two strategies, and calculate growth from energy intake and consumption using standard bioenergetics methods.
  • Survival: Daily survival is a function of such mortality functions as high temperature, high velocity, spawning stress, starvation, and predation. Our predation formulation includes separate functions for terrestrial and aquatic predators, with survival probabilities a function of depth, velocity, temperature, and fish size.

Redds are modeled from when they are created by spawning until eggs have emerged as new fish, with the development rate a function of temperature. Redds can suffer egg mortality due to dewatering at low flows, scouring at high flows, high or low temperatures, and superimposition of a new redd on an existing one.

The inSTREAM software is designed to make the model easy to observe, revise, calibrate, and conduct experiments with. Software features include graphical displays of habitat, fish, and redds; an experiment manager for automated execution of multi-run experiments; and complete user documentation.


Complete descriptions of the model and its software are distributed with each version.

To learn more

If you are interested in using inSTREAM for educational, research, or river management applications, please first review the materials on this web site and then contact Steve Railsback or Bret Harvey. We welcome opportunities to provide support, collaboration, or consulting.

You can also use the following links to:

See our many publications describing inSTREAM and inSALMO and their applications

Read about or download inSTREAM 7

Read about our tests and validation

Access our archives of previous and older versions of inSTREAM