Skip to content

r.windfetch

Computes wind fetch which is the length of water over which winds blow without obstruction

r.windfetch input=name [coordinates=east,north [,east,north,...]] [points=name] step=integer direction=integer minor_directions=integer minor_step=integer [output_file=name] [format=string] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]

Example:

r.windfetch input=name coordinates=east,north step=15 direction=0 minor_directions=5 minor_step=3

grass.script.parse_command("r.windfetch", input, coordinates=None, points=None, step=15, direction=0, minor_directions=5, minor_step=3, output_file=None, format="csv", overwrite=False, verbose=False, quiet=False, superquiet=False)

Example:

gs.parse_command("r.windfetch", input="name", coordinates=east,north, step=15, direction=0, minor_directions=5, minor_step=3)

Parameters

input=name [required]
    Name of input land/water land use map
    Binary input where 1 is land and 0 is water
coordinates=east,north [,east,north,...]
    Coordinates for which to compute wind fetch
points=name
    Name of vector points map for fetch computation
    Or data source for direct OGR access
step=integer [required]
    Angular step at which to compute wind fetch (0 is East, counterclockwise)
    Allowed values: 0-360
    Default: 15
direction=integer [required]
    Direction at which to start calculating fetch.
    Allowed values: 0-359
    Default: 0
minor_directions=integer [required]
    Number of minor directions (must be odd number).
    Fetch computed as an average of multiple minor directions around each direction.
    Allowed values: 1-360
    Default: 5
minor_step=integer [required]
    Angular step size between minor directions.
    Fetch computed as an average of multiple minor directions around each direction.
    Allowed values: 1-180
    Default: 3
output_file=name
    If not given write to standard output
format=string
    Output format
    Allowed values: csv, json
    Default: csv
    csv: CSV (Comma Separated Values)
    json: JSON (JavaScript Object Notation)
--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
    Name of input land/water land use map
    Binary input where 1 is land and 0 is water
    Used as: input, raster, name
coordinates : list[tuple[float, float]] | tuple[float, float] | list[float] | str, optional
    Coordinates for which to compute wind fetch
    Used as: input, coords, east,north
points : str, optional
    Name of vector points map for fetch computation
    Or data source for direct OGR access
    Used as: input, vector, name
step : int, required
    Angular step at which to compute wind fetch (0 is East, counterclockwise)
    Allowed values: 0-360
    Default: 15
direction : int, required
    Direction at which to start calculating fetch.
    Allowed values: 0-359
    Default: 0
minor_directions : int, required
    Number of minor directions (must be odd number).
    Fetch computed as an average of multiple minor directions around each direction.
    Allowed values: 1-360
    Default: 5
minor_step : int, required
    Angular step size between minor directions.
    Fetch computed as an average of multiple minor directions around each direction.
    Allowed values: 1-180
    Default: 3
output_file : str, optional
    If not given write to standard output
    Used as: output, file, name
format : str, optional
    Output format
    Allowed values: csv, json
    csv: CSV (Comma Separated Values)
    json: JSON (JavaScript Object Notation)
    Default: csv
overwrite: bool, optional
    Allow output files to overwrite existing files
    Default: False
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

The purpose of r.windfetch is to compute wind fetch, which is the length of water over which winds blow without obstruction. Fetch is an important feature in wave modeling for waves created by wind.

Input is a binary raster map input where land is 1 and 0 is water. To compute fetch for certain point(s), user provides either the coordinates with the coordinates parameter or a points vector map with points parameter. Output is formatted with format parameter either as JSON or CSV and can be printed to a file (output_file) or to standard output.

NOTES

Wind fetch is computed for specific directions, determined by parameters direction and step. Direction angle is in degrees counterclockwise from the East. For example, for direction=45 and step=90, r.windfetch computes fetch for directions 45, 135, 225, and 315 (NE, NW, SW, SE). By default wind fetch for each direction is averaged from multiple directions around it. The number of minor directions from which the main direction is computed is specified with parameter minor_directions. The step between the minor directions is given in minor_step and is in degrees.

EXAMPLE

Compute wind fetch on a lake edge with default parameters:

r.mapcalc "land = if (isnull(lakes), 1, 0)"
r.windfetch input=land format=csv coordinates=635659,223234

image-alt
Figure: Wind fetch for a selected point, visualized in a polar plot.

SEE ALSO

r.horizon is used for computing distances.

AUTHORS

Anna Petrasova, NCSU GeoForAll Lab. This addon was developed with funding from NSF Award #2322073, granted to Natrx, Inc.

SOURCE CODE

Available at: r.windfetch source code (history)
Latest change: Saturday Mar 15 08:26:00 2025 in commit 95d35dc