View source: R/GeostrophicWind.R
GeostrophicWind | R Documentation |
Geostrophic wind from a geopotential height field.
GeostrophicWind(gh, lon, lat, cyclical = "guess", g = 9.81, a = 6371000)
gh |
geopotential height |
lon |
longitude in degrees |
lat |
latitude in degrees |
cyclical |
boundary condition for longitude (see details) |
g |
acceleration of gravity |
a |
Earth's radius |
If cyclical = "guess"
(the default) the function will try to guess if lon
covers the whole globe and set cyclical conditions accordingly. For more
predictable results, set the boundary condition explicitly.
A named list with vectors for the zonal and meridional component of geostrophic wind.
Other meteorology functions:
Derivate()
,
EOF()
,
WaveFlux()
,
thermodynamics
,
waves
data(geopotential)
geopotential <- data.table::copy(geopotential)
geopotential[date == date[1], c("u", "v") := GeostrophicWind(gh, lon, lat)]
library(ggplot2)
ggplot(geopotential[date == date[1]], aes(lon, lat)) +
geom_contour(aes(z = gh)) +
geom_vector(aes(dx = u, dy = v), skip = 2) +
scale_mag()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.