hydronetworks is a network-aware hydrological modelling tool using GeoPandas and rasterio, aimed at country-scale scriptable hydrological modelling.
The Jupyter notebook (example.ipynb
) is split into several sections:
- Create network arcs and nodes based on input GIS river network
- Apply Shreve stream order to the network
- Use rasterio to extract attributes from several raster layers
- Calculate rainfall runoff from precipitatin
- Use the network to calculate discharge contributions downstream
- Estimate mini-hydropower potential in the network based on some parameters
- Save the results as several geopackages
There's some more detail and pretty pictures in my blog post: Modelling hydrological networks at massive scale
Requirements
hydronetworks is confirmed to work with Python >= 3.6 with the following packages installed:
numpy
>= 1.15.4pandas
>= 0.23.4shapely
>= 1.6.4rasterio
>= 1.0.13geopandas
>= 0.4.0pyproj
>= 1.9.5.1matplotlib
>= 3.0.2
Install from GitHub
Download or clone the repository and install the required packages (preferably in a virtual environment):
git clone https://github.com/carderne/hydronetworks.git
cd hydronetworks
pip install -r requirements.txt
You can run make test
in the directory, which will do an entire run through using the test data and confirm whether everything is set up properly.