Hi there,
I am encountering issues while running the Urban Weather Generator (UWG) simulation. After investigating, I discovered that the simulation fails on days when the temperature in the EPW file is lower than approximately -24°C. By replacing the EPW file with one containing higher temperatures, the simulation runs without any interruptions. I understand that the chosen region is characterized by extremely cold conditions, but I would like to know if there is a solution to this issue. Below is the error code I encountered:
Solution exception:The UWG failed to run:
UWG model simulation failed.
Got canyon temperature at -23.246093420283643 C. Something obviously went wrong (UCMDef.py).
Traceback (most recent call last):
File “C:\Users\62667\ladybug_tools\python\lib\site-packages\uwg\cli\simulate.py”, line 50, in simulate_json_model
uwg_model.simulate()
File “C:\Users\62667\ladybug_tools\python\lib\site-packages\uwg\uwg.py”, line 1354, in simulate
self.forc, self.geoParam)
File “C:\Users\62667\ladybug_tools\python\lib\site-packages\uwg\UCMDef.py”, line 288, in UCModel
‘wrong (UCMDef.py).’.format(self.canTemp - 273.15))
Exception: Got canyon temperature at -23.246093420283643 C. Something obviously went wrong (UCMDef.py).
Any help or suggestions on how to resolve this problem would be greatly appreciated. Thank you!
Hi @XINYUXU - this is probably an error checking code from the UWG Matlab code (i.e. the version that I worked on back in 2016) that should have been removed. At the time, I was dealing with numerical convergence issues so had added a check but I probably forgot to remove it and it probably just got copied to the Python version of it. At the time, I was working with warmer weather files so this was an arbitrary value as a quick & dirty way to check when the solution failed to converge.
Thanks for your response. I’m using Dragonfly v1.60 with built-in UWG, but the issue persists. This interruption prevents a full EPW file from morphing.I’m still experiencing this problem.
As a quick fix for your own set up, use a text editor to open the file ““C:\Users\62667\ladybug_tools\python\lib\site-packages\uwg\UCMDef.py”” and edit the values in line 286 to a different value. The problem is the ‘self.canTemp < 250’ part as the lower threshold so either use something lower like 200 or comment out the section altogether.
Note for @chris & @SaeranVasanthakumar:
If I remember correctly, this checking is not really necessary at this point anymore as the canyon temperature calculation was changed to an implicit step.