Skip to content

Commit 53e7f99

Browse files
committed
Merge branch 'restructure/classes' into dev
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
1 parent 98b3865 commit 53e7f99

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

windpowerlib/wind_farm.py

Lines changed: 10 additions & 1 deletion
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(
@@ -239,7 +248,7 @@ def assign_power_curve(self, wake_losses_model='power_efficiency_curve',
239248
standard_deviation_method=standard_deviation_method,
240249
block_width=block_width, **kwargs)
241250
if (wake_losses_model == 'constant_efficiency' or
242-
wake_losses_model == 'wind_efficiency_curve'):
251+
wake_losses_model == 'power_efficiency_curve'):
243252
wind_farm_power_curve = (
244253
power_curves.wake_losses_to_power_curve(
245254
wind_farm_power_curve['wind_speed'].values,

0 commit comments

Comments
 (0)