windpowerlib.tools.logarithmic_interpolation_extrapolation

windpowerlib.tools.logarithmic_interpolation_extrapolation(df, target_height)[source]

Logarithmic inter- or extrapolates between the values of a data frame.

This function can be used for the inter-/extrapolation of the wind speed if it is available at two or more different heights, to approximate the value at hub height. The function is carried out when the parameter wind_speed_model ModelChain class is ‘log_interpolation_extrapolation’.

Parameters:
  • df (pandas.DataFrame) – DataFrame with time series for parameter that is to be interpolated or extrapolated. The columns of the DataFrame are the different heights for which the parameter is available. If more than two heights are given, the two closest heights are used. See example in linear_interpolation_extrapolation() on how the DataFrame should look like and how the function can be used.
  • target_height (float) – Height for which the parameter is approximated (e.g. hub height).
Returns:

Result of the inter-/extrapolation (e.g. wind speed at hub height).

Return type:

pandas.Series

Notes

For the logarithmic inter- and extrapolation the following equation is used [1]:

f(x) = \frac{\ln(x) \cdot (f(x_2) - f(x_1)) - f(x_2) \cdot
\ln(x_1) + f(x_1) \cdot \ln(x_2)}{\ln(x_2) - \ln(x_1)}

References

[1]Knorr, K.: “Modellierung von raum-zeitlichen Eigenschaften der Windenergieeinspeisung für wetterdatenbasierte Windleistungssimulationen”. Universität Kassel, Diss., 2016, p. 83