Memory Error Urban Flood Rist Mitigation Model

Hello,
I need some help with the urban flood risk mitigation model. All of the input files are shown as validated and the model runs, but it shows an Memory Error.
I would really appreciate some help.

InVEST-UrbanFloodRiskMitigation-log-2021-01-25–17_45_45.txt (23.5 KB)

Joshua

Hi @Joshua ,

Thanks for posting to the forums, that is an odd one. Could you try going to edit->Clear parameter cache. Could you then try running the model under a new workspace without a suffix?

I’d also be interested in testing your data on my end to see what the bug might be. If you’re able to share your data could you share a Google Drive link or similar link through a sharing service? You can either put the link here or email ddenu@stanford.edu if you’re worried about it being public.

Cheers,

Doug

Hi Doug,
I changed the resolution of the watershed from 10 meters to 20 meters and now it works.
I also followed your instructions for further modelling. Do you think it would be possible to work with a higher resolution or is there a mistake I am not seeing.

Cheers

Joshua

Hi @Joshua ,

I’ll take a look at the data you sent along. The model should never crash with a MemoryError, so yes, you should be able to run it with higher resolution data. More soon.

Doug

Hi @Joshua ,

I’m able to see the huge memory spike from your data but have not quite pin pointed the exact issue.

I did notice that your watershed shapefile has 4000+ features. Using QGIS “Check Validity” tool I did notice that some of the geometries cause errors or are invalid. It looks like a lot of those features in that shapefile might be artifacts and not very useful? I think this is ultimately related to the memory issue but can’t say for sure why yet.

But, simplifying and fixing the watershed shapefile might be a work around in the mean time.

More soon,

Doug

Hi Doug,
I changed the raster resolution to 20 meters and used a smaller area. The model works now, but the output flood risk shapefile has only values in the flood volume row.

Thanks for the help so far!

Joshua

-----Original-Nachricht-----

(Attachment dgm_H_Basin_1_vec.dbf is missing)

(Attachment dgm_H_Basin_1_vec.prj is missing)

(Attachment dgm_H_Basin_1_vec.shx is missing)

Hi @Joshua ,

I’ll take a look, but also wanted to update you that we found the bug that was causing MemoryError and will hopefully have a patch out soon. The way around it for now will be to simplify that Watershed shapefile so it’s less than 1000 features.

Cheers,

Doug

Hi @Joshua ,

Just sent you an email to re-request some of your model inputs and outputs.

Cheers,

Doug

Hey @Joshua,

I took a look at the data you provided. One thing I noticed was that the LULC raster and the biophysical table lucode don’t seem to correlate. The LULC raster has values 1 - 14 where as the table has codes using 111, 112, etc… These should match up and is most likely why the raster outputs are 0.

As for the output shapefile, without any infrastructure inputs the only fields in that output should be rnf_rt_idx, rnf_rt_m3, flood_vol, which I am seeing from running your data.

Let us know how things look after aligning the LULC raster values with the lucode column in the biophysical table!

Cheers,

Doug