UMEP-dev / UMEP

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

'L_patches' while running SOLWEIG #436

Closed Newshamod closed 1 year ago

Newshamod commented 2 years ago

Hi there,

I have tried to run SOLWEIG model but I am receiving the following error:

QGIS version: 3.24.3-Tisler QGIS code revision: cf22b74e Qt version: 5.15.3 Python version: 3.9.5 GDAL version: 3.4.3 GEOS version: 3.10.2-CAPI-1.16.0 PROJ version: Rel. 9.0.0, March 1st, 2022 PDAL version: 2.3.0 (git-version: 0a6ef5) **Traceback (most recent call last): File "C:\Users/nmodjr200/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\processor\solweig_algorithm.py", line 955, in processAlgorithm dRad, Kside = so.Solweig_2022a_calc( File "C:\Users/nmodjr200/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\functions\SOLWEIGpython\Solweig_2022a_calc_forprocessing.py", line 344, in Solweig_2022a_calc Lside, L_patches, CI_Tg, CI_TgG, KsideD, dRad, Kside UnboundLocalError: local variable 'L_patches' referenced before assignment

Execution failed after 42.42 seconds**

Desktop (please complete the following information):

Screenshots Screenshot (137)

Data https://drive.google.com/file/d/174-MLs0RT3e-s-qRcDUE8z_cSO_K9tL7/view?usp=sharing

nilswallenberg commented 2 years ago

Hi,

I have hopefully fixed this. There is a new version here at GitHub (will be available in the QGIS repository later).

Cheers, Nils

Newshamod commented 2 years ago

@nilswallenberg Dear Nils,

Thank you for your response. I appreciate your time and consideration.

I have tried to follow the steps in modifying the scripts as mentioned and recommended in (https://github.com/UMEP-dev/UMEP/commit/49ac1cd72228aaa54006bac55ade57a42d3b5fef) but it was not successful (I am new in coding) and I might need to wait for a new release of UMEP on QGIS. Is there any specific time for the new release? I am asking if I could wait for that release and include the SOLWEIG model in my thesis.

Best regards, Newsha

nilswallenberg commented 2 years ago

It is possible to install a plugin using a zip-file. I have attached to latest versions of UMEP below (one for processing and one for the regular plugin). You install it via the plugin manager.

Cheers, Nils

UMEP-SuPy-QGIS3.zip UMEP-processing-main.zip

Newshamod commented 2 years ago

Dear Nils,

Thank you so much! I appreciate it.

I tried for my case and here is the result:

MRT

And I am afraid about the result cause the histogram shows there's no intermediate MRT has been calculated.

Capture

I would appreciate any comment about my work.

Regards, Newsha

nilswallenberg commented 2 years ago

Hi Newsha,

I don't think that anything is wrong. This is usually kind of what it looks like. You have a "cool" end with pixels in shade and a "hot" end with sunlit pixels. If you are worried something is wrong I would instead look for NaN values.

Cheers, Nils

Newshamod commented 2 years ago

Hi Nils,

I got your point. That's so true! In between, I tried to simulate a small site in ENVI-met and got similar result. Thank you so much for your support @nilswallenberg and @biglimp . I do appreciate it.

All the best, Newsha