pingswept / pysolar

Pysolar is a collection of Python libraries for simulating the irradiation of any point on earth by the sun. It includes code for extremely precise ephemeris calculations.
http://pysolar.org
GNU General Public License v3.0
372 stars 125 forks source link

GHI and DNI values #153

Closed SepehrMosavat closed 2 years ago

SepehrMosavat commented 2 years ago

Hi, I have a question about the calculation of the irradiation: the way I understand it, the "global_irradiance_clear" function is supposed to return the Global Horizontal Irradiance (GHI), while the "get_radiation_direct" returns the Direct Normal Irradiance (DNI), both measured in w/m2. I'm wondering if my interpretation is correct and would appreciate any thoughts on this matter, especially since this terminology is not used in the documentation AFAIK. This and this issues might also be interesting to take a look at. Thanks!

pingswept commented 2 years ago

Your interpretation is correct.

The situation is a bit odd. Most of Pysolar is based on an algorithm called SPA from Andreas and Reda at NREL, but the radiation code is different. get_radiation_direct is a rough estimate that I found in Gil Masters' textbook, and global_irradiance_clear was written by a grad student from Germany; I think he based the code on this paper by Younes, Claywell, and Muneer: https://www.sciencedirect.com/science/article/pii/S0360544204002233

Best of luck to you.

SepehrMosavat commented 2 years ago

Great, thanks a lot for the clarification and the references Brandon!