Learn R Programming

RNCEP (version 1.0.10)

NCEP.uv.revert: Reverts speed and direction to U and V components.

Description

This function calculates U (i.e. zonal or east/west) and V (i.e. meridional or north/south) components from a specified speed and direction.

Usage

NCEP.uv.revert(spd, dir, radians=FALSE)

Value

A data.frame containing U and V components given in the same units as speed.

Arguments

spd

A numeric value indicating speed.

dir

A numeric value indicating direction in degrees from north or radians if radians is TRUE.

radians

A logical indicating whether dir is given in degrees from north (FALSE) or radians (TRUE).

Author

Michael U. Kemp mukemp+RNCEP@gmail.com

Details

This function calculates U (i.e. zonal or east/west) and V (i.e. meridional or north/south) components from a specified speed and direction. U and V components describe the direction into which movement occurs with east and north being positive, respectively. If directions are given in radians, radians must be set to TRUE.

References

To cite package 'RNCEP' in publications use:

Kemp, M. U., van Loon, E. E., Shamoun-Baranes, J., and Bouten, W. 2011. RNCEP:global weather and climate data at your fingertips. -- Methods in Ecology and Evolution. DOI:10.1111/j.2041-210X.2011.00138.x.

Examples

Run this code
library(RNCEP)
## Using NCEP.uv.revert ##
NCEP.uv.revert(spd=12, dir=225, radians=FALSE)

Run the code above in your browser using DataLab