Dear GRASS users,
I want to use r.hazard.flood module of GRASS but could not get it to work. I am running it in the command console. My expression is:
r.hazard.flood map=myanmar_dem_modis flood=flood mti=mti
Below is the error that I am getting. I have also r.area installed.
The projection of my Map is in Sinusoidal. I have my GRASS installed via the OSGeo4W installer, as I use this method to install QGIS.
I am using Windows 7 Professional OS 64-bit
My GRASS version is 6.4.3
Another question: Is there a GUI for this module in the Windows version of GRASS?
Thanks,
-Leo
Error message:
r.hazard.flood map=myanmar_dem_modis flood=flood mti=mti
Cellsize : 118.28096836
SECTION 1a (of 4): Initiating Memory.
Current region rows: 17433, cols: 17539
ERROR: G_malloc: unable to allocate 2448854040 bytes of memory at init_vars.c:134
WARNING: Subprocess failed with exit code 1
WARNING: category information for [r_accumulation] in [LPalao] missing or invalid
Flow accumulation done.
Slope raster map <r_slope> complete
Slope map done.
Exponent : 0.143767534008
MTI threshold : 3.84762844534
Calculating MTI raster map…
Invalid map <r_accumulation>
Parse error
ERROR: An error occurred while running r.mapcalc
(Fri Jul 04 17:21:32 2014) Command finished (1 min 23 sec)
Hi Madi,
I got it working now. I think that my DEM is so big (one country). I created a subset and it is now working. Is there a way where I can just choose my region of interest from my country-wide DEM and then process it? Right now what I am doing is to clip the DEM to create a subset and process it.
Hope my query is clear.
Thanks,
-Leo
···
On Fri, Jul 4, 2014 at 5:45 PM, Margherita Di Leo <diregola@gmail.com> wrote:
Hi Leo,
–
LEO KRIS MARIANO PALAO
International Rice Research Institute
Website: www.irri.org
Official Email: l.palao@irri.org
On Fri, Jul 4, 2014 at 11:37 AM, Leo Kris Palao <lk.palao@gmail.com> wrote:
Dear GRASS users,
I want to use r.hazard.flood module of GRASS but could not get it to work. I am running it in the command console. My expression is:
r.hazard.flood map=myanmar_dem_modis flood=flood mti=mti
Below is the error that I am getting. I have also r.area installed.
The projection of my Map is in Sinusoidal. I have my GRASS installed via the OSGeo4W installer, as I use this method to install QGIS.
I am using Windows 7 Professional OS 64-bit
My GRASS version is 6.4.3
Another question: Is there a GUI for this module in the Windows version of GRASS?
Thanks,
-Leo
Error message:
r.hazard.flood map=myanmar_dem_modis flood=flood mti=mti
Cellsize : 118.28096836
SECTION 1a (of 4): Initiating Memory.
Current region rows: 17433, cols: 17539
ERROR: G_malloc: unable to allocate 2448854040 bytes of memory at init_vars.c:134
WARNING: Subprocess failed with exit code 1
WARNING: category information for [r_accumulation] in [LPalao] missing or invalid
Flow accumulation done.
Slope raster map <r_slope> complete
Slope map done.
Exponent : 0.143767534008
MTI threshold : 3.84762844534
Calculating MTI raster map…
Invalid map <r_accumulation>
Parse error
ERROR: An error occurred while running r.mapcalc
(Fri Jul 04 17:21:32 2014) Command finished (1 min 23 sec)
This log suggests that r.watershed, called by r.hazard.flood, is not able to finish the job due to lack of memory. Could you please check if the computational region is set correctly and then if you can run r.watershed separately?
The GUI for this module should be available on the fly as any other modules… what if you type r.hazard.flood --ui ?
Cheers,
madi
–
Best regards,
Dr. Margherita DI LEO
Scientific / technical project officer
European Commission - DG JRC
Institute for Environment and Sustainability (IES)
Via Fermi, 2749
I-21027 Ispra (VA) - Italy - TP 261
Tel. +39 0332 78 3600
margherita.di-leo@jrc.ec.europa.eu
Disclaimer: The views expressed are purely those of the writer and may not in any circumstance be regarded as stating an official position of the European Commission.
Leo wrote:
> Cellsize : 118.28096836
> SECTION 1a (of 4): Initiating Memory.
> Current region rows: 17433, cols: 17539
> ERROR: G_malloc: unable to allocate 2448854040 bytes of memory at
> init_vars.c:134
> WARNING: Subprocess failed with exit code 1
Madi:
This log suggests that r.watershed, called by r.hazard.flood, is not
able to finish the job due to lack of memory.
[@devs]
in bash you can do a test "if [ $? -ne 0 ] ; then" to see if r.watershed
finished correctly and go to a 'g.message -e' and 'exit 1' if it
failed. r.hazard.flood is a python script, how to apply the same to
grass.run_command() before claiming success and continuing?
regards,
--
Hamish <hamish.webmail@gmail.com>
.
Thought I should join the Yahoo mail diaspora before 30 days
worth of my emails got flushed from everyone's spam boxes never
to be seen again. In the last weeks some have made it to the ML
archives at least, if not to end recipients. Others seem to have
just disappeared into /dev/null. It didn't help that the web
interface had become an unusable gibberish of broken JavaScript
and their IMAP would only transfer the oldest 4% of my inbox.
.
http://www.ietf.org/mail-archive/web/ietf/current/msg87153.html
http://www.spamresource.com/2014/04/up-in-arms-about-yahoos-dmarc-policy.html
http://wiki.list.org/pages/viewpage.action?pageId=17891458
On Tue, Jul 8, 2014 at 4:29 AM, Hamish <hamish.webmail@gmail.com> wrote:
Leo wrote:
> > Cellsize : 118.28096836
> > SECTION 1a (of 4): Initiating Memory.
> > Current region rows: 17433, cols: 17539
> > ERROR: G_malloc: unable to allocate 2448854040 bytes of memory at
> > init_vars.c:134
> > WARNING: Subprocess failed with exit code 1
Madi:
> This log suggests that r.watershed, called by r.hazard.flood, is not
> able to finish the job due to lack of memory.
[@devs]
in bash you can do a test "if [ $? -ne 0 ] ; then" to see if r.watershed
finished correctly and go to a 'g.message -e' and 'exit 1' if it
failed. r.hazard.flood is a python script, how to apply the same to
grass.run_command() before claiming success and continuing?
In case of run_command you should check the return value which is the exit
code of the module.
ret = run_command('g.region', s=0, n=5, w=0, e=5, res=1)
if ret != 0:
grass.script.fatal(_("g.region failed, see the error message above"))
It is actually designed to resemble the calls in shell which I don't think
is a right think to do, so please see ticket #2326.
[doc]
http://grass.osgeo.org/programming7/namespacepython_1_1script_1_1core.html#a0cbf4805e1691904c8245037ea359c71
[src]
http://trac.osgeo.org/grass/browser/grass/trunk/lib/python/script/core.py#L352
[ticket] http://trac.osgeo.org/grass/ticket/2326
regards,
--
Hamish <hamish.webmail@gmail.com>
.
Thought I should join the Yahoo mail diaspora before 30 days
worth of my emails got flushed from everyone's spam boxes never
to be seen again. In the last weeks some have made it to the ML
archives at least, if not to end recipients. Others seem to have
just disappeared into /dev/null. It didn't help that the web
interface had become an unusable gibberish of broken JavaScript
and their IMAP would only transfer the oldest 4% of my inbox.
.
http://www.ietf.org/mail-archive/web/ietf/current/msg87153.html
http://www.spamresource.com/2014/04/up-in-arms-about-yahoos-dmarc-policy.html
http://wiki.list.org/pages/viewpage.action?pageId=17891458
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user