Skip to main content

A tool to assess yield uplift of wind turbines

Project description

wind-up

A Python package for assessing wind turbine yield uplift from operational data.

PyPI version License Python versions Lint & Format: Ruff Typing: mypy Lint and test

wind-up compares turbine performance before and after a change to estimate energy-yield uplift. It is designed for wind-farm SCADA analysis where the signal of interest is small, operational data is messy, and a credible result needs more than a simple before/after power-curve plot.

The package is published on PyPI as res-wind-up and imported in Python as wind_up.

What it does

wind-up provides a complete analysis workflow for pre/post or toggle-style uplift assessments:

  • prepares and filters wind-farm SCADA data
  • builds SCADA-derived power curves by turbine type
  • adds reanalysis, mast, or LiDAR reference data
  • applies yaw direction northing corrections
  • estimates wind speed and waking state
  • detrends test turbine performance against reference wind direction
  • performs pre/post power performance analysis with reversal checks and bootstrapped uncertainty
  • combines per-reference results into turbine-level and fleet-level uplift estimates
  • writes result tables and diagnostic plots for review

The public examples cover several realistic analysis shapes, including SMARTEOLE toggle data, Kelmarsh turbine data, and WeDoWind challenge-style pre/post assessments.

Methodology

The validation methodology that wind-up implements is described in detail in wind-up uplift validation methodology v3 in the docs folder.

Installation

Install the released package with your Python environment manager of choice. Python 3.10 to 3.13 is supported.

Using uv:

uv add res-wind-up

Using pip:

python -m venv .venv
source .venv/bin/activate
pip install res-wind-up

On Windows PowerShell, activate the virtual environment with:

.venv\Scripts\Activate.ps1

To run the bundled notebooks and example scripts, install the optional example dependencies as well:

uv add "res-wind-up[examples]"
# or
pip install "res-wind-up[examples]"

Check that the package imports correctly:

import wind_up

print(wind_up.__version__)

First steps

The fastest way to understand the expected data model and analysis flow is to start from the examples:

A typical analysis has four stages:

from wind_up.interface import AssessmentInputs
from wind_up.main_analysis import run_wind_up_analysis
from wind_up.models import PlotConfig, WindUpConfig
from wind_up.reanalysis_data import ReanalysisDataset

# 1. Build a WindUpConfig describing the asset, test turbines,
#    reference turbines, analysis dates, filters, and output folder.
cfg = WindUpConfig(...)

# 2. Configure diagnostic plot output.
plot_cfg = PlotConfig(
    show_plots=False,
    save_plots=True,
    plots_dir=cfg.out_dir / "plots",
)

# 3. Prepare inputs from SCADA, metadata, and reference datasets.
assessment_inputs = AssessmentInputs.from_cfg(
    cfg=cfg,
    plot_cfg=plot_cfg,
    scada_df=scada_df,
    metadata_df=metadata_df,
    reanalysis_datasets=[ReanalysisDataset(id="ERA5", data=reanalysis_df)],
    cache_dir=cache_dir,
)

# 4. Run the assessment and save the per-test/per-reference results.
results_per_test_ref_df = run_wind_up_analysis(assessment_inputs)
results_per_test_ref_df.to_csv(cfg.out_dir / "results_per_test_ref.csv", index=False)

For complete, executable versions of this pattern, use the example files above. The configuration is intentionally explicit: wind-resource assessments are sensitive to turbine metadata, analysis periods, filters, and reference choices, so those assumptions should be visible in code.

Inputs and outputs

At a high level, an assessment needs:

Input Purpose
SCADA time series turbine power, wind speed, yaw, pitch, RPM, downtime, and related operational signals
turbine metadata turbine names, turbine type, rated power, rotor diameter, and location where available
analysis configuration test/reference turbines, pre/post or toggle periods, filters, long-term settings, and output paths
reference data reanalysis, mast, LiDAR, or reference-turbine signals used for detrending and validation

