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
.
wind.shelter(x, prob = NULL, control)
wind.shelter.prep(radius, direction, tolerance, cellsize = 90)
NULL
, use max
(equivalent to prob=1
)wind.shelter.prep
2*pi
, clockwise angles.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:
FALSE
) or not (TRUE
)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< code=""> from
x0
, only considering grid nodes in directions between a-da
and a+da
from x0
.=d<>
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.
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.
focal.function
, quantile
# Settings used by Plattner et al. (2004):
ctrl = wind.shelter.prep(6,-pi/4,pi/12,10)
## Not run: focal.function("dem.asc",fun=wind.shelter,control=ctrl,
# radius=6,search.mode="circle")## End(Not run)
Run the code above in your browser using DataLab