Skip to content

Commit d3952de

Browse files
committed
Merge branch 'dev' into restructure/classes
2 parents 9381f9d + fb99319 commit d3952de

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

windpowerlib/wind_farm.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,15 @@ def assign_power_curve(self, wake_losses_model='power_efficiency_curve',
219219
power_curve['wind_speed'], power_curve['power'],
220220
standard_deviation_method=standard_deviation_method,
221221
block_width=block_width, **kwargs)
222+
else:
223+
# Add value zero to start and end of curve as otherwise there can
224+
# occure problems at the aggregation.
225+
if power_curve.iloc[0]['wind_speed'] != 0:
226+
power_curve.loc[power_curve.index[0] - 0.5] = [
227+
power_curve.index[0] - 0.5, 0.0]
228+
if power_curve.iloc[-1]['power'] != 0.0:
229+
power_curve.loc[power_curve.index[-1] + 0.5] = [
230+
power_curve.index[-1] + 0.5, 0.0]
222231
# Add power curves of all turbine types to data frame
223232
# (multiplied by turbine amount)
224233
df = pd.concat(

0 commit comments

Comments
 (0)