Learn R Programming

rWind (version 1.1.7)

uv2ds: Transform U and V components in direction and speed and vice versa

Description

Transform U and V components in direction and speed and vice versa

Usage

uv2ds(u, v)

ds2uv(d, s)

Arguments

u

U component.

v

U component.

d

direction (degrees).

s

speed (m/s).

Value

"uv2ds" returns a matrix with direction and speed values

"ds2uv" returns a matrix with U and V values

See Also

wind.mean, wind2raster

Examples

Run this code
# NOT RUN {
(ds <- uv2ds(c(1, 1, 3, 1), c(1, 1.7, 3, 1)))
ds2uv(ds[, 1], ds[, 2])
# }

Run the code above in your browser using DataLab