Skip to content

Commit ad0c583

Browse files
committed
Change order of parameters in p_curve() for consistency
1 parent df932ee commit ad0c583

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

windpowerlib/modelchain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ def turbine_power_output(self, v_wind, rho_hub):
313313
" are missing.")
314314
if self.density_corr is False:
315315
logging.debug('Calculating power output using power curve.')
316-
output = power_output.p_curve(self.wind_turbine.p_values,
317-
v_wind)
316+
output = power_output.p_curve(v_wind,
317+
self.wind_turbine.p_values)
318318
elif self.density_corr is True:
319319
logging.debug('Calculating power output using density ' +
320320
'corrected power curve.')

windpowerlib/power_output.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def cp_curve_density_corr(v_wind, rho_hub, d_rotor, cp_values):
116116
return p_curve_density_corr(v_wind, rho_hub, p_values)
117117

118118

119-
def p_curve(p_values, v_wind):
119+
def p_curve(v_wind, p_values):
120120
r"""
121121
Calculates the turbine power output using a power curve.
122122
@@ -126,12 +126,12 @@ def p_curve(p_values, v_wind):
126126
127127
Parameters
128128
----------
129+
v_wind : pandas.Series or numpy.array
130+
Wind speed at hub height in m/s.
129131
p_values : pandas.DataFrame
130132
Power curve of the wind turbine.
131133
Indices are the wind speeds of the power curve in m/s, the
132134
corresponding power values in W are in the column 'p'.
133-
v_wind : pandas.Series or numpy.array
134-
Wind speed at hub height in m/s.
135135
136136
Returns
137137
-------

0 commit comments

Comments
 (0)