pywasp.net_aep
- pywasp.net_aep(loss_table, ds_potential_aep)[source]
Calculates the Net Annual Energy Production (AEP) by applying the losses from a loss table to the potential AEP values provided in the dataset.
- Parameters:
loss_table (
DataFrame) – The DataFrame containing the losses. For an example of the expected structure, see the docstring of theget_loss_tablefunction.ds_potential_aep (
xarray.Dataset) – The dataset containing the potential_aep and potential_aep_sector data variables.
- Returns:
xarray.Dataset– The updated dataset including the net_aep and net_aep_sector values.- Raises:
ValueError – If
potential_aepandpotential_aep_sectorare not in theds_potential_aepdataset.
Notes
The function first validates the loss table. See
validate_loss_tablefunction.The function will be executed even if one out of the two potential_aep variables is missing.
I.e, if potential_aep_sector is missing the function will still calculate and append the net_aep and vice versa.
Examples
>>> loss_table = get_loss_table('dtu_default') >>> ds_net_aep = net_aep(loss_table, ds_potential_aep)