Skip to content

Commit e2399b2

Browse files
Birgit SchachlerBirgit Schachler
authored andcommitted
Merge branch 'dev' into features/revise_example
2 parents 74bc189 + 2e3d24a commit e2399b2

File tree

6 files changed

+29
-26
lines changed

6 files changed

+29
-26
lines changed

doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Welcome to the windpowerlib documentation!
44
Contents:
55

66
.. toctree::
7-
:maxdepth: 5
7+
:maxdepth: 2
88
:glob:
99

1010
getting_started

doc/modules.rst

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
.. currentmodule:: windpowerlib
22

3+
#############
4+
API
5+
#############
36

47
Classes
58
=========
@@ -8,7 +11,7 @@ Classes
811
:toctree: temp/
912

1013
wind_turbine.WindTurbine
11-
modelchain.Modelchain
14+
modelchain.ModelChain
1215

1316

1417
Density
@@ -66,28 +69,28 @@ Functions for calculating power output of a wind turbine.
6669
power_output.p_curve_density_corr
6770

6871

69-
Modelchain
72+
ModelChain
7073
==============
7174

72-
Creating a Modelchain object.
75+
Creating a ModelChain object.
7376

7477
.. autosummary::
7578
:toctree: temp/
7679

77-
modelchain.Modelchain
80+
modelchain.ModelChain
7881

79-
Running the modelchain.
82+
Running the ModelChain.
8083

8184
.. autosummary::
8285
:toctree: temp/
8386

84-
modelchain.Modelchain.run_model
87+
modelchain.ModelChain.run_model
8588

86-
Methods of the Modelchain object.
89+
Methods of the ModelChain object.
8790

8891
.. autosummary::
8992
:toctree: temp/
9093

91-
modelchain.Modelchain.rho_hub
92-
modelchain.Modelchain.v_wind_hub
93-
modelchain.Modelchain.turbine_power_output
94+
modelchain.ModelChain.rho_hub
95+
modelchain.ModelChain.v_wind_hub
96+
modelchain.ModelChain.turbine_power_output

windpowerlib/density.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def temperature_gradient(temp_air, temp_height, hub_height):
2020
2121
Parameters
2222
----------
23-
temp_air : pandas.Series or array
23+
temp_air : pandas.Series or array-like
2424
Air temperature in K.
2525
temp_height : float
2626
Height in m for which the parameter `temp_air` applies.
@@ -70,9 +70,9 @@ def temperature_interpol(temp_air_1, temp_air_2,
7070
7171
Parameters
7272
----------
73-
temp_air_1 : pandas.Series or array
73+
temp_air_1 : pandas.Series or array-like
7474
Air temperature.
75-
temp_air_2 : pandas.Series or array
75+
temp_air_2 : pandas.Series or array-like
7676
Second air temperature for interpolation.
7777
temp_air_height_1 : float
7878
Height for which the parameter `temp_air_1` applies.
@@ -116,13 +116,13 @@ def rho_barometric(pressure, pressure_height, hub_height, temp_hub):
116116
117117
Parameters
118118
----------
119-
pressure : pandas.Series or array
119+
pressure : pandas.Series or array-like
120120
Air pressure in Pa.
121121
pressure_height : float
122122
Height in m for which the parameter `pressure` applies.
123123
hub_height : float
124124
Hub height of wind turbine in m.
125-
temp_hub : pandas.Series or array
125+
temp_hub : pandas.Series or array-like
126126
Air temperature at hub height in K.
127127
128128
Returns
@@ -172,13 +172,13 @@ def rho_ideal_gas(pressure, pressure_height, hub_height, temp_hub):
172172
173173
Parameters
174174
----------
175-
pressure : pandas.Series or array
175+
pressure : pandas.Series or array-like
176176
Air pressure in Pa.
177177
pressure_height : float
178178
Height in m for which the parameter `pressure` applies.
179179
hub_height : float
180180
Hub height of wind turbine in m.
181-
temp_hub : pandas.Series or array
181+
temp_hub : pandas.Series or array-like
182182
Air temperature at hub height in K.
183183
184184
Returns

windpowerlib/power_output.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ def cp_curve(v_wind, rho_hub, d_rotor, cp_values):
2121
2222
Parameters
2323
----------
24-
v_wind : pandas.Series or array
24+
v_wind : pandas.Series or array-like
2525
Wind speed at hub height in m/s.
26-
rho_hub : pandas.Series or array
26+
rho_hub : pandas.Series or array-like
2727
Density of air at hub height in kg/m³.
2828
d_rotor : float
2929
Diameter of rotor in m.
@@ -85,7 +85,7 @@ def cp_curve_density_corr(v_wind, rho_hub, d_rotor, cp_values):
8585
----------
8686
v_wind : pandas.Series or array
8787
Wind speed at hub height in m/s.
88-
rho_hub : pandas.Series or array
88+
rho_hub : pandas.Series or array-like
8989
Density of air at hub height in kg/m³.
9090
cp_values : pandas.DataFrame
9191
Power coefficient curve of the wind turbine.

windpowerlib/tests/modelchain_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ def test_rho_hub(self):
9191

9292
def test_run_model(self):
9393
# Test with default parameters of modelchain (power curve)
94-
power_output_exp = pd.Series(data=[1731.8874, 3820.15227])
94+
power_output_exp = pd.Series(data=[1731887.39768, 3820152.27489])
9595
test_mc = mc.ModelChain(self.test_wt)
9696
test_mc.run_model(self.weather, self.data_height)
9797
assert_series_equal(test_mc.power_output, power_output_exp)
9898

9999
def test_different_models(self):
100100
# Test with density corrected power curve
101-
power_output_exp = pd.Series(data=[1430.31277, 3746.07521])
101+
power_output_exp = pd.Series(data=[1430312.76771, 3746075.21279])
102102
self.test_modelchain['density_corr'] = True
103103
test_wt = wt.WindTurbine(**self.test_turbine)
104104
test_mc = mc.ModelChain(test_wt, **self.test_modelchain)

windpowerlib/wind_speed.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ def logarithmic_wind_profile(v_wind, v_wind_height, hub_height, z_0,
2323
2424
Parameters
2525
----------
26-
v_wind : pandas.Series or array
26+
v_wind : pandas.Series or array-like
2727
Wind speed time series.
2828
v_wind_height : float
2929
Height for which the parameter `v_wind` applies.
3030
hub_height : float
3131
Hub height of wind turbine.
32-
z_0 : pandas.Series or array or float
32+
z_0 : pandas.Series or array-like or float
3333
Roughness length.
3434
obstacle_height : float
3535
Height of obstacles in the surrounding area of the wind turbine. Set
@@ -93,7 +93,7 @@ def v_wind_hellman(v_wind, v_wind_height, hub_height, hellman_exp=None,
9393
9494
Parameters
9595
----------
96-
v_wind : pandas.Series or array
96+
v_wind : pandas.Series or array-like
9797
Wind speed time series.
9898
v_wind_height : float
9999
Height for which the parameter `v_wind` applies.

0 commit comments

Comments
 (0)