-
Notifications
You must be signed in to change notification settings - Fork 4
Support timeseries with turbine-specific speeds #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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_siteto 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.
...s/cases/turbine_specific_speeds_timeseries/plant_energy_site/FLOW_toy_study_energy_site.yaml
Outdated
Show resolved
Hide resolved
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>
45ef86c to
c7eb56f
Compare
No description provided.