Learn R Programming

RSAGA (version 1.4.0)

wind.shelter: Wind Shelter Index

Description

wind.shelter is a function to be used with focal.function() to calculate a topographic wind shelter index from a digital elevation model, which is a proxy for snow accumulation on the lee side of topographic obstacles. wind.shelter.prep performs some preparatory calculations to speed up repeated calls to wind.shelter.

Usage

wind.shelter(x, prob = NULL, control)

wind.shelter.prep(radius, direction, tolerance, cellsize = 90)

Value

The function wind.shelter returns the wind shelter index as described above if a numeric matrix x is provided. If it is missing, it returns the character string "windshelter".

wind.shelter.prep returns a list with components mask and dist. Both are square matrices with 2*(ceiling(radius)+1) columns and rows:

mask

indicates which grid cell in the moving window is within the specified circle segment (value FALSE) or not (TRUE)

dist

the precomputed distances of a grid cell to the center of the moving window, in map units

Arguments

x

square matrix of elevation data

prob

numeric: quantile of slope values to be used in computing the wind shelter index; if NULL, use max (equivalent to prob=1)

control

required argument: the result of a call to wind.shelter.prep

radius

radius (>1) of circle segment to be used (number of grid cells, not necessarily an integer)

direction

wind direction: direction from which the wind originates; North = 0 = 2*pi, clockwise angles.

tolerance

directional tolerance

cellsize

grid cellsize

Author

Alexander Brenning

Details

wind.shelter implements a wind shelter index used by Plattner et al. (2004) for modeling snow accumulation patterns on a glacier in the Austrian Alps. It is a modified version of the algorithm of Winstral et al. (2002). The wind shelter index of Plattner et al. (2004) is defined as:

Shelter index(S) = arctan( max( (z(x0)-z(x)) / |x0-x| : x in S ) ),

where S = S(x0,a,da,d) is the set of grid nodes within a distance <=d from x0, only considering grid nodes in directions between a-da and a+da from x0.

The present implementation generalizes this index by replacing max by the quantile function; the max function is used if prob=NULL, and the same result is obtained for prob=1 using the quantile function.

References

Plattner, C., Braun, L.N., Brenning, A. (2004): Spatial variability of snow accumulation on Vernagtferner, Austrian Alps, in winter 2003/2004. Zeitschrift fuer Gletscherkunde und Glazialgeologie, 39: 43-57.

Winstral, A., Elder, K., Davis, R.E. (2002): Spatial snow modeling of wind-redistributed snow using terrain-based parameters. Journal of Hydrometeorology, 3: 524-538.

See Also

focal.function(), quantile()

Examples

Run this code
# Settings used by Plattner et al. (2004):
ctrl = wind.shelter.prep(6,-pi/4,pi/12,10)
if (FALSE) focal.function("dem.asc",fun=wind.shelter,control=ctrl,
    radius=6,search.mode="circle")

Run the code above in your browser using DataLab