earthkit.meteo.wind.fieldlist.polar_to_xy¶
- earthkit.meteo.wind.fieldlist.polar_to_xy(magnitude, direction, convention='meteo')¶
Convert wind/vector data from polar representation to xy representation.
- Parameters:
magnitude (
FieldList|Field) – Speed/magnitude of the vector.direction (
FieldList|Field) – Direction of the vector (degrees). Must be of the same type asmagnitude(FieldList or Field) and have the same number of fields asmagnitude.convention (
str) –Specify how
directionis interpreted. The possible values are as follows:”meteo”:
directionis the meteorological wind direction (seedirection()for explanation)”polar”:
directionis the angle measured anti-clockwise from the x axis (East/right) to the vector
- Returns:
FieldList|Field– X vector component (same units asmagnitude). The result has the same type as the input (FieldList or Field).FieldList|Field– Y vector component (same units asmagnitude). The result has the same type as the input (FieldList or Field).
- Return type:
tuple[earthkit.data.FieldList | earthkit.data.Field, earthkit.data.FieldList | earthkit.data.Field]
Notes
In the target xy representation the x axis points East while the y axis points North.