Skip to content
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

feat(wind): Bias correct wind speeds based on scaling to a known average #403

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

coroa
Copy link
Member

@coroa coroa commented Nov 1, 2024

The ERA5 long run average is determined during cutout preparation by averaging the monthly mean wind speeds from 1980 to the last year and made available as a dataset variable wnd100m_lra.

Example usage:

cutout.wind(
    atlite.windturbines.Enercon_E101_3000kW,
    real_long_run_average_windspeed="gwa3_250_windspeed_100m.tif",
)

TODO:

  • Add docs
  • Add tests

Closes #373 .

Changes proposed in this Pull Request

Checklist

  • Code changes are sufficiently documented; i.e. new functions contain docstrings and further explanations may be given in doc.
  • Unit tests for new features were added (if applicable).
  • Newly introduced dependencies are added to environment.yaml, environment_docs.yaml and setup.py (if applicable).
  • A note for the release notes doc/release_notes.rst of the upcoming release is included.
  • I consent to the release of this PR's code under the MIT license.

The ERA5 long run average is determined during cutout preparation by averaging
the monthly mean wind speeds from 1980 to the last year and made available as
a dataset variable wnd100m_lra.

Example usage:

cutout.wind(
    atlite.windturbines.Enercon_E101_3000kW,
    real_long_run_average_windspeed="gwa3_250_windspeed_100m.tif",
)
@coroa
Copy link
Member Author

coroa commented Nov 1, 2024

Since the bias correction factor is independent of the turbine model and other settings of the conversion, it might make sense to either incorporate the full bias correction into the cutout preparation.

Or disentangle it completely from the actual stored dataset. ie. there could be a calculate_windspeed_bias_correction(cutout, gwa) like function which retrieves the long run average wind speed on demand and then calculates the bias correction for scaling the dataset wind speeds to the gwa average, which the user then passes as argument to the wind conversion function. So that the cutout does not need to store anything and the calculation of the scaling factor does not need to be repeatedly applied either.

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.

Allow wind speeds to be corrected by a location-specific linear factor (e.g. from GWA)
1 participant