-
Notifications
You must be signed in to change notification settings - Fork 99
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
fix: power curves with missing cutoff #316
Conversation
Thanks @joAschauer ! A few suggestions:
(Since that method is called internally by
|
Hi @euronion, thanks for the feedback, I can get back to this soon. I put the warning and modification code in I can also try to add a deprecation warning, I think it's reasonable to default to |
Good thinking with the custom power curves! I generally lean towards making everyone responsible for the correctness of their own input (custom power curves), but I think keeping the warning is also fair. How about putting the warning + the modification into a single function and adding that function to |
Hi @euronion, I made an update and moved the turbine config validation to a new function. I did not implement the I only call the validation function in |
Very nice! A few final points:
|
hi @euronion I addressed your points. You can check again and merge if you are happy with it. |
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.
Looking good! Thank you for the contribution!
Closes #314
Change proposed in this Pull Request
First proposal to fix #314. It is still to discuss if the appended cutoff wind speed should be slightly higher than the last entry in the power curve. Currently, np.interp will lead to 0 if the exact cutoff wind speed is met.
Description
convert_wind()
function throws a warning if the power curve has no cutoff for high wind speeds i.e. if the last value is not zero.Cutout.wind()
method now has a new argumentadd_cutoff
. When set to True, this will modify the power curve by inserting a zero at the highest wind speed in the power curve.Motivation and Context
see #314.
How Has This Been Tested?
Not really yet.
Type of change
Checklist
pytest
inside the repository and no unexpected problems came up.doc/
.environment.yaml
file.doc/release_notes.rst
.pre-commit run --all
to lint/format/check my contribution