The algorithm of Barnes et al. (2014) constructs two auxiliary gradient fields and combines them to produce a gradient that drains away from higher terrain and toward lower terrain, ensuring that flow traverses flats in a physically plausible way without crossing drainage divides. The elevation adjustments are on the order of the floating-point epsilon, so they do not meaningfully alter the DEM's topographic properties.
An alternative approach is to use the -e flag in r.richdem.filldepressions directly, which combines filling and epsilon-gradient imposition in one step.
This module is not needed before running r.richdem.dephier, which handles flat areas internally.
This module requires the RichDEM Python package, which is not a standard GRASS GIS dependency and must be installed separately:
pip install richdem
If pip install richdem fails (the package requires a C++ compiler),
build from source:
git clone https://github.com/r-barnes/richdem.git cd richdem/wrappers/pyrichdem pip install -e .
Ensure that RichDEM is installed into the same Python environment used by GRASS GIS.
r.richdem.filldepressions input=dem output=dem_filled r.richdem.resolveflats input=dem_filled output=dem_conditioned
r.richdem.resolveflats input=dem output=dem_noflats r.richdem.flowaccumulation input=dem_noflats output=flow_accum
GRASS GIS bindings: Andrew D. Wickert, with assistance from Claude Sonnet 4.6
Available at: r.richdem.resolveflats source code (history)
Latest change: Sunday May 31 20:21:19 2026 in commit: 2163cf63360e0ce5bfae95f4815c63ffbb9dda5c
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
© 2003-2026 GRASS Development Team, GRASS 8.5.1dev Reference Manual