mizuRoute icon indicating copy to clipboard operation
mizuRoute copied to clipboard

Facing issue in running test data

Open DIPESHSINGHCHUPHAL opened this issue 3 years ago • 4 comments

Hello, I am a student at the IIT Gandhinagar, India. I am currently trying to setup the MIZU route model by using the test data provided. I use the make command successfully but I'm having trouble in running map_poly2poly.py script. It is showing some error while using the shapely package. I'm facing the following error:

Traceback (most recent call last): File "/media/dipesh/data2/Dipesh/Mizu/mizuRoute-v1.0/NCAR-mizuRoute-21609e0/scripts/map_poly2poly.py", line 90, in gridtobasin_function(hruPoly, hrufieldname1, overlayPoly, hrufieldname2)

File "/media/dipesh/data2/Dipesh/Mizu/mizuRoute-v1.0/NCAR-mizuRoute-21609e0/scripts/map_poly2poly.py", line 44, in gridtobasin_function latlondict=GDAL_OGR_Functions.polyXY(inpoly,hrufieldname2)

File "/media/dipesh/data2/Dipesh/Mizu/mizuRoute-v1.0/NCAR-mizuRoute-21609e0/scripts/GDAL_OGR_Functions.py", line 167, in polyXY shgeom = shapely.wkb.loads(geometry.ExportToWkb())

File "/home/dipesh/.local/lib/python3.10/site-packages/shapely/wkb.py", line 17, in loads return shapely.from_wkb(data)

File "/home/dipesh/.local/lib/python3.10/site-packages/shapely/io.py", line 325, in from_wkb return lib.from_wkb(geometry, invalid_handler,**kwargs) TypeError: Expected bytes or string, got int

I'm hoping you can assist me with this issue.

DIPESHSINGHCHUPHAL avatar Dec 29 '22 17:12 DIPESHSINGHCHUPHAL

Hi, Please use v1.2.2, which is much more efficient than v1.0 you are using. documentation is https://mizuroute.readthedocs.io/en/latest/. I know testCase link is broken, so may need to deliver somehow. wondering if you could wait a week or so. I will et you know where you can get test data.

nmizukami avatar Dec 29 '22 19:12 nmizukami

Thank you for responding. I'll try with the updated version of Mizu Route. Is there any difference in the test data for both versions?

DIPESHSINGHCHUPHAL avatar Dec 31 '22 10:12 DIPESHSINGHCHUPHAL

Hi @nmizukami, I followed the above documentation and now the model is working for the test data.

I'm having two doubts in making input HRU shapefile.

  1. What is the difference between "hru_elev" and "Elev_Avg" in nhru_cameo.shp file?
  2. Do I have to follow any specific order (for example: upstream to downstream) in defining the hruid in nhru_cameo.shp file?

DIPESHSINGHCHUPHAL avatar Jan 02 '23 20:01 DIPESHSINGHCHUPHAL

Hi, I am not sure if the latest test dataset has nhru_cameo.shp. maybe take a look at this https://drive.google.com/file/d/1wZfEktgjDyMQLQ9K7As-cn76u-Db_eI3/view?usp=share_link.

  1. I don't think mizuRoute requires any elevation of hru. elevation may be used for river reach (elevation at end points of a reach) to compute slope that is required for routing. but not HRU elevation.
  2. I am not sure about the question. you will need to figure out which river reach each HRU is connected. (need reach ID for each HRU).

nmizukami avatar Jan 26 '23 20:01 nmizukami

This is a question regarding how to run mizuRoute v1.2 version. There is no response for over a year so I will close it. if you have any further questions, please post here.

nmizukami avatar Jul 23 '24 16:07 nmizukami