pywasp.px_aep
- pywasp.px_aep(uncertainty_table, ds_net_aep, sensitivity_factor=1.5, percentile=90)[source]
Calculates the Annual Energy Production (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
) – The sensitivity factor value can either be calculated with thesensitivity_factor
function or given directly. Default is 1.5. Use ofsensitivity_factor
is recommended.percentile (
int
) – The exceedance probability corresponding to our desired Pxx percentile. Default is 90 in order to calcualte p90 (AEP value with a chance of being surpassed 90% of the times).
- Returns:
xarray.Dataset
– The updated dataset including the Px and Px_sector values.- Raises:
ValueError – If
net_aep
andnet_aep_sector
are not in theds_net_aep
dataset.
Notes
The function first validates the uncertainty table. See
validate_uncertainty_table
function.The function will be executed even if one out of the two net_aep variables is missing.
I.e, 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') >>> sensitivity_factor = sensitivity_factor(pwc, wtg, wind_perturbation_factor=0.05) >>> ds_net_aep = net_aep(uncertainty_table, ds_potential_aep) >>> px_aep(uncertainty_table, sensitivity_factor, ds_net_aep, percentile=90)