UMEP-dev / UMEP

Urban Multi-scale Environmental Predictor
https://umep-docs.readthedocs.io/
59 stars 15 forks source link

SOLWEIG > vegetation optional ? #478

Closed simonmarti1992 closed 1 year ago

simonmarti1992 commented 1 year ago

Dear all, I'm trying to exectute UMEP on a new case study using french databases. I'd like to execute the SOLWEIG model.

Describe the bug While running SOLWEIG without vegetation layers, a bug appears even if vegetation canopy DSM is written optionnal

To Reproduce Here is the print screen of the console

Paramètres en entrée:
{ 'ABS_L' : 0.95, 'ABS_S' : 0.7, 'ACTIVITY' : 80, 'AGE' : 35, 'ALBEDO_GROUND' : 0.15, 'ALBEDO_WALLS' : 0.2, 'CLO' : 0.9, 'CONIFER_TREES' : False, 'CYL' : True, 'EMIS_GROUND' : 0.95, 'EMIS_WALLS' : 0.9, 'HEIGHT' : 180, 'INPUTMET' : 'C:\\Users\\simon\\python-scripts\\tipee-umep\\Goteborg\\gbg19970606_2015a.txt', 'INPUT_ANISO' : '', 'INPUT_ASPECT' : 'C:/Users/simon/python-scripts/exemple-umep/_TEST/aspect.tif', 'INPUT_CDSM' : None, 'INPUT_DEM' : 'C:/Users/simon/python-scripts/exemple-umep/_TEST/DEM_sized_rezise.tif', 'INPUT_DSM' : 'C:/Users/simon/python-scripts/exemple-umep/_TEST/DSM_sized_rezise.tif', 'INPUT_HEIGHT' : 'C:/Users/simon/python-scripts/exemple-umep/_TEST/height.tif', 'INPUT_LC' : None, 'INPUT_SVF' : 'C:\\Users\\simon\\python-scripts\\tipee-umep\\Goteborg\\svfs.zip', 'INPUT_TDSM' : None, 'INPUT_THEIGHT' : 25, 'LEAF_END' : 300, 'LEAF_START' : 97, 'ONLYGLOBAL' : False, 'OUTPUT_DIR' : 'C:\\Users\\simon\\python-scripts\\exemple-umep\\_TEST', 'OUTPUT_KDOWN' : False, 'OUTPUT_KUP' : False, 'OUTPUT_LDOWN' : False, 'OUTPUT_LUP' : False, 'OUTPUT_SH' : False, 'OUTPUT_TMRT' : True, 'OUTPUT_TREEPLANTER' : False, 'POI_FIELD' : '', 'POI_FILE' : None, 'POSTURE' : 0, 'SAVE_BUILD' : False, 'SENSOR_HEIGHT' : 10, 'SEX' : 0, 'TRANS_VEG' : 3, 'USE_LC_BUILD' : False, 'UTC' : 0, 'WEIGHT' : 75 }

Longitude derived from DSM: -1.1504586038524727
Latitude derived from DSM: 46.18176533950087
1
C:\Users/simon/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep/temp
2
svfsizex
480
sizex
480
svfsizey
556
sizey
556
Sky View Factor rasters loaded
Meteorological data successfully loaded
Calculating sun positions for each time step
Isotropic sky
Writing settings for this model run to specified output folder (Filename: RunInfoSOLWEIG_YYYY_DOY_HHMM.txt)
Executing main model
Traceback (most recent call last):
File "C:\Users/simon/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\processor\solweig_algorithm.py", line 994, in processAlgorithm
dRad, Kside = so.Solweig_2022a_calc(
File "C:\Users/simon/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\functions\SOLWEIGpython\Solweig_2022a_calc_forprocessing.py", line 308, in Solweig_2022a_calc
Least, Lsouth, Lwest, Lnorth = Lside_veg_v2022a(svfS, svfW, svfN, svfE, svfEveg, svfSveg, svfWveg, svfNveg,
File "C:\Users/simon/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\functions\SOLWEIGpython\Lside_veg_v2022a.py", line 27, in Lside_veg_v2022a
[viktveg, viktwall, viktsky, viktrefl] = Lvikt_veg(svfE, svfEveg, svfEaveg, vikttot)
File "C:\Users/simon/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\functions\SOLWEIGpython\Lvikt_veg.py", line 8, in Lvikt_veg
viktwall=viktonlywall-viktaveg
ValueError: operands could not be broadcast together with shapes (223,234) (480,556) 

Execution failed after 0.13 secondes

Chargement des couches de résultat
Algorithme 'Outdoor Thermal Comfort: SOLWEIG' terminé

Desktop (please complete the following information):

Data Please find attached my dataset data.zip

nilswallenberg commented 1 year ago

Hi,

I can't replicate your error. Worked fine to run with your input data.

Are you sure that you are running with the correct svfs? Your path to svfs.zip is 'C:\Users\simon\python-scripts\tipee-umep\Goteborg\svfs.zip'. Maybe you are running with SVFs for Gothenburg?

Cheers, Nils

simonmarti1992 commented 1 year ago

Ooops, you are right 🤦‍♂️ thank you Simon