pythonpvlibsolar

Minor mistake in calculation of extraterrestrial radiation (method 'asce')?


While looking at the code for the calculations of extraterrestrial radiation get_extra_radiation() and crosschecking it with literature, I noticed that for both methods 'asce' and 'spencer' the solarposition._calculate_simple_day_angle(doy) function is used. This function basically just calculates (2. * np.pi / 365.) * (doy- 1), which is correct for method='spencer'.

But I think for method='asce' it should just be (2. * np.pi * doy / 365.) - without "- 1" - as described on page 9 in "J. A. Duffie and W. A. Beckman, "Solar Engineering of Thermal Processes, 3rd Edition" J. Wiley and Sons, New York (2006)"


Solution

  • I just happen to have this book in front of me, so I checked on page 9, and there is indeed a difference as noted w.r.t. the pvlib-python code. One formula uses n, the other uses n-1. This difference is probably not significant, but perhaps it should be fixed just so it is correct. An issue on github would be the best way to raise this.