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

View source: R/wind_functions2.R

uv2dsR Documentation

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 numeric matrix with columns dir (degrees clockwise from north, towards where the flow moves) and speed (in the same units as U and V), with one row per input pair.

ds2uv() returns a numeric matrix with columns u (eastward component) and v (northward component), in the same units as s, with one row per direction-speed pair.

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


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

rWind documentation built on Oct. 18, 2026, 5:08 p.m.