windkit.bwc_from_tswc

windkit.bwc_from_tswc(ts, wsbin_width=1.0, n_wsbins=30, n_sectors=12, normalize=True, **kwargs)[source]

Creates object from a timeseries.

Parameters:
  • ts (xarray.Dataset) – Xarray dataset with variables ‘wind_speed’ and ‘wind_direction’ and with a coordinate and dimension ‘time’.

  • wsbin_width (float) – Width of the wind speed bins, defaults to 1.0.

  • n_wsbins (int) – Number of wind speed bins, defaults to 30.

  • n_sectors (int) – Number of sectors, defaults to 12.

  • normalize (bool) – If set to True, convert wind vector count histogram to wind sector-wise relative frequency. Defaults to True

  • kwargs (dict) – Additional argument ‘wasp_desription’ can be added to the dataset.

Returns:

bwc – Binned wind climate from the timeseries.

Return type:

xarray.Dataset