Note: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the current manual page.

## NAME

r.width.funct - Calculates the Width Function of a watershed basin.

## KEYWORDS

raster, hydrology

## SYNOPSIS

r.width.funct
r.width.funct --help
r.width.funct map=name image=image [--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:

map=name [required]
Distance to outlet map (from r.stream.distance)
image=image [required]
Name for output graph file (png)

## DESCRIPTION

r.width.funct produces the Width Function of a basin. The Width Function W(x) gives the number of the cells in a basin at a flow distance x from the outlet (it is also referred as distance-area function). It is important to underline the fact that the distance is not the euclidean one, but it is measured along the flowpath towards the outlet.

### Input

Distance to outlet map: Input map, required. It is obtained by r.stream.distance (with the option: distance to outlet, flag -o).

Output plot: Path and name of the plot.

### Output

It provides the quantiles of the area - distance distribution and the plot of the Width Function. In x axis is reported the distance and in y axis is the area.

## EXAMPLE

North Carolina sample dataset example:
```g.region raster=elevation -p

# Calculate flow direction
r.stream.extract elevation=elevation threshold=1000 \
direction=direction

# Create outlet point
echo "637304.924954,218617.100523" | v.in.ascii input=- sep=',' out=outlet

# Convert outlet point to raster
v.to.rast input=outlet type=point output=outlet use=cat

# Calculate distance to outlet map
r.stream.distance -o stream_rast=outlet \
direction=direction distance=dist2out

# Calculate width function
r.width.funct map=dist2out image=/tmp/my_basin
```

### Dependencies

• Matplotlib

r.stream.distance, r.basin,

## REFERENCES

• Rodriguez-Iturbe I., Rinaldo A. — Fractal River Basins, Chance and Self-Organization. Cambridge Press (2001)
• In Italian: Di Leo M., Di Stefano M., Claps P., Sole A. — Caratterizzazione morfometrica del bacino idrografico in GRASS GIS (Morphometric characterization of the catchment in GRASS GIS environment), Geomatics Workbooks, n. 9 (2010)

## AUTHORS

Margherita Di Leo (grass-dev AT lists DOT osgeo DOT org), Massimo Di Stefano, Francesco Di Stefano

## SOURCE CODE

Available at: r.width.funct source code (history)

Latest change: Monday Jan 30 19:52:26 2023 in commit: cac8d9d848299297977d1315b7e90cc3f7698730

Note: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the current manual page.

© 2003-2023 GRASS Development Team, GRASS GIS 8.2.2dev Reference Manual