-
Notifications
You must be signed in to change notification settings - Fork 1.1k
implement simplified solis clear sky model #148
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
We haven’t implemented either the Solis or Pierre’s simplied Solis models. I agree that it is a useful addition, and would like to port it to Matlab when I can get to it. Cliff |
I think this is nearly ready to merge. @alorenzo175 this may be useful for your work, so you might want to review the code before it goes in. |
Looks like all the equations follow the paper. Does it really fail if pw < 0.2? Why put that restriction but leave off the AOD and pressure restrictions? |
Thanks for double checking. You can see the algorithm fail for very small PW in the lowest sections of the contour plots in my initial comment. This is because PW is parameterized in powers of I'm less worried about the upper limits since I don't think that they will be reached using real data and because users should naturally be skeptical of the upper limits. I just noticed that Fig 3 of Ineichen 2008 shows PW from 0.1 to 10 cm, so maybe 0.1 is a better choice for the limit. I'll try to reproduce that figure and then decide. |
I might as well share my attempt at reproducing the figure. Unfortunately, the paper does not give enough information to reproduce it with much accuracy, but the differences are large enough that I want to take more time to double check the work against Ineichen's excel tool: http://www.unige.ch/energie/fr/equipe/ineichen/solis-tool/ The excel tool is "an improved version" so that comparison may or may not turn out right either. |
…ied solis output to match ineichen
I'm going to merge this once the tests pass. Here's a gist with a notebook that demonstrates the usage: https://gist.github.com/wholmgren/fb5043a7d3cd111cf38ce7a7b7779550 I'm fairly confident that the algorithm is implemented as written in the papers above, and I've decided that makes it good enough to merge. However, be aware that there are some discrepancies with the results in the Excel spreadsheet. I'd like to revisit this later, and I hope that others might be interested enough to do their own validations of the implementation once it's merged and released. The discussion in #83 led me to change the API. Here's how it works now: If you pass a Series into the function, you'll get back a DataFrame, thus making it easy to handle time series data with pandas. If you pass scalars or arrays, you'll get back an OrderedDict of scalars or arrays, thus making it easy to use the function in more complex code. In either case you can use e.g. result['ghi'] to get the GHI, but further indexing/slicing is up to the user. @mikofski and @MLEEFS might be interested in trying this out when I release 0.3.3 later today. |
Here's an implementation of Ineichen's "simplified Solis" clear sky model (see the references below). Though I've only just implemented it and have not tested it against any data or the existing
ineichen
algorithm, it seems like it could be a useful addition to pvlib. I like the fact that it is simple to program, continuous, and has good limiting behavior. I could easily be missing something, though, since my experience with it is currently limited to the plots below. Does anyone else have any experience with this model? Maybe someone at Sandia, @cwhanse?For this to be merged we would need to:
ineichen
function does too much.).Location.get_clearsky
method[1] P. Ineichen, "A broadband simplified version of the Solis clear sky model," Solar Energy, 82, 758-762 (2008).
[2] P. Ineichen, "Validation of models that estimate the clear sky global and beam solar irradiance," Solar Energy, 132, 332-344 (2016).