UMEP-dev / UMEP-processing

7 stars 9 forks source link

UMEP Processing is producing several errors with the Tree Planter tutorial data set #13

Closed rarygit closed 2 years ago

rarygit commented 2 years ago

OS: Ubuntu 20.04 QGis: 3.18

UMEP Processing plugin, v1.6.1 Pre-processing with SVF, height and aspect. Processing with SOLWEIG, Tree Planter

I have been testing the Tree Planter tutorial, as the Tree Planter genetic algorithm is generally failing for almost all 'small polygon' scenarios with that I test it with. Generally the greedy algorithm ('GA') is OK.

For this issue: UMEP Processing is producing several errors with the Tree Planter tutorial data set.

(1) SOLWEIG: shadow generation errors for hours 2200, 2300, 0000, 0100, 0200, 0300. Raster Min: 1.79769e+308, Max: -1.79769e+308 All other shadow and Tmrt rasters OK. No Errors for the shadow rasters if I run the metfile between 0400 - 2100 (i.e. exclude the hours above).

Same shadow errors if I use the "Solar Radiation: Shadow Generator" tool.

(2) Tree Planter: genetic algorithm in all its permutations fails. Also for runs from 0400 - 2100. The greedy algorithm generally works.

There was no difference if I used the UMEP plugin to run SVF, height, aspect and SOLWEIG.

What is the GA traceback indicating? TreePlanter/TreePlanter/TreePlanterTreeshade.py", line 88, in tsh_gen_mt2 tsh_bool_pad[yslice2, xslice2, :] += treerasters.treeshade_bool[yslice1, xslice2, :] ValueError: operands could not be broadcast together with shapes (11,7,2) (11,0,2) (11,7,2)

Log files attached for SVF, SOLWEIG, Tree Planter. LOG_SVF_SOLW_TPL.zip

nilswallenberg commented 2 years ago

The bug in TreePlanter should be fixed. Regarding the other issues it is probably NaN because these are values during nighttime (no shadows). If issue persists please resubmit a new issue.