Skip to content

Conversation

@kilojoules
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for time-series wind resource data where wind speed and direction are turbine-specific (2D arrays with dimensions: time × turbine). The implementation handles averaging turbine-specific values to create reference arrays for simulation while preserving local site conditions through XRSite.

Key Changes

  • Enhanced dict_to_site to intelligently rename wind variables based on whether they are coordinates or data variables
  • Added logic to extract and process turbine-specific wind data, computing reference arrays using arithmetic mean for wind speed and vector mean for wind direction
  • Implemented conditional site creation: XRSite for turbine-specific data, Hornsrev1Site for uniform data
  • Added comprehensive test case with manual verification

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
wifa/pywake_api.py Core implementation: enhanced dict_to_site with smart renaming, added get_resource_data helper, implemented turbine-specific data averaging logic, and conditional site selection
tests/test_pywake.py New test function validating turbine-specific time-series handling with manual PyWake calculation for verification
examples/cases/turbine_specific_speeds_timeseries/wind_energy_system/system.yaml System configuration YAML for test case
examples/cases/turbine_specific_speeds_timeseries/wind_energy_system/analysis.yaml Analysis parameters configuration
examples/cases/turbine_specific_speeds_timeseries/plant_wind_farm/FLOW_toy_study_wind_farm.yaml Wind farm layout with 4 turbines in a line
examples/cases/turbine_specific_speeds_timeseries/plant_energy_turbine/DTU_10MW_turbine.yaml Turbine specification using DTU 10MW power and Ct curves
examples/cases/turbine_specific_speeds_timeseries/plant_energy_site/FLOW_toy_study_energy_site.yaml Site boundaries definition
examples/cases/turbine_specific_speeds_timeseries/plant_energy_resource/Stochastic_atHubHeight.nc NetCDF file containing turbine-specific wind data
examples/cases/turbine_specific_speeds_timeseries/plant_energy_resource/FLOW_toy_study_energy_resource.yaml Resource configuration referencing the NetCDF file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

kilojoules and others added 2 commits December 16, 2025 05:54
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…eseries/plant_energy_site/FLOW_toy_study_energy_site.yaml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@kilojoules kilojoules changed the title support timeseries with turbine-specific speeds Draft: support timeseries with turbine-specific speeds Dec 16, 2025
@kilojoules kilojoules force-pushed the pywake-timeseries-turbine-specific-speeds branch from 45ef86c to c7eb56f Compare December 16, 2025 20:55
@kilojoules kilojoules changed the title Draft: support timeseries with turbine-specific speeds Support timeseries with turbine-specific speeds Dec 17, 2025
@kilojoules kilojoules merged commit 97ca563 into main Dec 18, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants