Skip to main content

Perform river routing computations on large river networks

Project description

River Route

Documentation Status PyPI version GitHub repo size License

river-route is a Python package for routing runoff and discharge through large river networks. It uses numba-compiled kernels and sparse matrix operations for efficient Muskingum-family routing at watershed scale.

Router Options

Router Use case
Muskingum Channel routing only (no lateral runoff input).
RapidMuskingum Route runoff directly to channels at each timestep.
UnitMuskingum Transform runoff with a unit hydrograph before channel routing.

Installation

pip install river-route

For local development:

git clone https://github.com/rileyhales/river-route.git
cd river-route
conda env create -f environment.yaml
conda activate rr
python -m pip install -e ".[all]"

Quick Start

import river_route as rr

(
    rr
    .RapidMuskingum("examples/config_rapid_muskingum.yaml")
    .route()
)

Configuration can be provided by:

  1. A YAML/JSON config file path.
  2. Keyword arguments.
  3. Both (kwargs override file values).

Core required inputs are:

  • params_file (network topology and Muskingum parameters)
  • One runoff source (qlateral_files or grid_runoff_files + grid_weights_file) for transform routers
  • discharge_dir (or explicit discharge_files)

CLI

rr --help
rr RapidMuskingum examples/config_rapid_muskingum.yaml
rr UnitMuskingum examples/config_unit_muskingum.yaml

Documentation

Build docs locally:

mkdocs serve

Testing

pytest tests -v

Integration tests use external sample data:

./tests/download_test_data.sh
pytest tests -v -s

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

river_route-2.0.1-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

File details

Details for the file river_route-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: river_route-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 32.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for river_route-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e8b07ced26e2ead9e8fb50eeab2a385db0caf86de5d7d8f164dc5e3fcc07c5d2
MD5 991519f0d6e60bc4ecb1257d4694ab37
BLAKE2b-256 18e8e7200af3b611cee5fead15ba8dbf05994c0b09dfd4175982ba77b3c66466

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page