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

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/wind_functions2.R

Description

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

Usage

1
2
3
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

Note

Multiple U and V values can be processed. "dir" denotes where the wind/sea current is going (toward), not from where is coming.

Author(s)

Javier Fernández-López (jflopez.bio@gmail.com)

See Also

wind.mean, wind2raster

Examples

1
2
(ds <- uv2ds(c(1, 1, 3, 1), c(1, 1.7, 3, 1)))
ds2uv(ds[, 1], ds[, 2])

rWind documentation built on Oct. 19, 2021, 5:06 p.m.