Calculate wind direction and speed from u and v components.
wind.dirspeed.Rd
wind.dispeed
is a simple calculation of the wind direction for given u and v. Notice that these should already be converted to natural directions along E/N axes. wind.uv
is the inverse.
Arguments
- u,v
u and v components of the model wind. These may be either vectors or
geofield
objects. They must be rotated to true N/E axis for the wind direction to be correct! u may also be a list with components (u,v), in which case v should be missing.- wspeed,wdir
Wind speed and direction direction (radians or degrees).
- fieldname
A character string giving the names for the result. Only necessary if u and v are
geofield
objects.- rad
If TRUE, the wind direction is in radians. If FALSE, it is in (decimal) degrees.
Details
Wind direction is given in degrees by default. If the wind speed is lower than 10E-6, the result is set to NA.