Implement all-sky spectral irradiance model(s)
Is your feature request related to a problem? Please describe.
pvlib's spectral irradiance modeling is currently limited to pvlib.spectrum.spectrl2, a clear-sky model. As cloudy-sky spectral irradiance takes a different shape from that of clear-sky irradiance, simulating cloudy-sky spectral irradiance is currently a gap in pvlib's capabilities.
Describe the solution you'd like SEDES2 and TMYSPEC are extensions/add-ons to SPECTRL2 that use broadband irradiance to calculate modifiers that transform clear-sky spectral irradiance to cloudy-sky spectral irradiance. With a python-native SPECTRL2 already implemented, I think it would not take much code to implement one of these as well. However, although the models aren't very complex, it might be difficult to find all the details (coefficient tables and such) necessary for implementation.
On that note @shirubana has kindly sent me a C# implementation of SEDES2 from Bill Marion (used in NREL/TP-520-47277) as well as a python translation of her own creation. This code claims to be a descendant of Fortran code dated Aug 1 1992 developed by Centre for Solar Energy and Hydrogen Research (ZSW) in Germany by Stefan Nann and Angelika Bakenfelder.
Describe alternatives you've considered N/A
Additional context I think @adriesse has been involved with some studies that used SEDES2.
See also #857 (SMARTS) and #71 (PyRTM).
tx for starting this!
I seem to recall talking with Jean Schulte for releasing this and it was possible, but we should make sure we establish the proper copyright/legal path of emails for this...
Yes, I have worked with all of these and I'm pretty sure you could find all the information that is needed to re-implement them. They are historically significant and it would be an interesting activity for sure.
I've put some time into tracking down these models, especially SEDES2. These are the best references I've found:
- Nann & Emery, 1992: https://doi.org/10.1016/0927-0248(92)90083-2
- Nann & Riordan, 1991: https://doi.org/10.1175/1520-0450(1991)030%3C0447:SSIUCA%3E2.0.CO;2
- Whitaker & Newmiller, 1998: https://docs.nrel.gov/docs/legosti/old/23942.pdf
The first two unfortunately don’t contain full details. The third does, but is from different authors and has some meaningful inconsistencies with the first two. I have found some other work by Daryl Myers about the related model TMYSPEC, but it does not provide specifics either. Is there a better reference I am missing?
As an aid to discussion, #2616 has a SEDES2 implementation following the description in the Whitaker report. However, I am reluctant to pursue that PR further without more clarity on the model's specifics.
@adriesse, any thoughts? I've emailed Aron Habte at NREL asking if he happens to know anything more. I know Anne Forstinger has used SEDES2, @AdamRJensen can you contact her? Maybe Jeff Newmiller (coauthor of [3] above) could help?
@adriesse, any thoughts?
The thought that comes to mind is that you probably will never find the definitive version and the comprehensive reference we would ideally like to have because they probably don't exist. It's been a few years since I worked or played with them. Probably the best thing you can do is replicate the code.
ICYMI @jdnewmil
What do you want from Sedes2? Have I sent you the original code from Bill Marions 2010 paper, would that help? I think I previously shared the python translation
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: Mark Mikofski @.> Sent: Tuesday, December 9, 2025 12:46:49 AM To: pvlib/pvlib-python @.> Cc: Ovaitt, Silvana @.>; Mention @.> Subject: Re: [pvlib/pvlib-python] Implement all-sky spectral irradiance model(s) (Issue #1669)
CAUTION: This email originated from outside of NREL. Do not click links or open attachments unless you recognize the sender and know the content is safe.
[https://avatars.githubusercontent.com/u/1385621?s=20&v=4]mikofski left a comment (pvlib/pvlib-python#1669)https://github.com/pvlib/pvlib-python/issues/1669#issuecomment-3630829684
ICYMI @jdnewmilhttps://github.com/jdnewmil
— Reply to this email directly, view it on GitHubhttps://github.com/pvlib/pvlib-python/issues/1669#issuecomment-3630829684, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFOEOZVLPI2RKIWDCXQ56N34AZ46TAVCNFSM6AAAAACONRDN7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMMZQHAZDSNRYGQ. You are receiving this because you were mentioned.Message ID: @.***>
What do you want from Sedes2? Have I sent you the original code from Bill Marions 2010 paper, would that help? I think I previously shared the python translation
@shirubana I'm reluctant to implement a pvlib version based on those codes for several reasons:
- They are not public, and thus cannot be easily consulted by the general community to verify the pvlib implementation
- The different versions are not 100% consistent with each other; which one would we use?
- It's not clear that the code is licensed in a way compatible with a pvlib translation
What I would like is to find a paper or report that comprehensively defines a canonical version of SEDES2, but as @adriesse suggests, probably that's not going to happen.
In case it's helpful, I found this paper with some details on the history of SEDES2 via Daryl Myers:
Hassanzahed, B. Houshyani, W. G. J. H. M. van Sark, A. C. de Keizer, and N. H. Reich. "The Effect of a Varying Solar Spectrum on the Energy Performance of Solar Cells." In 22nd European Photovoltaic Solar Energy Conference, pp. 2652-2658. WIP-Renewable Energies, 2007. https://research-portal.uu.nl/en/publications/the-effect-of-a-varying-solar-spectrum-on-the-energy-performance-/
I recall having a copy of the Fortran code at one time... that is one of the sources I referred to for the PVMER work. I remember modifying the Fortran code syntactically so I could run it using gfortran to create test cases. I also restructured the Access Basic to follow the functional approach described in the PVMER paper... the original Fortran was a wall of code. However, I cannot seem to find either the Access Basic or the Fortran codes at this time. In any event, I was not involved with the original algorithm development so I would not be able to explain the origins of the individual band calculations or coefficients beyond the text of our reconstruction for the PVMER report, If you are finding discrepancies between the PVMER report and the other sources then it is more likely that the PVMER report is "wrong" because of how much work was done to adapt it to Access Basic and to restructure the algorithm for testing.
Sent from my phone. Please excuse my brevity.