[GRASS-user] r.hazard.flood: ERROR_G_malloc: r_accumulation

Markus Metz markus.metz.giswork at gmail.com
Mon Jun 10 12:17:26 PDT 2013


On Mon, Jun 10, 2013 at 3:54 PM, RichardC <richtcooper at hotmail.com> wrote:
> Hi,
>
> Maybe some one could kindly advise what I'm doing wrong here.
>
> Previously I successfully used r.hazard.flood to generate flood and mti
> layers. However, now I'm encountering the following error with two other
> different DEM layers. The error appears to be related to memory, but there
> is plenty of RAM free (6GB) and I still get the error with a DEM subset of
> only 5MB in size. Also, I'm able to repeat the r.hazard.flood process
> successfully using the first DEM I tried, so it would seem to be related to
> the DEMs?
>
> I've set g.region - selecting the raster file to be used with r.hazard.flood
> and resolution (in meters).
>
> Thanks for your suggestions,
>
> Richard
>
>
> r.hazard.flood.py map=ASTGTM_composite_all_de at PERMANENT
> flood=ASTGTM_composite_all_delta_flood mti=ASTGTM_composite_all_delta_mti
> Cellsize : 30.0
> SECTION 1a (of 4): Initiating Memory.
> Current region rows: 17981, cols: 11271
> ERROR: G_malloc: unable to allocate 811437852 bytes of memory at
> init_vars.c:136

You could modify the r.hazard.flood.py python script such that it
calls r.watershed with the memory-safe option,: replace

grass.run_command('r.watershed', elevation = r_elevation ,
accumulation = 'r_accumulation' , convergence = 5, flags = 'a')

with

grass.run_command('r.watershed', elevation = r_elevation ,
accumulation = 'r_accumulation' , convergence = 5, flags = 'am')

HTH,

Markus M


> WARNING: Subprocess failed with exit code 256
> WARNING: category information for [r_accumulation] in [PERMANENT] missing or
> invalid
> Flow accumulation done.
> Slope raster map <r_slope> complete
> Slope map done.
> Exponent : 0.076488432313
> MTI threshold : 3.11495902789
> Calculating mti raster map..
> Invalid map <r_accumulation>
> Parse error
> ERROR: An error occurred while running r.mapcalc
>
>
>
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/r-hazard-flood-ERROR-G-malloc-r-accumulation-tp5059130.html
> Sent from the Grass - Users mailing list archive at Nabble.com.
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user


More information about the grass-user mailing list