windpowerlib.turbine_cluster_modelchain.TurbineClusterModelChain.run_model¶
- TurbineClusterModelChain.run_model(weather_df)[source]¶
Runs the model.
- Parameters:
weather_df (pandas.DataFrame) – DataFrame with time series for wind speed wind_speed in m/s, and roughness length roughness_length in m, as well as optionally temperature temperature in K, pressure pressure in Pa, density density in kg/m³ and turbulence intensity turbulence_intensity depending on power_output_model, density_model and standard_deviation_model chosen. The columns of the DataFrame are a MultiIndex where the first level contains the variable name (e.g. wind_speed) and the second level contains the height at which it applies (e.g. 10, if it was measured at a height of 10 m). See below for an example on how to create the weather_df DataFrame.
- Return type:
self
Examples
>>> import numpy as np >>> import pandas as pd >>> my_weather_df = pd.DataFrame(np.random.rand(2,6), ... index=pd.date_range('1/1/2012', ... periods=2, ... freq='H'), ... columns=[np.array(['wind_speed', ... 'wind_speed', ... 'temperature', ... 'temperature', ... 'pressure', ... 'roughness_length']), ... np.array([10, 80, 10, 80, ... 10, 0])]) >>> my_weather_df.columns.get_level_values(0)[0] 'wind_speed'