UMEP-dev / UMEP-processing

GNU General Public License v3.0
7 stars 9 forks source link

URock analyzer problem #39

Open biglimp opened 1 year ago

biglimp commented 1 year ago

I just removed my java and installer openjdk version 21 instead as my Uni does not allow us to use commercial java. I was able to run URock prepare and Urock v2023a but the analyzer fails. I worked before. I use the new line with only two vertices.

QGIS version: 3.32.3-Lima
QGIS code revision: 67d46100b5
Qt version: 5.15.3
Python version: 3.9.5
GDAL version: 3.7.2
GEOS version: 3.12.0-CAPI-1.18.0
PROJ version: Rel. 9.3.0, September 1st, 2023
PDAL version: 2.5.5 (git-version: 24f78d)
Algorithm started at: 2023-09-25T14:18:27
Algorithm 'Urban Wind Field: URock AnalyZer' starting…
Input parameters:
{ 'ID_FIELD_LINES' : 'fid', 'ID_FIELD_POLYGONS' : '', 'INPUT_LINES' : 'C:/temp/URockTutorial/Annedal_EPSG3006/line.shp', 'INPUT_POLYGONS' : None, 'INPUT_WIND_FILE' : 'C:\\temp\\URockTutorial\\urock_out\\urock_output.nc', 'IS_STREAM' : True, 'OUTPUT_DIRECTORY' : 'C:\\temp\\URockTutorial\\urock_out', 'SIMULATION_NAME' : 'test' }

Load NetCDF file in Python and save as csv file...
Load csv file into H2GIS Database...
Calculates vertical sectional plot (along lines)...
Traceback (most recent call last):
File "C:\Users/xlinfr/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\postprocessor\urock_analyser_algorithm.py", line 251, in processAlgorithm
plotSectionalViews(pluginDirectory = plugin_directory,
File "C:\Users/xlinfr/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\functions\URock\urock_analyser_functions.py", line 285, in plotSectionalViews
ax[line].streamplot(D, z, wind_d, wind_z, density = STREAM_DENSITY,
File "C:\OSGeo4W\apps\Python39\lib\site-packages\matplotlib\__init__.py", line 1412, in inner
return func(ax, *map(sanitize_sequence, args), **kwargs)
File "C:\OSGeo4W\apps\Python39\lib\site-packages\matplotlib\streamplot.py", line 89, in streamplot
grid = Grid(x, y)
File "C:\OSGeo4W\apps\Python39\lib\site-packages\matplotlib\streamplot.py", line 343, in __init__
raise ValueError("'y' must be strictly increasing")
ValueError: 'y' must be strictly increasing

Execution failed after 232.53 seconds (3 minutes 53 seconds)

Loading resulting layers
Algorithm 'Urban Wind Field: URock AnalyZer' finished
j3r3m1 commented 1 year ago

Yes, you used stream plotting which does not work with the way I interpolate the data. Extra code is needed to make it work in all situations.

j3r3m1 commented 1 year ago

I remove the stream option for now

j3r3m1 commented 1 year ago

By the way what are the resolution of you voxels ? Are they same height than width ?

biglimp commented 1 year ago

I think so but maybe not. I resample to 1 meter i horisontal but that maybe is only for the geotif?

Algorithm 'Urban Wind Field: URock v2023a' starting…
Input parameters:
{ 'ATTENUATION_FIELD' : '', 'BUILDINGS' : 'C:/temp/URockTutorial/URockBuild.shp', 'HEIGHT_FIELD_BUILD' : 'ROOF_HEIGH', 'HORIZONTAL_RESOLUTION' : 2, 'INPUT_PROFILE_FILE' : '', 'INPUT_PROFILE_TYPE' : 0, 'INPUT_WIND_DIRECTION' : 220, 'INPUT_WIND_HEIGHT' : 10, 'INPUT_WIND_SPEED' : 2, 'LOAD_OUTPUT' : True, 'OUTPUT_FILENAME' : 'urock_output', 'RASTER_OUTPUT' : 'C:/temp/URockTutorial/Annedal_EPSG3006/dsm.tif', 'SAVE_NETCDF' : True, 'SAVE_RASTER' : True, 'SAVE_VECTOR' : True, 'UROCK_OUTPUT' : 'C:\\temp\\URockTutorial\\urock_out', 'VEGETATION' : None, 'VEGETATION_CROWN_BASE_HEIGHT' : '', 'VEGETATION_CROWN_TOP_HEIGHT' : '', 'VERTICAL_RESOLUTION' : 2, 'WIND_HEIGHT' : '1.5' }
biglimp commented 1 year ago

You are correct, it works using arrows.

image

The issue is that it is a little hard to see...

j3r3m1 commented 1 year ago

I think so but maybe not. I resample to 1 meter i horisontal but that maybe is only for the geotif?

Algorithm 'Urban Wind Field: URock v2023a' starting…
Input parameters:
{ 'ATTENUATION_FIELD' : '', 'BUILDINGS' : 'C:/temp/URockTutorial/URockBuild.shp', 'HEIGHT_FIELD_BUILD' : 'ROOF_HEIGH', 'HORIZONTAL_RESOLUTION' : 2, 'INPUT_PROFILE_FILE' : '', 'INPUT_PROFILE_TYPE' : 0, 'INPUT_WIND_DIRECTION' : 220, 'INPUT_WIND_HEIGHT' : 10, 'INPUT_WIND_SPEED' : 2, 'LOAD_OUTPUT' : True, 'OUTPUT_FILENAME' : 'urock_output', 'RASTER_OUTPUT' : 'C:/temp/URockTutorial/Annedal_EPSG3006/dsm.tif', 'SAVE_NETCDF' : True, 'SAVE_RASTER' : True, 'SAVE_VECTOR' : True, 'UROCK_OUTPUT' : 'C:\\temp\\URockTutorial\\urock_out', 'VEGETATION' : None, 'VEGETATION_CROWN_BASE_HEIGHT' : '', 'VEGETATION_CROWN_TOP_HEIGHT' : '', 'VERTICAL_RESOLUTION' : 2, 'WIND_HEIGHT' : '1.5' }

Yes normally it is fine with the resolution it should work. I can remove this functionnality temporarily what do you think ?

biglimp commented 1 year ago

Sure, just disable and than fix it when you got time...