zmcomp2metconv | R Documentation |
Converts wind or current zonal and meridional velocity components to magnitude and direction according to meteorological convention.
zmcomp2metconv(u, v = NULL, names = c("wspd", "wdir"))
u |
zonal velocity (1D vector) or matrix with zonal and meridional velocity (Nx2 matrix) |
v |
meridional velocity (1D vector) |
names |
names to construct the resulting data.frame |
a Nx2 data.frame with the norm and direction (meteorological convention)
u <- matrix(rnorm(200), nrow = 100, ncol = 2)
vdir <- zmcomp2metconv(u)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.