`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`

.

1 2 3 | ```
wind.shelter(x, prob = NULL, control)
wind.shelter.prep(radius, direction, tolerance, cellsize = 90)
``` |

`x` |
square matrix of elevation data |

`prob` |
numeric: quantile of slope values to be used in computing the wind shelter index; if |

`control` |
required argument: the result of a call to |

`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 = |

`tolerance` |
directional tolerance |

`cellsize` |
grid cellsize |

`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.

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 |

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

The wind shelter index only makes sense if elevation is measured in the same units as the horizontal map units used for the `cellsize`

argument (i.e. usually meters).

`wind.shelter`

and `wind.shelter.prep`

do not restrict the calculation to a circular area; this is done by `focal.function`

when used in combination with that function (assuming `search.mode="circle"`

).

Note that the present definition of the wind shelter index returns negative values for surfaces that are completely exposed toward the specified direction. This may make sense if interpreted as a "wind exposure index", or it might be appropriate to set negative wind shelter values to 0.

Alexander Brenning

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.

`focal.function`

, `quantile`

1 2 3 4 5 | ```
# 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)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.