r.flowfill
Moves water downhill into pools or the ocean/map edge
r.flowfill input=name np=integer [threshold=float] [h_runoff=float] [h_runoff_raster=name] [ties=string] [ffpath=string] [output=name] [water=name] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]
Example:
r.flowfill input=name np=0
grass.script.run_command("r.flowfill", input, np, threshold=0.001, h_runoff=None, h_runoff_raster=None, ties="PREF", ffpath="flowfill", output=None, water=None, overwrite=None, verbose=None, quiet=None, superquiet=None)
Example:
gs.run_command("r.flowfill", input="name", np=0)
grass.tools.Tools.r_flowfill(input, np, threshold=0.001, h_runoff=None, h_runoff_raster=None, ties="PREF", ffpath="flowfill", output=None, water=None, overwrite=None, verbose=None, quiet=None, superquiet=None)
Example:
tools = Tools()
tools.r_flowfill(input="name", np=0)
This grass.tools API is experimental in version 8.5 and expected to be stable in version 8.6.
Parameters
input=name [required]
Input DEM
Name of input raster map
np=integer [required]
Number of processors to use (>= 3)
threshold=float
Threshold water-surface elevation change to conclude calculation
Default: 0.001
h_runoff=float
Initial depth of uniform runoff [thickness in map units]
h_runoff_raster=name
Initial depth of non-uniform runoff [thickness in map units]
Name of input raster map
ties=string
Tie-handling: counterclockwise from Northwest (PREF) or random (RAND)
Allowed values: PREF, RAND
Default: PREF
ffpath=string
Path to the FlowFill executable
Default: flowfill
output=name
Output DEM + pooled/remaining runoff
Name for output raster map
water=name
Output water depth at the end of the run
Name for output raster map
--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--qq
Very quiet module output
--ui
Force launching GUI dialog
input : str, required
Input DEM
Name of input raster map
Used as: input, raster, name
np : int, required
Number of processors to use (>= 3)
threshold : float, optional
Threshold water-surface elevation change to conclude calculation
Default: 0.001
h_runoff : float, optional
Initial depth of uniform runoff [thickness in map units]
h_runoff_raster : str, optional
Initial depth of non-uniform runoff [thickness in map units]
Name of input raster map
Used as: input, raster, name
ties : str, optional
Tie-handling: counterclockwise from Northwest (PREF) or random (RAND)
Allowed values: PREF, RAND
Default: PREF
ffpath : str, optional
Path to the FlowFill executable
Default: flowfill
output : str, optional
Output DEM + pooled/remaining runoff
Name for output raster map
Used as: output, raster, name
water : str, optional
Output water depth at the end of the run
Name for output raster map
Used as: output, raster, name
overwrite : bool, optional
Allow output files to overwrite existing files
Default: None
verbose : bool, optional
Verbose module output
Default: None
quiet : bool, optional
Quiet module output
Default: None
superquiet : bool, optional
Very quiet module output
Default: None
input : str | np.ndarray, required
Input DEM
Name of input raster map
Used as: input, raster, name
np : int, required
Number of processors to use (>= 3)
threshold : float, optional
Threshold water-surface elevation change to conclude calculation
Default: 0.001
h_runoff : float, optional
Initial depth of uniform runoff [thickness in map units]
h_runoff_raster : str | np.ndarray, optional
Initial depth of non-uniform runoff [thickness in map units]
Name of input raster map
Used as: input, raster, name
ties : str, optional
Tie-handling: counterclockwise from Northwest (PREF) or random (RAND)
Allowed values: PREF, RAND
Default: PREF
ffpath : str, optional
Path to the FlowFill executable
Default: flowfill
output : str | type(np.ndarray) | type(np.array) | type(gs.array.array), optional
Output DEM + pooled/remaining runoff
Name for output raster map
Used as: output, raster, name
water : str | type(np.ndarray) | type(np.array) | type(gs.array.array), optional
Output water depth at the end of the run
Name for output raster map
Used as: output, raster, name
overwrite : bool, optional
Allow output files to overwrite existing files
Default: None
verbose : bool, optional
Verbose module output
Default: None
quiet : bool, optional
Quiet module output
Default: None
superquiet : bool, optional
Very quiet module output
Default: None
Returns:
result : grass.tools.support.ToolResult | np.ndarray | tuple[np.ndarray] | None
If the tool produces text as standard output, a ToolResult object will be returned. Otherwise, None
will be returned. If an array type (e.g., np.ndarray) is used for one of the raster outputs, the result will be an array and will have the shape corresponding to the computational region. If an array type is used for more than one raster output, the result will be a tuple of arrays.
DESCRIPTION
r.flowfill runs the FlowFill code (Callaghan and Wickert, 2019) that moves water cell-by-cell to flood depressions in a DEM. It can be used as a simplified/cellular simulation of downslope flow (though not equivalent to physics-based approaches for flow) or as a tool to fill depressions in a DEM. For further information, see the README at https://github.com/KCallaghan/FlowFill.
REFERENCES
Callaghan, K.\~L., and A.\~D. Wickert (in revision), Computing water flow through complex landscapes, part 1: Incorporating depressions in flow routing using FlowFill, Earth Surface Dynamics Discussions, doi:10.5194/esurf-2019-11.
SEE ALSO
AUTHORS
Kerry L. Callaghan, Andrew D. Wickert
SOURCE CODE
Available at: r.flowfill source code
(history)
Latest change: Thursday Feb 20 13:02:26 2025 in commit 53de819