geodata.model.wind.extrapolate.WindExtrapolationModel#

class geodata.model.wind.extrapolate.WindExtrapolationModel(source: geodata.Dataset | geodata.Cutout, **kwargs)#

Wind speed estimation based on the an extrapolation model.

Model Details:

The wind speed is estimated using a linear regression of the logarithm of the wind speed against the logarithm of the height. The coefficients of the regression are stored in the dataset as a 2D array of shape (2,). The first coefficient is the slope of the regression line, and the second coefficient is the intercept. The wind speed is then estimated as \(\hat{v} = \alpha \cdot \log(z) + \beta\), where \(\alpha\) and \(\beta\) are the coefficients, and \(z\) is the height.

Residuals:

The residuals of the regression are stored in the dataset as a 2D array of shape (n,). The residuals are the difference between the estimated wind speed and the actual wind speed. The residuals are stored in the same order as the heights used in the regression.

Parameters:

source (Dataset | Cutout) – Dataset or Cutout object this model is based on.

Example

>>> from geodata import Dataset
>>> from geodata.model.wind import WindExtrapolationModel
>>> dataset = Dataset(module="merra2", weather_data_config="slv_flux_hourly", years=slice(2010, 2010), months=slice(1,2))
>>> model = WindExtrapolationModel(dataset)
>>> model.prepare()
>>> model.estimate(height=12, xs=slice(1, 2), ys=slice(1, 2), years=slice(2010, 2010), months=slice(1, 2))
SUPPORTED_WEATHER_DATA_CONFIGS#
type: str = 'wind'#

Type of the model.

metadata_keys: set[str]#
source#
property name: str#

Name of the model.

property module: str#

Module of the model.

property prepared: bool#

Check if the model is prepared.

Returns:

True if prepared.

Return type:

bool

property from_dataset: bool#

Check if the model is from a dataset.

property files#

Methods#

estimate(→ xarray.DataArray)

Estimate the wind speed at given coordinates.

extract_dataset_metadata(→ dict)

extract_cutout_metadata(→ dict)

prepare([force])

Prepare the model.