Modify EPW file content

I’m trying to create a modified epw file that will contain constant values of temperature.
I tried opening in excel but when I save it back to .epw the Ladybug gives and error. “1. Solution exception:pop off of empty list”. Is there a way to do it directly in Ladybug, sort of to deconstruct the file into separate data, alter the data and then reassemble it again into epw?

If you don’t mind using Python, here is a quick and dirty hack:


Output for the print statements:

That code can be pasted into a grasshopper python component and made to work.

(@mostapha, I thought it was possible to replace a column from the _data attribute of EPW class. It’s not? )

1 Like


One way to achieve this is to use the Weather Converter tool ( I think it should come bundled with your EnergyPlus program. That tool will convert the epw into an excel spreadsheet (and add handy headers/labels to the data) and then back.



Had no idea this was a thing!

Yeap! I spent so much time inefficiently converting, and working with raw epw files in excel before I found out this tool existed.

Now that we have the ladybug library, I myself use the method you outlined for the majority of my epw-hacking, but the weather converter is still a good option for non-programmers.

This is a simple but very useful tool that allows you to modify weather epw data


Hi @Mesrop,

I think a good solution is to use Ladybug[+] Python library. I think it is a good point to start with.
If it can helps, I have been starting to study it and I have created few examples about how to edit epw:

1 Like


I have been working on an issue of compatibility with python lib which I have with latest Rhino 6. My coponent crashs, while the same script works fine outside Rhino world.
In the meantime that I understand where the problem is and a workaround, you could use this old school component to edit epw. (391.5 KB)



I should also mention that there is a PR that we will merge in shortly that makes this whole process with the Ladybug core a lot easier:

Once we merge it, I think that I will also release a preliminary suite of Dragonfly EPW-editing components that make use of it for cases like this among other workflows (including updated workflows for creating EPWs from the NOAA database).


Thanks @chris. I will test it!

Hi! I used a very easy software to modify epw file, it’s called ‘elements’. You can download it for free simply looking for it on google and you don’t need particular knowledge like python, but I don’t know if it allows you to change as many things as python. You can try!

1 Like