Dynamically select EPW file based on Latitude/Longitude

I’m working on an interesting project where I want to do solar analysis on a sphere representing the Earth.

I have the lat/long coordinates for a few points on the globe, and I want to find the correct EPW weather data based on the lat/long coordinate, dynamically.

The questions are:

  1. Is this possible? (dynamic changing of EPW files). I was thinking maybe to interface with some public resource like https://app.ensims.com/epwmap.html, but I’m not sure this is such an easy set up… there might be a more direct way.

  2. Is it possible to skip the EPW input and just provide lat/long + solar irradiance? Specifically for the Ladybug_Photovoltaics Surface component.

Any advice on how to go about this would be great.

We did something like this (, and a bit more,) during the 2017 AEC Hackathon. The idea was to use geopy to locate longitude and latitude of a place and then use the haversine formula to figure out the closest locations for which EPW data existed.
Here is a 1 minute demo of the tool:

The code should still be working: https://github.com/ladybug-tools/ladybugvizzz . The readme text on that page also links to a presentation.



Wow! Okay that’s a super fast response and a lot more than what I expected! thank you.
I will definitely check this out as a possible solution. Looks promising.

Given the way that @djordje wrote the Photovoltaics Surface component, I think you’ll have to hack the code inside of it if you want to be able to do this. However, it you’d be ok working backwards from incident solar radiation to estimate PV electricity, you can do a radiation analysis with the new LBT plugin just using lat/lon and hourly radiation values:

Custom_Radiation_Study.gh (36.7 KB)

1 Like

Thanks @chris!
I’ll try to explore this angle as well for a simpler but more direct approach.