
Convert meteorological wind speed and direction to u/v components
Source:R/utils.R
metconv2zmcomp.Rd
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.
Usage
metconv2zmcomp(speed, direction, names = c("uwnd", "vwnd"))
Value
A data.frame with two columns:
- u
Zonal wind component (m/s), positive eastward.
- v
Meridional wind component (m/s), positive northward.
Examples
# Example 1: North wind of 10 m/s (blowing southward)
metconv2zmcomp(10, 0)
#> uwnd vwnd
#> 1 0 -10
# Example 2: East wind of 5 m/s (blowing westward)
metconv2zmcomp(5, 90)
#> uwnd vwnd
#> 1 -5 -3.061617e-16
# Example 3: South wind of 8 m/s (blowing northward)
metconv2zmcomp(8, 180)
#> uwnd vwnd
#> 1 -9.797174e-16 8