Optimal PV panel tilt


I am interested in how optimal tilt in ladybugs TOF component is calculated->Specifically what data from epw file is used?

because angle I get angle 0

Anyways, great plugin!

The reason I’m asking is- with help of friend I made .epw file with

There was no data available for Direct Normal Radiation and Diffuse Horizontal Radiation.
From .audit file I understand that these two were somehow generated.
Could this be the reason why I get optimal tilt angle of 0º? (Even if I know that for this place optimal angle has to be ~39-41º)

Hi Atis,

The “TOF” component uses directNormalRadiation and diffuseHorizontalRadiation data from the .epw file to calculate the incident radiation hitting the PV surface plane.

One of the reasons why you might get tilt angle closer to 0, is because your location is closer to equator. The smaller the latitude, the smaller the tilt angle.
Still getting exactly 0.00 value, sounds like a precision issue. Try increasing the “precision_” input parameter to, say “20”. If it does not take too long for the “TOF” component to recalculate, you can increase this value even higher. The larger the “precision_” input value is, the more precise your optimal tilt and azimuth values will be.

Hope that helps. If not, please let me know.

For future issues, it is always helpful when one attaches the .gh file along with posting a question. Thank you.

Hi Djordje,

Thanks for response.

Place is Riga, Latvia

So it is not so close to equator. Probably the missing, but generated Direct Normal Radiation and Diffuse Horizontal Radiation does this…

And I also tried to increase precision with same results.
Then I made simple test with galapagos as AC energy for fitness and still get 0º as best angle…

Hi Atis,

You posted your second reply 2 minutes before I posted mine. Sorry for not seeing it, and not refreshing the page.

Yes, I assume that this is the problem: your epw file does not contain the separate directNormalRadiation and diffuseHorizontalRadiation. This is why you are always getting zero optimal tilt angle.
Chris recently posted a link to other free epw files not released by US department of energy. These are exported from Meteonorm application.
You can download the Riga epw file from here.

Meteonorm application additionally has weather data for 8325 locations around the world that can be export to .epw file. Sadly one needs to pay to activate this feature.

1 Like

Cool thanks, I will definitely check them out.

Seems like I need Yahoo account to get these files.

The other thing- I was somehow added incorrect lat, lng and timezone to my .epw.
Now with that corrected and with precision 20 (11min calculations… have not checked lower values except 2 which gave result of 45º) I can get angle of 40.5º which seems more realistic!

Thank you for your help!
Keep up the good work with this plugin, it’s truly awesome!

Glad you made it.
I would be grateful if you would post the results of PV components usage, once your project is completed.

The Riga weather data files (.epw included) are attached below.

LVA_Riga_MN6.zip (228 KB)

Hi @djordje
I am digging this up old message because I am looking for a weather file for Latvia. The links in this thread are dead. Would you mind sharing the zip file containing the EPW again?


Hi @KitElsworth,

Once this new ladybug forum has been started on Sept 2017 all posts from the old grasshopper forum have been imported as well. But it seems that attachments were not.
This topic is from 2015, which means it started on the old forum. You can always google to find it on the old forum as the attachments there are still valid:

Further more, the upper link still works:

1 Like