Skip to content

Add REST2 clear-sky model #2453

Open
Open

Description

@AdamRJensen

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

Activity

  1. cwhanse commented on May 7, 2025

    @cwhanse
    Member

    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.

  2. mikofski commented on May 8, 2025

    @mikofski
    Member

    Related: #71 (comment)

  3. mikofski commented on May 8, 2025

    @mikofski
    Member

    Unrelated I would love to see an all sky model like farms-nit

  4. adriesse commented on May 10, 2025

    @adriesse
    Member

    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)!

  5. kandersolar commented on Nov 18, 2025

    @kandersolar
    Member

    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?

  6. williamhobbs commented on Nov 18, 2025

    @williamhobbs
    Contributor

    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!

  7. adriesse commented on Nov 18, 2025

    @adriesse
    Member

    The only missing piece is a reference to follow for the latest model, right?

    Chris will help us out with that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions