Create a Wea file from an EPW file using Ladybug SDK

Thanks @mostapha, yes that would make sense of course. I suppose I assumed the behavior would be similar to the honeybee gh plugin where the required input was “_wea” which also excepts an epw file.

I have been doing a little research, and I was having a hard time finding .wea files to replace .epw files. Is there a routine in the lb/hb libs that converts epw to a wea file? Or a good resource to find .wea files for free? cheers

1 Like

Hi @karimdaw,

When recipes are loaded to plugins, they can use alias inputs and add support for additional inputs or add additional checks. In this case, the wea input in the Grasshopper plugin passes the input to this function which does the translation to wea file if needed. The recipe, under the hood, only accepts a wea file.

If you see the handler that I shared above you see how to do it. For future reference here is how it can be done.

from ladybug.wea import Wea

wea = Wea.from_epw_file('path_to_epw_file')
wea_file = wea.write('path_to_wea_file')

Hope it helps!

Thanks again @mostapha, very helpful as always. I’ll use the handler to deal with epws going forward.

1 Like