pywasp.px_aep#

pywasp.px_aep(uncertainty_table, ds_net_aep, sensitivity_factor=1.5, percentile=90)[source]#

Calculate the AEP level reached with a given probability.

Parameters:
  • uncertainty_table (DataFrame) – The DataFrame containing the uncertainties.

  • ds_net_aep (xarray.Dataset) – The dataset containing the net_aep and net_aep_sector values.

  • sensitivity_factor (float, optional) – The sensitivity factor value can either be calculated with the estimate_sensitivity_factor function or given directly. Default is 1.5. Use of estimate_sensitivity_factor is recommended.

  • percentile (int, optional) – The exceedance probability corresponding to the desired Pxx percentile. Default is 90 to calculate P90 (AEP value with a 90% chance of being exceeded).

Returns:

xarray.Dataset – The updated dataset including the Px and Px_sector values.

Raises:

ValueError – If neither net_aep nor net_aep_sector are in the dataset.

Notes

The function first validates the uncertainty table. See validate_uncertainty_table function.

The function will execute even if only one of the two net_aep variables is present. For example, if net_aep_sector is missing, the function will still calculate and append the Px for all sectors, and vice versa.

Examples

>>> uncertainty_table = get_uncertainty_table('dtu_default')
>>> sf = estimate_sensitivity_factor(pwc, wtg, wind_perturbation_factor=0.05)
>>> ds_net_aep = net_aep(uncertainty_table, ds_potential_aep)
>>> px_aep(uncertainty_table, ds_net_aep, sensitivity_factor=sf, percentile=90)