WindPowerFeatureAdder#

class openstef_models.transforms.energy_domain.wind_power_feature_adder.WindPowerFeatureAdder(**data: Any) None[source]

Bases: BaseConfig, TimeSeriesTransform

WindPowerFeatureAdder computes wind power from wind speed data.

This transform calculates wind speed at the wind turbine hub height using the wind profile power law, and estimates wind power output via a parameterized power curve. It can utilize either wind speed at hub height (if available) or extrapolate from wind speed at a reference height. The input wind speed can come from measurements, weather forecasts, or numerical weather model outputs. The resulting wind power feature can significantly improve forecast accuracy, especially for locations with substantial wind resources.

Example

>>> import pandas as pd
>>> from datetime import timedelta
>>> from openstef_core.datasets import TimeSeriesDataset
>>> from openstef_models.transforms.energy_domain import WindPowerFeatureAdder
>>>
>>> # Create sample dataset
>>> df = pd.DataFrame({
...     "windspeed": [5.0, 6.0, 7.0, 8.0, 9.0]
... }, index=pd.date_range('2025-01-01', periods=5, freq='1h'))
>>> dataset = TimeSeriesDataset(df, timedelta(hours=1))
>>> transform = WindPowerFeatureAdder()
>>> transformed_dataset = transform.transform(dataset)
>>> transformed_dataset.feature_names
['windspeed', 'windspeed_hub_height', 'wind_power']
Parameters:

data (Any)

windspeed_reference_column: str
reference_height: float
windspeed_hub_height_column: str
hub_height: float
rated_power: float
steepness: float
slope_center: float
feature_name: str
transform(data: TimeSeriesDataset) TimeSeriesDataset[source]

Transform the input data.

This method should apply a transformation to the input data and return a new instance.

Parameters:
Returns:

A new instance of the transformed data.

Raises:

NotFittedError – If the transform has not been fitted yet.

Return type:

TimeSeriesDataset

features_added() list[str][source]

List of feature names added by this transform.

Return type:

list[str]

Returns:

A list of strings representing the names of features added to the dataset by this transform. Default is an empty list.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': False, 'extra': 'ignore', 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self (BaseModel) – The BaseModel instance.

  • context (Any) – The context.

  • self

  • context

Return type:

None