Under the hood of pvwatts

One of the projects I’m working on right now involves getting under the hood of pvwatts, the solar performance prediction software from the National Renewable Energy Laboratory.

Just about everyone in the solar energy world is familiar with pvwatts, but how many of them have actually had a chance to examine the source code? I’m just digging into it now, and I’ve already found several areas that could use some improvement. Considering how widely accepted this calculator is, the code is quite a shock. The algorithms make sense, but the implementation is a bit frightening.

More to come.

5 thoughts on “Under the hood of pvwatts

  1. Margaret Sheridan

    Hello Jason,
    I would also like to look through PVWATTS’ source code. Where can I find it?
    Margaret Sheridan
    California Energy Commission

  2. jalderman Post author

    Hi Margaret, sorry for the slow response. It looks like your comment got lost in the spam. The source code for pvwatts is here: http://rredc.nrel.gov/solar/codes_algs/PVWATTS/version1/US/code/C/
    They aren’t using any revision control, so you’ll have to sift through the files to find the most recent update.
    With minor modifications, I was able to get it to compile with mingw under winXP. I’ve since cleaned up the code, made it modular, and added a bunch of new functions.
    Good luck!

  3. scott judson

    I am looking for documentation on the algorithmns that PVWatts uses – specifically calculation of plane of array irradiance from TMY3 data. Do you know of any documentation that explains this?

Leave a Reply

Your email address will not be published. Required fields are marked *