powered by
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"))
a Nx2 data.frame with the norm and direction (meteorological convention)
zonal velocity (1D vector) or matrix with zonal and meridional velocity (Nx2 matrix)
meridional velocity (1D vector)
names to construct the resulting data.frame
u <- matrix(rnorm(200), nrow = 100, ncol = 2) vdir <- zmcomp2metconv(u)
Run the code above in your browser using DataLab