wind.dirspeed: Calculate wind direction and speed from u and v components.

View source: R/geowind.R

wind.dirspeedR Documentation

Calculate wind direction and speed from u and v components.

Description

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.

Usage

wind.dirspeed(u, v,fieldname=c("Wind direction","Wind speed"),rad=FALSE)
wind.uv(wspeed,wdir,fieldname=c("U","V"),rad=FALSE)

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.

Value

A list with elements wdir and wspeed.

See Also

geowind


adeckmyn/meteogrid documentation built on Jan. 13, 2025, 11:02 p.m.