Empty EPW file

Testing using the example files from the workshop last week to rule out definition error.

Installed Dragonfly, MatLab compiler 9.0, and UWG per instructions. When I try to run the UWG component, I get this for a few seconds:

And then the simulation stops without running through anything additional in the command prompt than what is above. The EPW file is generated but it is 0kb and empty. I imagine something in my set up is not correct but I haven’t the slightest idea what it can be. The is a UWG folder in the AppData/Roaming/Ladybug folder.

1 Like

Hi Elliot,

It looks like the UWG is hitting an error. Do you have admin privileges on this machine? Also, what version of Windows is running?

No admin privileges. Running Windows 7 Enterprise

I have a feeling that the admin privileges are the root of the issue. Could you try right-clicking the Rhino icon before you launch it and hit “Run As Administrator”, get someone to type in an admin password, and then try running the GH script? I know this is what solved a lot of the issues with running OpenFOAM with Butterfly and it might work similarly here.

Hi,

I’ve the same issue. The EPW is empty. I’m running Windows 10 and Rhino 5 as admin. A screenshot that shows the error is attached. It shows traceback: line 232, 382, and 410.

BTW:I’m running Butterfly without any issues.

Thanks,

Got admin rights, still no dice. Any other suggestions?

Mohammed and Elliot,

This issue is most certainly the result of the MATLAB compiler failing to run correctly on your system and I should put in a better warning for this (rather than missing epw file).

Mohammed, in your case this is because the MATLAB runtime compiler version 9.0 is not meant to run on Windows 10 systems. I have been talking with the people who currently maintain the UWG and have access to MATLAB. They should hopefully add this support soon.

Elliot, in your case, I still don’t know what the issue might be. Are you sure that you installed the 64-bit version of the MATLAB Runtime Compiler? I might be able to recreate your issue on one of the machines at my office and I will try to do this soon. If I can re-create it, I should hopefully be able to fix it or figure out the issue relatively quickly.

At the latest, both of you will be able to run everything when we finally transition to a python version of the UWG at the end of this summer.

-Chris

Hi all,

Can you check to see if MATLAB is generating a crash dump file for these runs and post it here? It might be easier to debug it that way.

In Windows, look for a file matlab_crash_dump.XXXX (with XXXX being a process ID) in:

C:\Users$YourName$\AppData\Local\Temp

Saeran

Thank you, Saeran. The error logs would be really useful.

Hi Chris, Saeran, and Elliot,

I think I found what is issue !! Elliot, try if this is the same issue that you have.

The UWG component could find the file path because the epw file has different name than the one the UWG component looks for. The epw file is generated but empty. As you can see in the screenshot below that the error is

"1. Solution exception:Could not find file ‘C:\Users\Test\AppData\Roaming\Ladybug\SampleCity\UWG\SampleCity_SGP_Singapore.486980_IWEC.epw’.

and the file that was created has numbers after IWEC (IWEC-641-61024.epw). To make the component works, I deleted the numbers after IWEC from the file name to match the file name the component looks for and rerun it again. By doing that, I got the component runs but again the name changed to be “SampleCity_SGP_Singapore.486980_IWEC-641-61024.epw” as you can see in the second screenshot.

I’ve to do the same process every time I need to run the analysis. I don’t know if this issue can be fixed from your end or something to do with my computer.

Thank you,

Mohammed

That’s weird. That kind of sounds like a similar issue I was having with Dragonfly a while ago. I eventually managed to hunt down the issue by going through the the error logs with Chris, and finding an incompatibility with the matlab dependency and my graphics driver. The fix was to do clean install of new drivers, and also change the profile the driver uses.

I have no idea if this is why your problem is occurring, but I’ll paste the solution I used here in case it helps you or anyone else: https://www.mathworks.com/matlabcentral/answers/161580-matlab-crash… .

Unfortunately, the fact that the actual UWG algorithm is written in Matlab makes it really difficult to debug and solve these issues right now. The good news is that it is being rewritten in Python as we speak! Once that is done, and the matlab dependency is gone, I think these issues will either disappear or be a lot easier to resolve.

S

1 Like

Hello Chris,
I also have same issue with Elliot. May I know when you can launch the translated version to python?

@KatsuyaObara ,

@SaeranVasanthakumar just finished translating the UWG from Matlab to python a couple of weeks ago and his full transation currently lives is here:

So you can technically run the Python version of UWG right now but it’s a perfect replication of the Matlab version with some of the same bugs (though it could address the issue here). Perhaps the larger issue is that we haven’t built the new interface for this Python version yet so you would be interacting with it through text editors until we roll the new components out (hopefully in a few months).

1 Like

Thank you very much!!!
I am trying to use this component and seems this component is build on python2, right? (since I get the error for print on python3.5)
May I confirm which version of python you have tested?
I will set up that environment for further use.
Thank you

@KatsuyaObara That’s right, it’s python 2.

1 Like

Python 2.7 to be exact.

2 Likes

@SaeranVasanthakumar It worked well! Thank you! going back to the previous question, I want to use this code to calculate new epw file based on xml file created by input from Rhinoceros. It seems uwg file you prepared for quickstart is similar input to xml file input for grasshopper component. Did you prepare any method to convert xml file to uwg file format? Or do you have any recommended method?
Thank you

@KatsuyaObara

We made the decision to abandon the xml file input method, and stick to just the .uwg file input as it’s a lot simpler to parse.

However, @chris and I are going to be integrating this translated version with Dragonfly, and that should allow you to generate an input file from Rhino/Grasshopper.

2 Likes

Thank you! I tried to extract parameter from xml file and input into .uwg file.
However, since my input for average building height is 51m, I got following error at RSMDef.py due to the result of self.z[iz]-self.disp get to negative value.

math.log((self.z[iz]-self.disp)/self.z0r)

ValueError: math domain error

Looking at uwg file, there are several parameter which may affect to this result in urban climate parameter, but cannot understand due to lack of documentation. Do you have detail description for following parameters.

#Urban climate parameters
h_ubl1,1000, # ubl height - day (m)
h_ubl2,80, # ubl height - night (m)
h_ref,150, # inversion height (m)
h_temp,2, # temperature height (m)
h_wind,10, # wind height (m)
c_circ,1.2, # circulation coefficient (default = 1.2 per Bruno (2012))
c_exch,1, # exchange coefficient (default = 1; ref Bruno (2014))
maxDay,150, # max day threshold (W/m^2)
maxNight,20, # max night threshold (W/m^2)
windMin,1, # min wind speed (m/s)
h_obs,0.1, # rural average obstacle height (m)

Interesting, I think this may be a result of the way matlab converts the log of negative numbers into complex numbers, while python just throws an error.

It doesn’t have to do with any of those microclimate parameters. self.z is actually a vector of constant values, the first one of which is 2. And self.disp = bldht/10/2, so anything greater than or equal to 40m will trigger this error in python.

I’ll have to check against the original matlab code to see if this is the case, and get back to you.

1 Like