Closed joAschauer closed 1 year ago
Hi @joAschauer !
You're right, that is a problem and an old ghost coming back to haunt us (https://github.com/PyPSA/atlite/pull/10#issuecomment-468217178).
Back then we decided that a power curve should have a trailing 0 if it has a cutoff speed. If the power curve does not offer a 0 at the highest wind speed, it was considered not to have a cutoff speed. We obviously failed to uphold that convention, considering not all wind turbine models we ship with atlite adhere to it.
I would go with a mix of 1.) and 2.):
logger.warning(...)
in convert_wind(...)
if no cutout speed is defined (right-most element > 0
)get_windturbineconfig(...)
with an option like add_cutoff=True|False
and a logger.info(...)
if the power curve was modifiedDo you think that's a sensible approach?
Description
Hi there,
I am not sure whether this is a bug or if I did get something wrong. In the
convert_wind()
function, you usenp.interp()
in order to fit the wind speeds fromwnd_hub
to the specific power output:https://github.com/PyPSA/atlite/blob/549d0fdf22925e06ac3f726e801f215d993671dc/atlite/convert.py#L466-L467
I think this assumes that the last value in the power curve (i.e. the value corresponding to the highest wind speed) to be a zero in order to account for cutout at high wind speeds of a wind turbine correctly. By default, np.interp assumes fp[-1] for x > xp[-1] (documented in the "right" argument in np.interp). This will lead to overestimation of specific generation for high wind speed if the power curve does not end with zero. See the following example:
I noticed that most of the OEDB power curves do not end with a zero in the power curve values (only for 5 turbines in the OEDB table this is true). See below a list of all turbines in OEDB, where the power curve does not end with a zero:
The same is true for some of the atlite-builtin power curves:
Expected Behavior
I think atlite should do one of the two following options: 1) check if a high wind speed cutoff in the power curve is present and warn the user if this is not the case 2) by default assume a specific generation of 0 for wind speeds higher than the last value in the power curve
Potential Fixes
In case of option 2), one could either modify the
get_windturbineconfig()
function to append a zero to the end of the power curve or change the_interpolate()
function to: