MRRpy
A distributed, physics-based hydrological + hydrodynamic model. MRRpy — the Multi-Mechanism Runoff and Routing model — turns a bare-earth DEM and a rain event into a routed flood hydrograph — Variable Source Area runoff, Green-Ampt infiltration and impervious shedding, feeding grid-based kinematic / diffusive-wave / Muskingum–Cunge channel routing, with optional GPU acceleration and Google Earth Engine forcing.
📖 Documentation
Full docs, guides and API reference → mrrpy.readthedocs.io
Learn the science interactively → the MRRpy course
Installation
pip install MRRpy # core (CPU)
pip install "MRRpy[gpu]" # + CuPy/CUDA acceleration
pip install "MRRpy[gee]" # + Google Earth Engine forcing
Quick example
from MRRpy import Config, run_pipeline
cfg = Config(DEM_PATH="dem.tif", OUTPUT_DIR="results/",
OUTPUT_POINT=(27.632, 85.293)) # (lat, lon) of the outlet
cfg.update_output_paths()
run_pipeline(cfg, stages=("process_dem", "routing")) # → results/hydrograph.csv
Or from the command line:
MRRpy init-config -o run.yaml # template config
MRRpy run -c run.yaml # process_dem + routing
What it offers
- DEM → watershed — reproject, pit-fill, D8 flow direction/accumulation and
delineation (
pyshedsorpyflwdir). - Runoff generation —
none · coefficient · raster · scs_cn · vsa_opm; VSA saturation-excess + Green-Ampt + impervious as composable mechanisms. - Flood routing — kinematic, diffusive-wave, or Muskingum–Cunge, with always-on mass-balance checking.
- Satellite forcing — optional IMERG rainfall, SERVES soil deficit, SoilGrids, LULC/LCZ via Google Earth Engine (degrades gracefully offline).
- CPU / GPU — one code path (NumPy or CuPy), automatic CPU fallback.
- Three interfaces — Python API, a
MRRpyCLI, and a QGIS plugin, all driven by oneConfigobject.
Links
- Documentation: https://mrrpy.readthedocs.io
- Interactive course: https://sauravbhattarai19.github.io/MRRpy/
- Source & issues: https://github.com/SauravBhattarai19/MRRpy
License
MIT © Saurav Bhattarai.
Metadata
Release files for MRRpy 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mrrpy-0.2.0.tar.gz | 131.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mrrpy-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 281.7 kB
Release files / mrrpy-0.2.0.tar.gz
| Download URL | mrrpy-0.2.0.tar.gz |
|---|---|
| Size | 131.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1c7f5d098426fa4eb09f9d2de340d9f6a048a79f371cf1b4bbcd3a49a3ac274
|
|
BLAKE2b-256 checksum How to use checksums |
5645490f749fc3a7a9df61b6df2853f8159500a424ba324088003a59fab9ce72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / mrrpy-0.2.0-py3-none-any.whl
| Download URL | mrrpy-0.2.0-py3-none-any.whl |
|---|---|
| Size | 150.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7bcc061eb01ae8bf87e1ae615f9ffb9c16b8d0ca4686d1909ffaeb26e1f81cbd
|
|
BLAKE2b-256 checksum How to use checksums |
323a4820c4fd5a3a33a44a6e6983c5f636309ca220aff70bf2f270d41c737b47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|