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.0-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: river_route-2.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab74772135abfd8ec445fef8e79e857836d75e3ba58cefb7b909bd9275bf18a3
MD5 f523b3b3630c0915de9234b5a59e382e
BLAKE2b-256 483d13941bd381e1dbca46336f9339dbb5aeaf2d3f9550794a1c125384b8c358

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