cordex.derotate_vector#
- derotate_vector(u, v, lon=None, lat=None, pollon=None, pollat=None)[source]#
Derotate vector components from rotated coordinates.
The function performs a backward transformation of, e.g., velocity components u and v from a rotated spherical coordinate system to a geographical system. If only the components u and v are provided, it is assumed, they are DataArrays containing a rotated latitude longitude grid mapping and lon lat coordinates that are used for the transformation.
- Parameters:
u (float or DataArray) – u component of vector in rotated coordinate system.
v (float or DataArray) – v component of vector in rotated coordinate system.
lon (float or DataArray) – Longitude coordinates in which to transform the vector components.
lat (float or DataArray) – Latitude coordinates in which to transform the vector components.
pollon (float) – Longitude of north pole in geographical coordinate system.
pollat (float) – Latitude of north pole in geographical coordinate system.
- Returns:
ut (DataArray) – Transformed u vector component.
vt (DataArray) – Transformed v vector component.