Skip to content

Deltares/pyflwdir

Repository files navigation

PyFlwDir: Fast methods to work with hydro- and topography data in pure Python

https://codecov.io/gh/Deltares/PyFlwDir/branch/main/graph/badge.svg?token=N4VMHJJAV3 Latest docs Binder Latest PyPI version License

Intro

PyFlwDir contains a series of methods to work with gridded DEM and flow direction datasets, which are key to many workflows in many earth sciences. PyFlwDir supports several flow direction data conventions and can easily be extended to include more. The package contains some unique methods such as Iterative Hydrography Upscaling (IHU) method to upscale flow directions from high resolution data to coarser model resolution.

PyFlwDir is in pure python and powered by numba to keep it fast.

Featured methods

  • flow directions from elevation data using a steepest gradient algorithm
  • strahler stream order
  • flow direction upscaling
  • (sub)basin delineation
  • pfafstetter subbasins delineation
  • classic stream order
  • height above nearest drainage (HAND)
  • geomorphic floodplain delineation
  • up- and downstream tracing and arithmetics
  • hydrologically adjusting elevation
  • upstream accumulation
  • vectorizing streams
  • many more!

https://raw.githubusercontent.com/Deltares/pyflwdir/main/docs/_static/pyflwdir.png

Installation

See installation guide

Quickstart

See user guide

Reference API

See reference API

Development and Testing

Welcome to the PyFlwDir project. All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. See Contributing to PyFlwDir for how we work.