Skip to content

r.stream.variables

Calculation of contiguous stream-specific variables that account for the upstream environment (based on r.stream.watersheds).

r.stream.variables variable=name area=string [folder=name] [out_folder=name] output=method [,method,...] [scale=value] [cpu=float] [--verbose] [--quiet] [--qq] [--ui]

Example:

r.stream.variables variable=name area=string output=method

grass.script.run_command("r.stream.variables", variable, area, folder="GISDBASE/folder_structure", out_folder="GISDBASE/stream-specific_variables", output, scale=1, cpu=1, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("r.stream.variables", variable="name", area="string", output="method")

Parameters

variable=name [required]
    Name of raster to be converted into a stream-specific variable
area=string [required]
    Area of aggregation: across the sub-watersheds or only across sub-streams
    Allowed values: watershed, stream
folder=name
    Provide the full folder path (same as for r.stream.watersheds)
    Default: GISDBASE/folder_structure
out_folder=name
    Provide the full folder path for the output stream-specific variable
    Default: GISDBASE/stream-specific_variables
output=method [,method,...] [required]
    Provide the output aggregation method for the stream-specific variable
    upstream cells numbers, minimum, maximum, range, mean, standard deviation, coefficient of variation, sum. Output datatype is Int32
    Allowed values: cells, min, max, range, mean, stddev, coeff_var, sum
scale=value
    Provide a scale factor to multiply or divide the final stream-specific variable
    Provide it e.g. if input raster values are between -1 and 1, use scale=1000 to inicrease the number of decimals - all outputs will be rounded to integers
    Default: 1
cpu=float
    Number of CPUs used for the parallel computation
    Default: 1
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog

variable : str, required
    Name of raster to be converted into a stream-specific variable
    Used as: name
area : str, required
    Area of aggregation: across the sub-watersheds or only across sub-streams
    Used as: string
    Allowed values: watershed, stream
folder : str, optional
    Provide the full folder path (same as for r.stream.watersheds)
    Used as: name
    Default: GISDBASE/folder_structure
out_folder : str, optional
    Provide the full folder path for the output stream-specific variable
    Used as: name
    Default: GISDBASE/stream-specific_variables
output : str | list[str], required
    Provide the output aggregation method for the stream-specific variable
    upstream cells numbers, minimum, maximum, range, mean, standard deviation, coefficient of variation, sum. Output datatype is Int32
    Used as: method
    Allowed values: cells, min, max, range, mean, stddev, coeff_var, sum
scale : float, optional
    Provide a scale factor to multiply or divide the final stream-specific variable
    Provide it e.g. if input raster values are between -1 and 1, use scale=1000 to inicrease the number of decimals - all outputs will be rounded to integers
    Used as: value
    Default: 1
cpu : float, optional
    Number of CPUs used for the parallel computation
    Default: 1
verbose: bool, optional
    Verbose module output
    Default: False
quiet: bool, optional
    Quiet module output
    Default: False
superquiet: bool, optional
    Very quiet module output
    Default: False

DESCRIPTION

Calculation of contiguous stream-specific variables that account for the upstream environment (based on r.stream.watersheds).

REFERENCES

Sami Domisch, Giuseppe Amatulli, Walter Jetz (2015): Near-global freshwater-specific environmental variables for biodiversity analyses in 1 km resolution, Scientific Data 2, 150073, DOI:10.1038/sdata.2015.73

AUTHORS

Giuseppe Amatulli
Sami Domisch

SOURCE CODE

Available at: r.stream.variables source code (history)
Latest change: Thursday Feb 20 13:02:26 2025 in commit 53de819