The main analysis returns a pandas.DataFrame with per-test/per-reference uplift results, uncertainty columns, warning counts, and supporting diagnostic metrics. When plot saving is enabled, diagnostic figures are written under PlotConfig.plots_dir; CSV results are written under the configured assessment output directory.

[!NOTE] On import, wind-up selects the non-interactive matplotlib Agg backend unless the MPLBACKEND environment variable is already set. This lets analyses run headless (CI, SSH, batch servers) without an X server. Set MPLBACKEND yourself before importing wind_up if you want an interactive backend.

Analysis features

wind-up includes utilities for the parts of an uplift study that usually need careful handling:

  • SCADA cleaning and filtering for unavailable or implausible operating data
  • power curve estimation by turbine type
  • wind speed estimation from turbine power (preferred for reference turbines) and measured wind speed
  • waking state calculation per timestep using turbine coordinates and SCADA
  • yaw direction northing checks and optional optimized northing corrections
  • long-term distribution calculations
  • wind speed drift checks
  • pre/post and toggle-based splitting
  • reference selection and combined uplift calculations
  • diagnostic plots for input data, detrending, power curves, yaw direction, reanalysis comparison, waking state, long-term distributions, and final results

Development

This project uses uv for dependency management, poethepoet for task running, Ruff for formatting/linting, mypy for type checking, and pytest with coverage for tests.

Create the development environment:

uv sync --all-extras --dev

[!TIP] For normal local development and pre-push checks, start with the fast suite. It runs formatting, linting, type checking, and tests that are not marked as slow.

uv run poe all-fast

Run the full local verification suite before releases or when you need the slow regression tests as well:

uv run poe all

[!NOTE] uv run poe all includes tests marked as slow. On a typical local machine it can take 15 minutes or more; uv run poe all-fast is much quicker for everyday iteration.

Individual tasks are also available:

uv run poe lint-check   # formatter, linter, and mypy checks
uv run poe test-fast    # tests excluding the slow marker
uv run poe test         # full test suite with coverage report
uv run poe jupy         # start JupyterLab for example exploration

[!WARNING] uv run poe jupy starts a local JupyterLab server and keeps running until you stop it. Use it when you want an interactive notebook session, not as a one-shot verification command.

The GitHub Actions workflow runs linting and tests on Python 3.10 and 3.13.

Project status

The package is marked as beta in the Python package metadata. Interfaces and configuration options may still evolve, but the repository includes a substantial test suite and example analyses for regression coverage.

License

wind-up is released under the BSD 3-Clause License. See LICENSE.txt for the full license text.

Contact

For questions about the package, contact Alex Clerc at Alex.Clerc@res-group.com.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

res_wind_up-0.5.0.tar.gz (104.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

res_wind_up-0.5.0-py3-none-any.whl (99.2 kB view details)

Uploaded Python 3

File details

Details for the file res_wind_up-0.5.0.tar.gz.

File metadata

  • Download URL: res_wind_up-0.5.0.tar.gz
  • Upload date:
  • Size: 104.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for res_wind_up-0.5.0.tar.gz
Algorithm Hash digest
SHA256 56e8ded2a0231feb4919091d5a34c9a0ba5c3522e2d218835160213c8eac5995
MD5 79ae0eccb72ee87dea52436fceba1c7c
BLAKE2b-256 0fe44aded2d3d677ff290cc521aebabe299fbda4aeca9448d8e330193822eacf

See more details on using hashes here.

Provenance

The following attestation bundles were made for res_wind_up-0.5.0.tar.gz:

Publisher: pypi-publish.yaml on resgroup/wind-up

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file res_wind_up-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: res_wind_up-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 99.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for res_wind_up-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb44886279d2b74856bc6798b3140d58efa32222ed0d6c36d5c355125f7908e1
MD5 32035b6e5213611d31387c91209b2162
BLAKE2b-256 2ba70608ee2854c4349af438549ade477afaf91be3fa481e87ca41087ed72cf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for res_wind_up-0.5.0-py3-none-any.whl:

Publisher: pypi-publish.yaml on resgroup/wind-up

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page