[Beginner] - Request for information about the Larson et. al. [Lar16]

19 views
Skip to first unread message

Shaon

unread,
Mar 2, 2022, 4:24:38 AM3/2/22
to pvlib-python
Hello Everyone,

I am a new user of pvlib. I am also a beginner for python language. I was trying to use the open source code given on the pvlib website for forecasting solar irradiance of my area. But I am getting a 'Name Error' error when I am executing the below part which is mentioned as the essential part of the clear sky scaling algorithm on the website.
error.JPG

Though I am still getting the graphs for solar irradiance forecasting (see below picture) by executing further parts of the open source code, but my concern is whether I am getting the correct graphs.

GFS.jpg

One last thing, I want to plot the solar irradiance for GHI and DNI only. How can I exclude the DHI part from the graph?

Note: I am using Jupiter Notebook as the text editor.

Any kind of help in this regard will be highly appreciated. I will be waiting with a hope that someone from this big family will come out to help me.


Thanks and regards,
Arshad



cwh...@sandia.gov

unread,
Mar 2, 2022, 11:15:19 AM3/2/22
to pvlib-python
Arshad,

location is defined by pvlib.location.Location.  You've found a bug of some sort, because location isn't defined in the code on that page and I don't know how that block runs without an error. Thanks for reporting this, I'll open an issue.

If your code makes the graph using a statement like

irrads.plot()

That statement plots every column in the irrads dataframe. To plot only the columns you want (GHI and DNI), try

irrads[['ghi', 'dhi']].plot()

Cheers,

Cliff

cwh...@sandia.gov

unread,
Mar 2, 2022, 11:27:57 AM3/2/22
to pvlib-python
Arshad,

I looked back through that page. The code that generates the error (the "location" issue) isn't needed in your ipython notebook. The help page displays that code only to show how ghi is estimated from cloud cover, and how dni and dhi is separated from the estimated ghi by the cloud_cover_to_irradiance method.

Cheers,

Cliff
Reply all
Reply to author
Forward
0 new messages