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: https://gist.github.com/sariths/53805279212b55dc2dea6c8673f9511b

Usage:

Output for the print statements:
image

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

@Mesrop

One way to achieve this is to use the Weather Converter tool (https://bigladdersoftware.com/epx/docs/8-3/auxiliary-programs/using-the-weather-converter.html). 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.

S

2 Likes

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

2 Likes

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:https://github.com/AntonelloDN/Ladybug-Scripts.
Regards,
Antonello

1 Like

@Mesrop,

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.

changeEPW.gh (391.5 KB)

Regards,
Antonello

2 Likes

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).

2 Likes

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