0

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

Schmelzer
  • 13
  • 1
  • What exactly is your question? Where is this code coming from? Why should we know whether it's right or not? – Calvin Godfrey Jan 11 '19 at 14:49
  • I see from the tag that this is about `pvlib`. This posting would probably be better cast as a bug report to the `pvlib` support group. – BoarGules Jan 11 '19 at 14:53
  • 3
    I'm voting to close this question as off-topic because it isn't a question but a bug report, and SO is not the right venue for it. – BoarGules Jan 11 '19 at 14:54
  • 2
    The instructions here say to be nice to a new contributor...so I will. :) – adr Jan 11 '19 at 19:51
  • I was posting the question here, because on their website they list stackoverflow as one of the easiest ways to contribute. But I understand now, that this channel is reserved for more code related problems --> Question will be closed and a github issue will be created. – Schmelzer Jan 14 '19 at 08:18

1 Answers1

1

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.

adr
  • 1,731
  • 10
  • 18