earthkit.meteo.wind.xarray.polar_to_xy¶
- earthkit.meteo.wind.xarray.polar_to_xy(magnitude, direction, convention='meteo')¶
Convert wind/vector data from polar representation to xy representation.
- Parameters:
magnitude (
xr.DataArray) – Speed/magnitude of the vectordirection (
xr.DataArray) – Direction of the vector (degrees)convention (
str) –Specify how
directionis interpreted. The possible values are as follows:”meteo”:
directionis the meteorological wind direction”polar”:
directionis the angle measured anti-clockwise from the x axis (East/right) to the vector
- Returns:
xarray.DataArray– X vector component (same units asmagnitude)xarray.DataArray– Y vector component (same units asmagnitude)
- Return type:
tuple[xarray.DataArray, xarray.DataArray]
Notes
In the target xy representation the x axis points East while the y axis points North.