| metconv2zmcomp | R Documentation |
Converts wind speed (magnitude) and direction (in degrees, meteorological convention: direction from which the wind blows, measured clockwise from north) into zonal (u) and meridional (v) components.
metconv2zmcomp(speed, direction, names = c("uwnd", "vwnd"))
speed |
Numeric vector of wind speeds. |
direction |
Numeric vector of wind directions in degrees (0° = from north, 90° = from east, 180° = from south, 270° = from west). |
names |
(optional) ames to construct the resulting data.frame. |
A data.frame with two columns:
Zonal wind component (m/s), positive eastward.
Meridional wind component (m/s), positive northward.
# Example 1: North wind of 10 m/s (blowing southward)
metconv2zmcomp(10, 0)
# Example 2: East wind of 5 m/s (blowing westward)
metconv2zmcomp(5, 90)
# Example 3: South wind of 8 m/s (blowing northward)
metconv2zmcomp(8, 180)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.