earthkit.meteo.wind.array.windrose

earthkit.meteo.wind.array.windrose(speed, direction, sectors=16, speed_bins=None, percent=True)

Generate windrose data.

Parameters:
  • speed (array-like) – Speed

  • direction (array-like) – Meteorological wind direction (degrees). See direction() for details. Values must be between 0 and 360.

  • sectors (number) – Number of sectors the 360 degrees direction range is split into. See below for details.

  • speed_bin (array-like) – Speed bins

  • percent (bool) – If False, returns the number of valid samples in each bin. If True, returns the percentage of the number of samples in each bin with respect to the total number of valid samples.

  • speed_bins (ArrayLike | None)

Returns:

  • 2d array-like – The bi-dimensional histogram of speed and direction. Values in speed are histogrammed along the first dimension and values in direction are histogrammed along the second dimension.

  • array-like – The direction bins (i.e. the sectors) (degrees)

Return type:

tuple[ArrayLike, ArrayLike]

Notes

The sectors parameter defines the number of direction bins in 360 degrees. The sectors do not start at 0 degrees (North) but are shifted by half a sector size. E.g. if sectors is 4 the sectors are defined as:

../../../../../_images/wind_sector.png