Skip to content

Use site mean power curve#86

Open
samuelwnaylor wants to merge 1 commit intomainfrom
use-site-mean-power-curve
Open

Use site mean power curve#86
samuelwnaylor wants to merge 1 commit intomainfrom
use-site-mean-power-curve

Conversation

@samuelwnaylor
Copy link
Collaborator

@samuelwnaylor samuelwnaylor commented Mar 6, 2026

Summary

When gapfill_uplift_curve_using_site_mean_power_curve = True in the WindUpConfig, any wind speed bin with insufficient data (fewer than 3 hours per m/s of bin width) is filled using the site mean power curve rather than the previous flat fill approach.

Problem

Previously, when a turbine/period had sparse data at high wind speeds, _cook_pp would detect a false "rated wind speed" at the highest observed power value and fill all wind speed bins above that with that single flat power value. For example, a turbine rated at 1300 kW when reaching 12 m/s could have its cooked power curve clip flat at 700 kW if data above 8 m/s wind speed was sparse, leading to an unrealistic power curve for the uplift calculation.

Solution

The site mean power curve is already computed during preprocessing from all turbines of the same type across the full dataset. For each invalid bin, the corresponding power value is now obtained by linearly interpolating the site mean curve at that bin's midpoint wind speed.

This means a bin at 10 m/s gets the site mean power at 10 m/s, a bin at 14 m/s gets the site mean power at 14 m/s, and so on, allowing the cooked power curve to follow the site mean curve up to rated power rather than clipping flat at lower power.

Changes

  • Added gapfill_uplift_curve_using_site_mean_power_curve: bool = False to WindUpConfig
  • Added site_mean_pc_df optional parameter to _cook_pp, threaded through pp analysis functions
  • In main_analysis.py, scada_pc (already available per turbine type) is passed as site_mean_pc_df when the WindUpConfig.gapfill_uplift_curve_using_site_mean_power_curve flag is enabled

Notes

  • Valid bins (those with sufficient measured data) are completely unaffected, because the interpolation only applies where pre_valid or post_valid is False
  • When site_mean_pc_df=None (the default), behaviour is identical to before
  • Tests added in test_cook_pp.py covering the gap-filling behaviour

@samuelwnaylor samuelwnaylor force-pushed the use-site-mean-power-curve branch from 43f21b0 to 2ee57b2 Compare March 6, 2026 21:09
@samuelwnaylor samuelwnaylor force-pushed the use-site-mean-power-curve branch from 2ee57b2 to cfc630f Compare March 6, 2026 21:18
@samuelwnaylor samuelwnaylor marked this pull request as ready for review March 6, 2026 21:57
@samuelwnaylor samuelwnaylor requested a review from aclerc as a code owner March 6, 2026 21:57
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.

1 participant