vectors_2_direction: Convert a U-V velocity field to speed and direction in...

vectors_2_directionR Documentation

Convert a U-V velocity field to speed and direction in degrees

Description

This function takes a vector of u and v velocities and calculates the direction and speed of the combined movement.

Usage

vectors_2_direction(u, v)

Arguments

u

A vector of Zonal currents (from West to East).

v

A vector of Meridional currents (from South to North).

Details

This function was lifted from the ‘Rsenal' package, where it was originally used to calculate wind speeds. All I’ve done is built a wrapper which accounts for different conventions when describing wind and flow directions.

Value

a dataframe of two columns is returned. Speed contains the composite speed of both velocities on the same scale. Direction is the resolved direction of the flow in degrees, 0 heads north, 90 East, 180 South, 270 West.

See Also

Other NEMO-MEDUSA spatial tools: Update-drivers, Window(), sfc_as_cols()


Jack-H-Laverick/MiMeMo.tools documentation built on March 6, 2023, 3:44 p.m.