example.modelchain_example.get_weather_data

example.modelchain_example.get_weather_data(filename='weather.csv', **kwargs)[source]

Imports weather data from a file.

The data include wind speed at two different heights in m/s, air temperature in two different heights in K, surface roughness length in m and air pressure in Pa. The file is located in the example folder of the windpowerlib. The height in m for which the data applies is specified in the second row.

Parameters:filename (string) – Filename of the weather data file. Default: ‘weather.csv’.
Other Parameters:
 datapath (string, optional) – Path where the weather data file is stored. Default: ‘windpowerlib/example’.
Returns:weather_df – DataFrame with time series for wind speed wind_speed in m/s, temperature temperature in K, roughness length roughness_length in m, and pressure pressure in Pa. The columns of the DataFrame are a MultiIndex where the first level contains the variable name as string (e.g. ‘wind_speed’) and the second level contains the height as integer at which it applies (e.g. 10, if it was measured at a height of 10 m).
Return type:pandas.DataFrame