windpowerlib.wind_turbine.WindTurbine.fetch_turbine_data¶
-
WindTurbine.
fetch_turbine_data
(fetch_curve, data_source)[source]¶ Fetches data of the requested wind turbine.
Method fetches nominal power as well as power coefficient curve or power curve from a data set provided in the OpenEnergy Database (oedb). You can also import your own power (coefficient) curves from a file. For that the wind speeds in m/s have to be in the first row and the corresponding power coefficient curve values or power curve values in W in a row where the first column contains the turbine name. See example_power_curves.csv’ and `example_power_coefficient_curves.csv in example/data for the required form of a csv file (more columns can be added). See
get_turbine_data_from_file()
for an example reading data from a csv file.Parameters: - fetch_curve (string) – Parameter to specify whether a power or power coefficient curve should be retrieved from the provided turbine data. Valid options are ‘power_curve’ and ‘power_coefficient_curve’. Default: None.
- data_source (string) – Specifies whether turbine data (f.e. nominal power, power curve, power coefficient curve) is loaded from the OpenEnergy Database (‘oedb’) or from a csv file (‘<path including file name>’). Default: ‘oedb’.
Returns: Return type: self
Examples
>>> from windpowerlib import wind_turbine >>> enerconE126 = { ... 'hub_height': 135, ... 'rotor_diameter': 127, ... 'name': 'E-126/4200', ... 'fetch_curve': 'power_coefficient_curve', ... 'data_source': 'oedb'} >>> e126 = wind_turbine.WindTurbine(**enerconE126) >>> print(e126.power_coefficient_curve['value'][5]) 0.44 >>> print(e126.nominal_power) 4200000.0