windkit.binned_wind_climate

Binned wind climate module

When measuring the wind speed and wind direction over a time period, one can create a histogram by counting the frequency of occurence for each wind speed and direction bin.

Because there can be large differences in the wind climate when the wind is coming from different wind directions, a binned wind distribution is usually specified per wind direction sector.

A valid Weibull wind climate therefore has a dimension sector and the variables wsbin and wdfreq. Also it must have a valid spatial structure. This module contains functions that operate on and create binned wind climates. This includes the ability to create bwc datasets both from files and from existing data, the ability to calculate common parameters from the bwc object, and the ability to write them to the legacy .tab format.

Functions

bwc_from_timeseries(ts[, ws_bin_width, ...])

Creates object from a timeseries.

bwc_from_weibull(A, k, wd_freq, ws_bins[, crs])

Creates object from directional A's and k's.

bwc_kinetic_energy(bwc, /[, air_density, ...])

Compute kinetic energy of the bwc.

bwc_mean_windspeed(bwc[, bysector])

Calculate the mean wind speed.

bwc_mean_windspeed3(bwc[, bysector])

Calculates mean third moment of the wind speed.

bwc_power_density(bwc[, bysector, air_density])

Calculate the power density

bwc_to_tabfile(bwc, /[, path])

Write bwc to tab-style ascii file.

bwc_ws_cdf(bwc, /[, bysector])

Calculate the cumulative distribution function (CDF) of the wind speed from a bwc

bwc_ws_freq_gt_mean(bwc, /[, bysector])

Calculate the frequency of wind speeds greater than the mean wind speed.

bwc_ws_moment(bwc, /[, n, bysector])

Calculate the n^th moment of the wind speed from a bwc

combine_bwcs(bwc_list)

Combines a list of bwc's into one binned wind climate.

count_to_wd_freq(wind_hist)

Convert wind vector count histogram to wind sector-wise relative frequency.

count_to_ws_freq(wind_hist)

Convert wind vector count histogram to wind sector-wise relative frequency.

count_to_ws_freq_by_sector(wind_hist)

Convert wind vector count histogram to wind sector-wise relative frequency.

create_time_attributes(ds[, hist])

Create time attributes for binned wind climate.

read_bwc(file[, crs])

Creates binned wind climate xarray.Dataset from file.

weibull_fit(bwc[, include_met_fields, atol])

Returns sectorwise Weibull parameters using WAsP's fitting algorithm.

wv_count_wrapper(func)

Decorator to handle wind vector count format.