-
Notifications
You must be signed in to change notification settings - Fork 1.1k
refactor ineichen function #199
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
Conversation
I rewrote the tests for the simplified ineichen function and improved its nan handling. A couple of API things to consider:
|
1 – no strong opinion here, but it seems to me that dni_extra is the only one of the three that could have a reasonable default value. Cliff |
Thanks for the input, Cliff. Zenith is the more common parameter in pvlib and probably the broader solar energy literature. So, I'll leave this alone and consider changing the simplified solis arguments in a different issue/pull request. I'll also leave the function name as it is. |
I forgot to say that I have some new clear sky documentation in the works, but readthedocs won't compile it right now. New PR coming when I get that figured out. In the meantime, here's a link to the new doc file: https://github.com/wholmgren/pvlib-python/blob/csdocs/docs/sphinx/source/clearsky.rst |
I refactored the ineichen function to be a function of zenith, airmass, turbidity, ET irradiance, and altitude rather than time, latitude, longitude, and model options. Now, the ineichen function is a simple implementation of the published model, while the Location.get_clearsky method provides a simple way to get a time series of clear sky data for a particular lat/lon.
The refactoring also makes it possible to use higher dimensional data with the ineichen function, just like the new simplified_solis function. I hope to eventually make a new documentation page for all of this, but maybe you want to beat me to it.
I would need to write a few more tests before this can be merged.
Closes #155.
cc @DanRiley since we talked about this once before.