View source: R/vectorsToVelocity.R
vectorsToVelocity | R Documentation |
Converts wind u and v vectors to a single wind velocity. The vectors may be in any units, i.e. km/h or m/s.
vectorsToVelocity(
uObs,
uColnum = 1,
vObs,
vColnum = 1,
quiet = TRUE,
logfile = ""
)
uObs |
Required. A CRHMr obs data frame containing the wind u vectors. |
uColnum |
Optional. The column number containing the u values, not including the datetime. Default is column 1. |
vObs |
Required. A CRHMr obs data frame containing the wind v vectors. Note that u and v must have the same units! |
vColnum |
Optional. The column number containing the u values, not including the datetime. Default is column 1. |
quiet |
Optional. Suppresses display of messages, except for errors. If you are calling this function in an R script, you will usually leave |
logfile |
Optional. Name of the file to be used for logging the action. Normally not used |
If successful, returns an obs data frame containing the wind speed (in the original vector units) and the wind direction in degrees from North. If unsuccessful, returns the value FALSE
.
Kevin Shook
## Not run:
windspeed <- vectorsToVelocity(windObs, uColnum=1, uObs, vColnum=2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.