Skip to content

Commit 736c4c4

Browse files
committed
Output of p_curve() and p_curve_density_corr() in same unit as p_values
1 parent 8486bad commit 736c4c4

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

windpowerlib/power_output.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,14 @@ def p_curve(p_values, v_wind):
133133
p_values : pandas.DataFrame
134134
Power curve of the wind turbine.
135135
Indices are the wind speeds of the power curve in m/s, the
136-
corresponding power values in W are in the column 'P'.
136+
corresponding power values are in the column 'P'.
137137
v_wind : pandas.Series or array
138138
Wind speed at hub height in m/s.
139139
140140
Returns
141141
-------
142142
power_output : pandas.Series
143-
Electrical power output of the wind turbine in W.
143+
Electrical power output of the wind turbine in the unit of `p_values`.
144144
145145
Notes
146146
-------
@@ -178,13 +178,13 @@ def p_curve_density_corr(v_wind, rho_hub, p_values):
178178
Density of air at hub height in kg/m³.
179179
p_values : pandas.DataFrame
180180
Power curve of the wind turbine.
181-
The indices are the corresponding wind speeds of the power curve, the
182-
power values containing column is called 'P'.
181+
Indices are the wind speeds of the power curve in m/s, the
182+
corresponding power values are in the column 'P'.
183183
184184
Returns
185185
-------
186186
power_output : pandas.Series
187-
Electrical power output of the wind turbine in W.
187+
Electrical power output of the wind turbine in the unit of `p_values`.
188188
189189
Notes
190190
-----

windpowerlib/wind_turbine.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,12 @@ def restructure_data():
163163
data = np.delete(data, 0, 0)
164164
df = pd.DataFrame(data, columns=['v_wind', self.fetch_curve])
165165
df.set_index('v_wind', drop=True, inplace=True)
166-
nominal_power = wpp_df['p_nom'].iloc[0] * 1000
166+
nominal_power = wpp_df['p_nom'].iloc[0]
167167
return df, nominal_power
168168
if self.fetch_curve == 'P':
169169
filename = 'P_curves.csv'
170170
p_values, p_nom = restructure_data()
171-
self.p_values = p_values * 1000
171+
self.p_values = p_values
172172
else:
173173
filename = 'cp_curves.csv'
174174
self.cp_values, p_nom = restructure_data()

0 commit comments

Comments
 (0)