Skip to content

Commit a09f9a6

Browse files
committed
Update docstring
1 parent 2e868b5 commit a09f9a6

File tree

1 file changed

+24
-21
lines changed

1 file changed

+24
-21
lines changed

windpowerlib/wind_turbine.py

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,18 @@ class WindTurbine(object):
2525
hub_height : float
2626
Hub height of the wind turbine in m.
2727
power_curve : :pandas:`pandas.DataFrame<frame>` or dict (optional)
28-
Directly sets the power curve. DataFrame/dictionary must have
29-
'wind_speed' and 'value' columns/keys with wind speeds in m/s and
28+
If provided directly sets the power curve. DataFrame/dictionary must
29+
have 'wind_speed' and 'value' columns/keys with wind speeds in m/s and
3030
the corresponding power curve value in W. If not set the value is
3131
retrieved from 'power_curve.csv' file in `path`. In that case a
3232
`turbine_type` is needed. Default: None.
3333
power_coefficient_curve : :pandas:`pandas.DataFrame<frame>` or dict (optional)
34-
Directly sets the power coefficient curve. DataFrame/dictionary must
35-
have 'wind_speed' and 'value' columns/keys with wind speeds in m/s
36-
and the corresponding power coefficient curve value. If not set the
37-
value is retrieved from 'power_coefficient_curve.csv' file in `path`.
38-
In that case a `turbine_type` is needed. Default: None.
34+
If provided directly sets the power coefficient curve.
35+
DataFrame/dictionary must have 'wind_speed' and 'value' columns/keys
36+
with wind speeds in m/s and the corresponding power coefficient curve
37+
value. If not set the value is retrieved from
38+
'power_coefficient_curve.csv' file in `path`. In that case a
39+
`turbine_type` is needed. Default: None.
3940
turbine_type : str (optional)
4041
Name of the wind turbine type. Must be provided if power (coefficient)
4142
curve, nominal power or rotor diameter is retrieved from self-provided
@@ -46,17 +47,20 @@ class WindTurbine(object):
4647
provided in the oedb turbine library.
4748
Default: None.
4849
rotor_diameter : float (optional)
49-
Diameter of the rotor in m. Only needs to be provided if power output
50+
Diameter of the rotor in m. If not set the value is
51+
retrieved from 'turbine_data.csv' file in `path`. In that case a
52+
`turbine_type` is needed.
53+
The rotor diameter only needs to be set if power output
5054
is calculated using the power coefficient curve. Default: None.
5155
nominal_power : float (optional)
5256
The nominal power of the wind turbine in W. If not set the value is
5357
retrieved from 'turbine_data.csv' file in `path`. In that case a
5458
`turbine_type` is needed. Default: None.
5559
path : str (optional)
56-
Directory where the turbine database files are located. The names of
57-
the files need to be 'power_coefficient_curve.csv', 'power_curve.csv',
58-
'turbine_data.csv'. Set path to `None` to ignore turbine data from
59-
files. Default: 'oedb'.
60+
Directory where the turbine database files are located. The files need
61+
to be named 'power_coefficient_curve.csv', 'power_curve.csv', and
62+
'turbine_data.csv'. By default the oedb turbine library files are used.
63+
Set path to `None` to ignore turbine data from files. Default: 'oedb'.
6064
6165
Attributes
6266
----------
@@ -67,11 +71,11 @@ class WindTurbine(object):
6771
rotor_diameter : None or float
6872
Diameter of the rotor in m. Default: None.
6973
power_coefficient_curve : None, pandas.DataFrame or dictionary
70-
Power coefficient curve of the wind turbine. DataFrame/dictionary must
71-
have 'wind_speed' and 'value' columns/keys with wind speeds
74+
Power coefficient curve of the wind turbine. DataFrame/dictionary
75+
containing 'wind_speed' and 'value' columns/keys with wind speeds
7276
in m/s and the corresponding power coefficients. Default: None.
7377
power_curve : None, pandas.DataFrame or dictionary
74-
Power curve of the wind turbine. DataFrame/dictionary must have
78+
Power curve of the wind turbine. DataFrame/dictionary containing
7579
'wind_speed' and 'value' columns/keys with wind speeds in m/s and the
7680
corresponding power curve value in W. Default: None.
7781
nominal_power : None or float
@@ -80,13 +84,12 @@ class WindTurbine(object):
8084
Notes
8185
------
8286
Your wind turbine object needs to have a power coefficient or power curve.
83-
If you set the parameters `power_curve`, `power_coefficient_curve` and/or
84-
`nominal_power` to True the respective data is automatically fetched from
85-
the oedb turbine library (a dataset provided in the OpenEnergy Database).
86-
You can also provide your own csv files with power coefficient and power
87-
curves. See `example_power_curves.csv',
87+
By default they are fetched from the oedb turbine library that is provided
88+
along with the windpowerlib. In that case `turbine_type` must be specified.
89+
You can also set the curves directly or provide your own csv files with
90+
power coefficient and power curves. See `example_power_curves.csv',
8891
`example_power_coefficient_curves.csv` and `example_turbine_data.csv`
89-
in example/data for the required form of such csv files.
92+
in example/data for the required format of such csv files.
9093
9194
Examples
9295
--------

0 commit comments

Comments
 (0)