windcoef: Calculates wind shelter coefficient

View source: R/othertools.R

windcoefR Documentation

Calculates wind shelter coefficient

Description

windcoef is used to apply a topographic shelter coefficient to wind data.

Usage

windcoef(dsm, direction, hgt = 1, reso = 1)

Arguments

dsm

raster object, two-dimensional array or matrix of elevations (m) derived either from a digital terrain or digital surface model, and orientated as if derived using is_raster(). I.e. ⁠[1, 1]⁠ is the NW corner.

direction

a single numeric value specifying the direction from which the wind is blowing (º).

hgt

a single numeric value specifying the height (m) at which wind speed is derived or measured. The wind speeds returned are also for this height, and account for the fact topography affords less shelter to wind at greater heights.

reso

a single numeric value specifying the the resolution (m) of dsm.

Details

If dsm is a raster object, then a raster object is returned. If elevations are derived from a digital terrain model, then the sheltering effects of vegetation are ignored. If derived from a digital surface model, then the sheltering effects of vegetation are accounted for. If res is unspecified dtm is assumed to have a resolution of one m.

Value

a raster object, or two-dimensional array of shelter coefficients. E.g. a shelter coefficient of 0.5 indicates that wind speed at that location is 0.5 times that measured at an unobscured location.

See Also

The function windheight() converts measured wind heights to a standard reference height.

Examples

library(raster)
dsm <- dtm1m + veg_hgt
wc <- windcoef(dsm, 0)
plot(mask(wc, dtm1m), main ="Northerly wind shelter coefficient")

ilyamaclean/microclima documentation built on Oct. 31, 2023, 11:41 p.m.