Add REST2 clear-sky model
The REST2 clear-sky model is developed by Chris Gueymard, who has expressed serious interest in contributing this to pvlib. Notably, the REST2 model is used to generate the NSRDB, so that alone makes it interesting for pvlib in my opinion.
The most obvious place to add it is in the clearsky.py module, although we may consider organizing clear-sky functions into a folder with .py files for each clear-sky function.
Note, NREL has a Python implementation, however, that is outdated. Similarly, Jamie Bright ported version v5 to python here.
It would be great if you could leave a thumbs up if you think this would be a useful addition, and otherwise, any comments are appreciated concerning implementation, etc.
The best reference for REST2 is 10.1016/j.solener.2007.04.008 (refers to v5). Later validation papers related to both v5 and v9.1 are: 10.1016/j.rser.2019.04.006 and 10.1016/j.rser.2020.110087. There is no paper related to the latest v11.5 yet, but Chris is working on it.
ICYMI @adriesse
While REST2 may not provide broad value to PV modelers, there are enough users of pvlib outside of PV modelers that including REST2 has value.
I'm neutral about splitting up clearsky.py. We'd need to keep track of REST2 versions and stay faithful to a version's reference, I think.
Related: https://github.com/pvlib/pvlib-python/issues/71#issuecomment-187992215
Unrelated I would love to see an all sky model like farms-nit
While REST2 may not provide broad value to PV modelers, there are enough users of pvlib outside of PV modelers that including REST2 has value.
I actually think clear sky models are very valuable for PV modelers, although some of them may not know that (yet)!
I am in favor of adding REST2. Having a best-in-class model available and easy to use would be useful in a lot of applications. The "easy to use" part will be helped by #2572, which adds a function to retrieve the necessary atmospheric inputs from MERRA2. And regardless of how easy it is to use in pvlib, I think the model is notable enough to warrant implementation.
I'll also say that pvlib's default model (clearsky.ineichen with static monthly turbidities) can be so inaccurate as to be unusable for some tasks, in my experience.
Notably, the REST2 model is used to generate the NSRDB, so that alone makes it interesting for pvlib in my opinion.
Being able to reproduce NSRDB values specifically might be useful in some applications, although I guess it would require implementing an older version of REST2? I suppose if the various iterations of REST2 are similar enough (I have no clue if they are...), we could implement them all in one function and provide a switch to select the relevant coefficient values.
Seems like there is broad support here (this issue is currently the second-most thumbed up feature request, see #2196). The only missing piece is a reference to follow for the latest model, right?
I like this idea.
I actually think clear sky models are very valuable for PV modelers, although some of them may not know that (yet)!
Agreed!
The only missing piece is a reference to follow for the latest model, right?
Chris will help us out with that!