earthkit.meteo.wind.windrose¶
- earthkit.meteo.wind.windrose(speed: ArrayLike, direction: ArrayLike, sectors: int = 16, speed_bins: Iterable[float] | None = None, percent: bool = True) tuple[ArrayLike, ArrayLike]¶
- earthkit.meteo.wind.windrose(speed: xarray.DataArray, direction: xarray.DataArray, sectors: int = 16, speed_bins: Iterable[float] | None = None, percent: bool = True) tuple[xarray.DataArray, xarray.DataArray]
Generate windrose data.
- Parameters:
speed (
array-like | xarray.DataArray) – Speed.direction (
array-like | xarray.DataArray) – Meteorological wind direction (degrees). Values must be in [0, 360].sectors (
int, optional) – Number of sectors the 360 degree range is split into.speed_bins (
Iterable[float] | None, optional) – Speed bins. Must contain at least two values.percent (
bool, optional) – If True, return percentages. If False, return counts.
- Returns:
array-like | xarray.DataArray– 2D histogram over speed and direction bins.array-like | xarray.DataArray– Direction bin edges (degrees).
Implementations¶
windrose()calls one of the following implementations depending on the type of the input arguments:earthkit.meteo.wind.array.windrose()for array-likeearthkit.meteo.wind.xarray.windrose()for xarray.DataArray
The function returns an object of the same type as the input arguments.