Skip to main content

A Python wrapper to setup and run the hydrologic modelling framework Raven.

Project description

RavenPy Build status Documentation Status

A Python wrapper to setup and run the hydrologic modelling framework Raven.


  • Download and compile Raven with pip
  • Configure, run and parse Raven outputs from Python
  • Parallel simulations over parameters, models or watersheds
  • Utility command to create grid weight files
  • Extract physiographic information about watersheds
  • Algorithms to estimate model parameters from ungauged watersheds
  • Exposes outputs (flow, storage) as xarray.DataArray objects


Please see the detailed installation docs.


RavenPy’s development has been funded by CANARIE.

This package was created with Cookiecutter and the Ouranosinc/cookiecutter-pypackage project template.



Update test so that it works with xclim 0.29.


  • Pinned climpred below v2.1.6


  • Pinned xclim below v0.29.0


  • Update cruft
  • Subclass derived_parameters in Ostrich emulators to avoid having to pass params.


  • Add support for V2.1 of the Routing Product in ravenpy.extractors.routing_product.
  • Add collect-subbasins-upstream-of-gauge CLI script.
  • Modify WFS request functions to use spatial filtering (Intersects) supplied by OWSLib.


  • Add support for EvaluationPeriod commands. Note that as a result of this, the model’s diagnostics property contains one list per key, instead of a single scalar. Also note that for calibration, Ostrich will use the first period and the first evaluation metric.
  • Add SACSMA, CANADIANSHIELD and HYPR model emulators.


  • Simplify RVC configuration logic.
  • Add ravenpy.utilities.testdata.file_md5_checksum (previously in xarray.tutorial).


  • Some adjustments and bugfixes needed for RavenWPS.
  • Refactoring of some internal logic in ravenpy.config.rvs.RVT.
  • Improvements to typing with the help of mypy.


  • Refactoring of the RV config subsystem:
    • The config is fully encapsulated into its own class: ravenpy.config.rvs.Config.
    • The emulator RV templates are inline in their emulator classes.
  • The emulators have their own submodule: ravenpy.models.emulators.
  • The “importers” have been renamed to “extractors” and they have their own submodule: ravenpy.extractors.


  • Update to RavenC revision 318 to fix OPENDAP access for StationForcing commands.
  • Fix grid_weights set to None by default.
  • Pass nc_index to ObservationData command.
  • Expose more cleanly RavenC errors and warnings.


  • Add notebook about hindcast verification skill.
  • Add notebook about routing capability.
  • Modify geoserver functions to have them return GeoJSON instead of GML.
  • Collect upstream watershed aggregation logic.
  • Fix RVC bug.


This is an interim version making one step toward semi-distributed modeling support. Model configuration is still in flux and will be significantly modified with 0.5. The major change in this version is that model configuration supports passing multiple HRU objects, instead of simply passing area, latitude, longitude and elevation for a single HRU.

  • GR4JCN emulator now supports routing mode.
  • Add BLENDED model emulator.
  • DAP links for forcing files are now supported.
  • Added support for tox-based localized installation and testing with python-pip.
  • Now supporting Python 3.7, 3.8, and 3.9.
  • Build testing for pip and conda-based builds with GitHub CI.


  • Update external dependencies (Raven, OSTRICH) to facilitate Conda packaging.


  • Migration and refactoring of GIS and IO utilities (, utilities/ from RavenWPS to RavenPy.
  • RavenPy can now be installed from PyPI without GIS dependencies (limited functionality).
  • Hydro routing product is now supported from (a notebook has been added to demonstrate the new functions).
  • New script ravenpy aggregate-forcings-to-hrus to aggregate NetCDF files and compute updated grid weights.
  • Add the basis for a new routing emulator option (WIP).
  • Add climpred verification capabilities.


  • Regionalisation data is now part of the package.
  • Fix tests that were not using testdata properly.
  • Add tests for external dataset access.
  • utilities.testdata.get_local_testdata now raises an exception when it finds no dataset corresponding to the user pattern.


  • Set wcs.getCoverage timeout to 120 seconds.
  • Fix Raven.parse_results logic when no flow observations are present and no diagnostic file is created.
  • Fix ECCC test where input was cached and shadowed forecast input data.


  • Fix xarray caching bug in regionalization.


  • Refactoring of ravenpy.utilities.testdata functions.
  • Bump xclim to 0.23.


  • Fix xarray caching bug affecting climatological ESP forecasts (#33).
  • Fix deprecation issue with Fiona.

0.1.6 (2021-01-15)

  • Correct installer bugs.

0.1.5 (2021-01-14)

  • Release with docs.

0.1.0 (2020-12-20)

  • First release on PyPI.

Project details

Download files

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

Files for ravenpy, version 0.7.5
Filename, size File type Python version Upload date Hashes
Filename, size ravenpy-0.7.5-py3-none-any.whl (6.6 MB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ravenpy-0.7.5.tar.gz (6.6 MB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page