windpowerlib.wind_turbine.get_turbine_data_from_file

windpowerlib.wind_turbine.get_turbine_data_from_file(turbine_type, path)[source]

Fetches turbine data from a csv file.

See example_power_curves.csv’, `example_power_coefficient_curves.csv and example_turbine_data.csv in example/data for the required format of a csv file. Make sure to provide wind speeds in m/s and power in W or convert units after loading the data.

Parameters:
  • turbine_type (str) – Specifies the turbine type data is fetched for.

  • path (str) – Specifies the source of the turbine data. See the example below for how to use the example data.

Returns:

Power curve or power coefficient curve (pandas.DataFrame) or nominal power (float) of one wind turbine type. Power (coefficient) curve DataFrame contains power coefficient curve values (dimensionless) or power curve values (in dimension given in file) with the corresponding wind speeds (in dimension given in file).

Return type:

pandas.DataFrame or float

Examples

>>> from windpowerlib import wind_turbine
>>> import os
>>> my_path = os.path.join(os.path.dirname(__file__), '../tests/data',
...     'power_curves.csv')
>>> d3 = get_turbine_data_from_file('DUMMY 3', my_path)
>>> print(d3['value'][7])
18000.0
>>> print(d3['value'].max())
1500000.0