earthkit.meteo.wind.array.windrose ================================== .. py:function:: earthkit.meteo.wind.array.windrose(speed, direction, sectors=16, speed_bins=None, percent=True) Generate windrose data. :param speed: Speed :type speed: :class:`array-like` :param direction: Meteorological wind direction (degrees). See :func:`direction` for details. Values must be between 0 and 360. :type direction: :class:`array-like` :param sectors: Number of sectors the 360 degrees direction range is split into. See below for details. :type sectors: :class:`number` :param speed_bin: Speed bins :type speed_bin: :class:`array-like` :param percent: 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. :type percent: :class:`bool` :returns: * :class:`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. * :class:`array-like` -- The direction bins (i.e. the sectors) (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: .. image:: /_static/wind_sector.png :width: 350px