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

RichardC richtcooper at hotmail.com
Mon Jun 10 21:36:17 PDT 2013


Thanks for your suggestions.

I modified the following:

/home/user/.grass6/addons/scripts/r.hazard.flood, replacing:
  
# Flow accumulation map MFD
    grass.run_command('r.watershed', elevation = r_elevation , accumulation
= 'r_accumulation' , convergence = 5, flags = 'fa')
    grass.message("Flow accumulation done. ")

with

  # Flow accumulation map MFD
    grass.run_command('r.watershed', elevation = r_elevation , accumulation
= 'r_accumulation' , convergence = 5, flags = 'am')
    grass.message("Flow accumulation done. ")

This enabled me run r.hazard.flow on a portion (sub-basin) of the DEM. I ran
into trouble if I attempted the larger mosaic I created, as follows:

r.hazard.flood.py map=ASTGTM_composite_all at PERMANENT
flood=ASTGTM_composite_all_flood mti=ASTGTM_composite_all_mti
Cellsize : 30.0
SECTION 1 beginning: Initiating Variables. 4 sections total.
WARNING: segment zero_fill(): Unable to write (No such file or directory)
WARNING: seg_open(): could not write segment file
SECTION 1b (of 4): Determining Offmap Flow.
Floating point exception (core dumped)
WARNING: Subprocess failed with exit code 34816
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
(Tue Jun 11 10:55:33 2013) Command finished (9 min 3 sec)    

I guess the workaround solution is to reduce the spatial extent and run each
sub-basin separately with r.hazard.flood (if possible for all I'm not sure)

Install GRASS 7 - installing from source into my home directory I think
should allow two systems to work on my machine ...                  


My current system:

uname -a: Linux 3.2.0-31-generic-pae #50-Ubuntu SMP Fri Sep 7 16:39:45 UTC
2012 i686 i686 i386 GNU/Linux

I'm running Linux Mint 13 (Maya) which is based on Ubuntu Precise (installed
system wide via package manager)

GRASS version: 6.4.3 (Python 2.7.3/wxpython 2.8.12.1)
GRASS: 6.4.3-1~svn54876~precise1

NB: I just noticed that the repo has been updated with 6.4.3 (RC3-4) ... 





--
View this message in context: http://osgeo-org.1560.x6.nabble.com/r-hazard-flood-ERROR-G-malloc-r-accumulation-tp5059130p5059281.html
Sent from the Grass - Users mailing list archive at Nabble.com.


More information about the grass-user mailing list