windpowerlib.wind_turbine.get_turbine_data_from_file¶
-
windpowerlib.wind_turbine.
get_turbine_data_from_file
(turbine_type, file_)[source]¶ Fetches power (coefficient) curve data from a csv file.
See example_power_curves.csv’ and `example_power_coefficient_curves.csv in example/data for the required format of a csv file. The self-provided csv file may contain more columns than the example files. Only columns containing wind speed and the corresponding power or power coefficient as well as the column ‘nominal_power’ are taken into account.
Parameters: Returns: Power curve or power coefficient curve (pandas.DataFrame) and nominal power (float). Power (coefficient) curve DataFrame contains power coefficient curve values (dimensionless) or power curve values in W as column names with the corresponding wind speeds in m/s.
Return type: Examples
>>> from windpowerlib import wind_turbine >>> import os >>> source = os.path.join(os.path.dirname(__file__), '../example/data', ... 'example_power_curves.csv') >>> example_turbine = { ... 'hub_height': 100, ... 'rotor_diameter': 70, ... 'name': 'DUMMY 3', ... 'fetch_curve': 'power_curve', ... 'data_source': source} >>> e_t_1 = wind_turbine.WindTurbine(**example_turbine) >>> print(e_t_1.power_curve['value'][7]) 18000.0 >>> print(e_t_1.nominal_power) 150000