where
Elevation map need not to be rectangular if study basin was already determined. Non-interesting region may have NULL values. Study basin map can be taken from r.water.outlet then the following r.mapcalc statements will create study basin extracted elevation map.
r.avgstats prints out averaged statistics for topographic index.
GRASS port by Huidae Cho
Hydro Laboratory, Kyungpook National University, South Korea