-
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
Agrivoltaics - PAR diffuse fraction model #2048
Agrivoltaics - PAR diffuse fraction model #2048
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.
Just an early stage review.
docs/examples/agrivoltaics/plot_diffuse_PAR_Spitters_relationship.py
Outdated
Show resolved
Hide resolved
docs/examples/agrivoltaics/plot_diffuse_PAR_Spitters_relationship.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Adam R. Jensen <[email protected]>
Moved to Everybody, feel free to review 👀 . |
Co-Authored-By: Kevin Anderson <[email protected]>
Co-Authored-By: Kevin Anderson <[email protected]>
Co-Authored-By: Kevin Anderson <[email protected]>
Co-authored-by: Cliff Hansen <[email protected]>
…om/echedey-ls/pvlib-python into par-diffuse-fraction-of-global-par
Co-Authored-By: Cliff Hansen <[email protected]>
Instead of `spitters_relationship` Co-Authored-By: Cliff Hansen <[email protected]>
Co-Authored-By: Cliff Hansen <[email protected]>
Again, thx for the 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.
The reference mentions
where the subscript d points to daily totals
Is it correct that the expression is for daily values? If so, that needs to be denoted in the ocstring.
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.
Great job! Just a few minor comments
docs/examples/agrivoltaics/plot_diffuse_PAR_Spitters_relationship.py
Outdated
Show resolved
Hide resolved
docs/examples/agrivoltaics/plot_diffuse_PAR_Spitters_relationship.py
Outdated
Show resolved
Hide resolved
# calculated using the Spitter's relationship [1]_ implemented in | ||
# :py:func:`~pvlib.irradiance.diffuse_par_spitters`. | ||
# This model requires the solar zenith angle and the fraction of the broadband | ||
# radiation that is diffuse as inputs. |
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.
# radiation that is diffuse as inputs. | |
# irradiance that is diffuse as inputs. |
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.
To (perhaps) head off a discussion of whether "radiation" or "irradiance" should be used here: radiation is usually used when referring to the source, and irradiance (or irradiation) when referring to the receiver. So the sun emits radiation, and a tilted plane on the earth's surface receives solar irradiation. Either perspective seems OK to me in the context of this PR. But mixing PAR (..."radiation") with "irradiance" may be confusing to some.
docs/examples/agrivoltaics/plot_diffuse_PAR_Spitters_relationship.py
Outdated
Show resolved
Hide resolved
docs/examples/agrivoltaics/plot_diffuse_PAR_Spitters_relationship.py
Outdated
Show resolved
Hide resolved
docs/examples/agrivoltaics/plot_diffuse_PAR_Spitters_relationship.py
Outdated
Show resolved
Hide resolved
# The total PAR can be approximated as 0.50 times the broadband horizontal | ||
# irradiance (GHI) for solar elevation higher that 10°. |
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.
Is PAR simply 0 at solar elevation angles less than 10 degrees? Seems odd
Co-Authored-By: Adam R. Jensen <[email protected]>
Co-Authored-By: Adam R. Jensen <[email protected]>
@AdamRJensen you are completely right. I remember reading that but not in the original paper, so I thought the integration was done later. I didn't read the solar elevation was averaged neither :( I will update the docs and the example. Should I call the irradiance integral radiation or insolation? The paper uses the former, but I've seen the latter in pvpmc.sandia.gov Btw, I don't know which day the release will be done, so feel free to exclude this PR from the merge list. |
Co-Authored-By: Adam R. Jensen <[email protected]>
I missed that as well. If the relationship is only for daily values, that fact should be stated prominently. |
Upon skimming it briefly it seems to be daily values. @echedey-ls do you know what units they use, e.g., W/m2 vs Wh/m2? The corrections happening in the equation account for differences in overcast vs clear sky days, which makes me doubt that's its for daily values (though it could just be accounting for whether the day is mostly cloudy or clear). But then why is PAR less than 10 degrees set to 0? Is that if the daily average solar elevation is less than 10? I think this probably deserves a more careful read |
I think you are right. I set it to zero because nothing came up to my head about how to handle and interpret that statement in the paper. I did that thinking the solar elevation was an instantaneous value, not the average. In the upcoming example I will fix that. And possibly include a warning in the function too. |
Co-Authored-By: Adam R. Jensen <[email protected]>
Co-Authored-By: Adam R. Jensen <[email protected]>
@cwhanse I'm happy with the state of this PR. If you also approve, I think this could be merged in time for the 0.11.0 release. |
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.
One more small edit and LGTM also
Co-authored-by: Cliff Hansen <[email protected]>
Thank you @echedey-ls! Great work and go GSoC 🥳 |
docs/sphinx/source/reference
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`
).remote-data
) and Milestone are assigned to the Pull Request and linked Issue.Adds the model described in #2047.
Current implementation
I'm a bit hesitant about the tests here. I haven't found any straightforward way to make the tests from the papers. They check the mathematical integrity of the implementation, if that's a thing.
Docs links