-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Horizon coefficient should be allowed to go negative in the Perez transposition model #1239
Horizon coefficient should be allowed to go negative in the Perez transposition model #1239
Conversation
… in the Perez transposition model Horizon coefficient should be allowed to go negative in the Perez transposition model Link to the original paper: https://www.osti.gov/servlets/purl/7024029 Section III.2 states this explicitly for the horizon component: "(2) The horizon brightening coefficient, F2, is negative for overcast and low E occurrences -- indicative of brightening of the zenithal region of the sky for these conditions. This becomes positive past intermediate conditions and increases substantially with clearness." Note that this change also impacts results from the DIRINT model (used to generate DNI from GHI). This change corresponds to revision 8 of the SAM vs PVLib comparison, found here: https://cleanpower1.sharepoint.com/sites/SolarAnywhere/Shared%20Documents/Power%20Model%20Discussions/PVLib_Comparison_Rev8_FixPvLibPerezModelF2Bound.zip
It appears that I have violated a number of formatting requirements, so I'll work on getting those addressed. |
Thanks @cpr-chas! We're not too strict about these particular formatting requirements in the test files when they occur in array input:
It's already a pain to add comprehensive array values to test against and we don't want to make it too much of a burden. Other requirements like trailing whitespace at the end of a line, indents, and space around |
Fix reported Stickler issues This is an attempt to fix all formatting requirement failures reported by Stickler CI for PR 1239 to the pvlib-python project. Related work items: #18784
Thanks Will. I already had a lot of those changes in progress so went ahead and finished it up, but it looks like I just ended up creating (or revealing) others. Is there any way to run this manually on my local clone? |
|
Perfect. Thanks Will! |
I was shown how to validate this locally and fixed all issues, so this should be the last round. I couldn't cherry pick due to conflicts. but this shouldn't include any other changes. Related work items: #18784
I have checked the new test against the Matlab code. The results agree. |
Do we need a note to explain how this will affect existing results? Is it only during sunrise, low irradiance? |
I expect it to affect primarily low irradiance, overcast conditions, but is not limited to sunrise/sunset. |
Correct, just add a note to whatsnew under "Bug fixes". Suggestion: "Corrected an error in :py:func: |
Done. I didn't see anything after the 0.9.0 release so I added it there under the assumption that this release isn't closed yet. Let me know if that's not the right place. Thanks! |
@pvlib/maintainer - does this still need to be assigned official reviewers? I'm not sure what the process is here since several people have obviously looked at the change already, but I do see that other PRs have explicit reviewers listed and I wasn't sure if I had to specifically request a review. |
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.
Syntax all looks great. Thanks! @cwhanse I vote to merge. Please do the honors if you agree.
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.
thanks @cpr-chas
@wholmgren in case you have projects that depend on the perez function, I'll wait to merge until you approve. |
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.
looks good to me. Thanks @cpr-chas!
Horizon coefficient should be allowed to go negative in the Perez transposition model
Link to the original paper: https://www.osti.gov/servlets/purl/7024029
Section III.2 states this explicitly for the horizon component:
"(2) The horizon brightening coefficient, F2, is negative for overcast and low E occurrences -- indicative of brightening of the zenithal region of the sky for these conditions. This becomes positive past intermediate conditions and increases substantially with clearness."
Note that this change also impacts results from the DIRINT model (used to generate DNI from GHI).
Updates entries todocs/sphinx/source/api.rst
for API changes.docs/sphinx/source/whatsnew
for all changes. Includes link to the GitHub Issue with:issue:`num`
or this Pull Request with:pull:`num`
. Includes contributor name and/or GitHub username (link with:ghuser:`user`
).New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.