[GRASS-dev] r.sim.water in 64, 65, 7

Helena Mitasova hmitaso at unity.ncsu.edu
Fri Nov 26 00:12:21 EST 2010


Several changes were made in r.sim.water recently but it has still some troubles on non-linux machines.

GRASS64: it runs on linux, but gives Segmentation fault on Mac and Windows 
Glynn has fixed the segmentation fault problem in GRASS7, I believe it is r42402(?)
http://trac.osgeo.org/grass/changeset/42402
but the fix was not backported to GRASS6 develbranch or GRASS64, so those two do not run on Mac or Windows

GRASS65 selfcompiled on Mac and linux - runs for me but I don't see Glynn's fix in the svn

GRASS7 selfcompiled on Mac and linux - here most changes were made,
but all cannot be backported because as names of some options were changed recently,
it now runs only with some of the them, but with the constant input values it says:
ERROR: Invalid descriptor: 0

below are some test runs if anybody wants to try it out. It would be great if the fix in GRASS7 made it 
into the GRASS6.4.1 release and if the GRASS7 problem was fixed (I can look into the second one),

thank you,

Helena

#test for GRASS65
#location nc_spm_08
#mapset user1
g.region rural_1m res=2
r.mapcalc man0_1=0.1
r.mapcalc infil0=0.
r.mapcalc rain42mmhr=42.
v.surf.rst -dz input=elev_lid792_bepts layer=0 elev=elev_lid792_2m slope=dx_2m aspect=dy_2m ten=15 smooth=1.5 segmax=25 npmin=100
# run with defaults
r.sim.water -t elev=elev_lid792_2m dx=dx_2m dy=dy_2m  depth=A1wdp_2mc disch=A1disch_2mc nwalk=200000
# run with input raster maps
r.sim.water -t elevin=elev_lid792_2m dxin=dx_2m dyin=dy_2m rain=rain42mmhr infil=infil0 manin=man0_1 depth=A1wdp_2mtest disch=A1disch_2mtest. nwalk=200000 niter=25 outit=5 hmax=0.2 halpha=8.0 hbeta=1.0
# run with input values
r.sim.water -t elevin=elev_lid792_2m dxin=dx_2m dyin=dy_2m rain_val=42 infil_val=0. manin_val=0.1 depth=A1wdp_2mtest disch=A1disch_2mtest nwalk=200000 niter=25 outit=5 hmax=0.2 halpha=8.0 hbeta=1.0

to check using animations you can use outit=1 and
xganim view1="A1disch_2mtest2*"

GRASS7
r.mapcalc expression="man0_1=0.1"
r.mapcalc expression="infil0=0."
r.mapcalc expression="rain42mmhr=42."
r.sim.water -t elev=elev_lid792_2m dx=dx_2m dy=dy_2m rain=rain42mmhr infil=infil0 man=man0_1 depth=A1wdp_2mtest2 disch=A1disch_2mtest2 nwalk=200000 niter=25 outit=5 hmax=0.2 halpha=8.0 hbeta=1.0
runs OK

the command below gives
ERROR: Invalid descriptor: 0
r.sim.water -t elev=elev_lid792_2m dx=dx_2m dy=dy_2m rain_val=42 infil_val=0. man_val=0.1 depth=A1wdp_2mtest disch=A1disch_2mtest nwalk=200000 niter=25 outit=5 hmax=0.2 halpha=8.0 hbeta=1.0
same when the module is run with defaults
r.sim.water -t elev=elev_lid792_2m dx=dx_2m dy=dy_2m  depth=A1wdp_2mc disch=A1disch_2mc nwalk=200000

Note on GUI - is there any way to extend the list of files in the browser of the GUI - I can see only 9 files at once on MacHelena 


More information about the grass-dev mailing list