windkit.binned_wind_climate.create_time_attributes

windkit.binned_wind_climate.create_time_attributes(ds: Dataset, hist=None)[source]

Create time attributes for binned wind climate.

We attached the time attributes to a new or existing binned wind climate. If it has existing attributes, these will be used as well when calculating the meta data.

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

  • hist (xarray.Dataset, optional) – A valid pywasp histogram dataset with, defaults to None

Returns:

dic_result – Dictionary with ‘start_time’, ‘end_time’, ‘interval’, ‘count’, ‘count_missing’, ‘recovering_percentage’

Return type:

dict