GRASS logo

NAME

r.watershed.opencl - GPU-accelerated (OpenCL) watershed analysis for basin-scale DEMs, a drop-in replacement for r.watershed.

KEYWORDS

raster, hydrology, watershed, OpenCL

SYNOPSIS

r.watershed.opencl
r.watershed.opencl --help
r.watershed.opencl elevation=name threshold=integer [drainage=name] [accumulation=name] [stream=name] [basin=name] [device=string] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:

--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

elevation=name [required]
Name of input elevation raster map
threshold=integer [required]
Minimum size of exterior watershed basin (in cells)
drainage=name
Name for output drainage direction map
accumulation=name
Name for output flow accumulation map
stream=name
Name for output stream segments map
basin=name
Name for output unique basins map
device=string
Compute backend to use
Options: auto, gpu, cpu, omp
Default: auto

Table of contents

DESCRIPTION

r.watershed.opencl is a GPU-accelerated (OpenCL) watershed analysis module, intended as a drop-in replacement for r.watershed on basin-scale DEMs where the upstream module's single-threaded A*-based flow-accumulation algorithm becomes impractically slow.

This module is under development. It currently implements the CLI contract only; no computation is performed yet.

NOTES

Unlike r.watershed, drainage direction, flow accumulation, and stream/basin extraction are computed via OpenCL kernels selectable through the device option (auto, gpu, cpu, omp). See the project's README_for_LLM.md and PLAN.md for the algorithm decomposition and staged implementation plan.

SEE ALSO

r.watershed

AUTHORS

Yann Chemin

SOURCE CODE

Available at: r.watershed.opencl source code (history)

Accessed: Sunday Nov 15 11:07:46 2026


Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

© 2003-2026 GRASS Development Team, GRASS 8.5.1dev Reference Manual