Convert a U-V velocity field to speed and direction in degrees
vectors_2_direction.Rd
This function takes a vector of u and v velocities and calculates the direction and speed of the combined movement.
Arguments
- u
A vector of Zonal currents (from West to East).
- v
A vector of Meridional currents (from South to North).
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.
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.
See also
Other NEMO-MEDUSA spatial tools:
Update-drivers
,
Window()
,
sfc_as_cols()