Last chance! 50% off unlimited learning
Sale ends in
Transform a longitude or latitude interval into the equivalent in meters depending on latitude.
dlon(dx, lat, a = 6731000)dlat(dy, a = 6731000)
dx(dlon, lat, a = 6731000)
dy(dlat, a = 6731000)
interval in meters
latitude, in degrees
radius of the Earth
interval in degrees
# NOT RUN {
library(data.table)
data(geopotential)
geopotential <- geopotential[date == date[1]]
# Geostrophic wind
geopotential[, c("u", "v") := GeostrophicWind(gh, lon, lat)] # in meters/second
geopotential[, c("dlon", "dlat") := .(dlon(u, lat), dlat(v))] # in degrees/second
geopotential[, c("u2", "v2") := .(dx(dlon, lat), dy(dlat))] # again in degrees/second
# }
Run the code above in your browser using DataLab