windkit.mean_ws_moment#
- windkit.mean_ws_moment(wc_obj, moment=1, *, bysector=False, n_sectors=None)[source]#
Calculate the mean wind speed moment from a wind climate.
- Parameters:
wc_obj (xarray.Dataset) – Binned, Weibull or time series wind climate.
moment (float) – Moment to calculate, defaults to 1.
bysector (bool) – Calculate the moment by sector, defaults to False. A time series wind climate is binned into sectors with
windkit.wd_to_sector(), skipping samples without a direction.n_sectors (int, optional) – Number of sectors to bin a time series wind climate into when
bysectoris True. Defaults to 12.
- Returns:
wind_speed_moment, the mean of the wind speed raised tomoment, which is also stored as an attribute. Missing samples of a time series are skipped, and a sector without samples gives NaN.- Return type:
- Raises:
ValueError – If
wc_objis not a known wind climate,momentis not a scalar, orn_sectorsis given for anything but a time series wind climate withbysector=Trueor is not a positive integer.