wind-python / windpowerlib

The windpowerlib is a library to model the output of wind turbines and farms.
https://oemof.org/
MIT License
330 stars 105 forks source link

Error in OEP wind_turbine_library causes fails in windpowerlib #100

Closed uvchik closed 4 years ago

uvchik commented 4 years ago

The turbine with turbine_id 152 in supply/wind_turbine_library is corrupt:

In power_curve_wind_speeds you will find duplicate values causing errors in the data processing of the windpowerlib as the windspeed are used as columns.

[3.0, 3.5, 4.0, 4.5, 4.8, 5.0, 5.2, 6.0, 6.2, 6.4, 6.5, 6.6, 6.6, 6.7, 6.8, 6.9, 6.9, 6.9, 6.9, 7.0, 7.0, 7.0, 7.0, 7.0, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5, 10.0, 10.2, 10.5, 10.6, 10.7, 10.7, 10.7, 10.8, 10.8, 10.8, 10.8, 10.8, 10.8, 10.8, 10.8, 10.8, 10.9, 11.0, 11.2, 11.5, 11.8, 12.0, 13.0, 14.0, 15.0, 17.5, 20.0, 22.5, 25.0]
Ludee commented 4 years ago

Thanks for testing and spotting! @christian-rli please fix this and document here: https://github.com/OpenEnergyPlatform/data-preprocessing/issues/28

uvchik commented 4 years ago

@christian-rli could you please just remove the line, because this bug can make the windpowerlib unusable. Most users will not be able to fix it.

For the future we should think of how to avoid such issues.

Ludee commented 4 years ago

I removed the line by hand since @christian-rli is not available this week.

uvchik commented 4 years ago

We could add a column verified to the table. In the windpowerlib we will only use turbines with verified is True by default. If you want to use a not verified turbine you have to pass a special parameter like verified_only=False. So a corrupt data set will not break the windpowerlib but if you want to use a new data set it is still possible. If everything is fine we can set verified to true.

uvchik commented 4 years ago

I removed the line by hand since @christian-rli is not available this week.

Thank you @Ludee :+1:

Ludee commented 4 years ago

That's a good idea. Another idea is to validate the data in the windpowerlib when importing.

uvchik commented 4 years ago

That's a good idea. Another idea is to validate the data in the windpowerlib when importing.

I think we should do both. The windpowerlib should not be vulnerable by corrupt data sets and the oep should make sure that it does not provide corrupt data.

uvchik commented 4 years ago

I addressed this issue in PR #101 and added an issue in the OEP-repository.