Perform river routing computations on large river networks
Project description
River Route
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:
- A YAML/JSON config file path.
- Keyword arguments.
- Both (kwargs override file values).
Core required inputs are:
params_file(network topology and Muskingum parameters)- One runoff source (
qlateral_filesorgrid_runoff_files+grid_weights_file) for transform routers discharge_dir(or explicitdischarge_files)
CLI
rr --help
rr RapidMuskingum examples/config_rapid_muskingum.yaml
rr UnitMuskingum examples/config_unit_muskingum.yaml
Documentation
- Hosted docs: https://river-route.hales.app
- Migration guide:
docs/migrating/v1-to-v2.md
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8b07ced26e2ead9e8fb50eeab2a385db0caf86de5d7d8f164dc5e3fcc07c5d2
|
|
| MD5 |
991519f0d6e60bc4ecb1257d4694ab37
|
|
| BLAKE2b-256 |
18e8e7200af3b611cee5fead15ba8dbf05994c0b09dfd4175982ba77b3c66466
|