Convert wind components from model axes to geographic E/N axes.
geowind.Rd
Convert model wind from projection to Lat/Lon axes (or back) using the map factor. This is mainly important for calculating the wind direction. Only Lambert, Rotated LatLon, rotated Mercator and Polar Stereogrphic projections are supported.
Arguments
- u, v
u and v components of the model wind. These must be
geofield
objects or vectors of identical length.- inv
if inv=TRUE, the vector is rotated from N/E back to the grid axes.
- init
Either NULL or a list with components
mapfactor
andangle
(e.g. the output fromgeowind.init
). Ifu, v
are not geofields, init can not be NULL (because angle can no longer be calculated). Both components must be the same dimension asu, v
. If init=NULL, the local rotation angle and map factor are calculated prior to calculating the rotated wind vectors.- domain
A geofield or geodomain object.
Value
A list with components U,V
that have the same type as the input. The wind vector has been rotated to the geographical N/E axes, or inverse. geowind.init
returns a list with components angle,mapfactor
that can serve as init
value for later calls to geowind
.
Details
geowind.init()
is merely meant as a means to save computation time if the same correction must be done many times.