GeostrophicWind {metR}R Documentation

Calculate geostrophic winds

Description

Geostrophic wind from a geopotential height field.

Usage

GeostrophicWind(gh, lon, lat, cyclical = "guess", g = 9.81, a = 6371000)

Arguments

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

Details

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.

Value

A named list with vectors for the zonal and meridional component of geostrophic wind.

See Also

Other meteorology functions: Derivate(), EOF(), WaveFlux(), thermodynamics, waves

Examples

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()


[Package metR version 0.15.0 Index]