1

I am using GRASS 7.8 and r.avaflow training data (https://www.landslidemodels.org/r.avaflow/data.php) to run my first simulation.

When I tried to run this .sh file (with g.region, r.mapcalc, etc.):

#Launching r.avaflow 2.4 computational experiments of landslide-reservoir interactions in a computer-generated landscape

cellsize="10"

g.region -d
g.region -a res="$cellsize"

#Generic landscape
r.mapcalc --overwrite "xre_elevx = if(x()<1000,0.0005*pow(x()-1000,2),if(x()>2000,(2000-x())*0.2,0))" #elevation profile in x direction
r.mapcalc --overwrite "xre_elevy = 0.0005*pow(y()-1000,2)" #elevation profile in y direction
r.mapcalc --overwrite "xre_elevr = xre_elevx+xre_elevy" #elevation without dam
r.mapcalc --overwrite "xre_elev = max(xre_elevr,50-0.5*abs(x()-2000))" #elevation with dam (50 m high)

r.mapcalc --overwrite "xre_elevfill = if(x()<2000,max(40,xre_elev),xre_elev)" #elevation with filled reservoir (water level 40 m)
r.mapcalc --overwrite "xre_hrell = xre_elevfill-xre_elev" #height of lake

r.mapcalc --overwrite "xre_hrel1 = 1.0*pow(pow(100,2)-pow(x()-500,2)-pow(y()-1500,2),0.5)" #release height 1
r.mapcalc --overwrite "xre_hrel1 = if(isnull(xre_hrel1)==1,0,xre_hrel1)" #setting undefined raster cells to zero

r.mapcalc --overwrite "xre_hrel2 = 1.0*pow(pow(100,2)-pow(x()-1350,2)-pow(y()-1650,2),0.5)" #release height 2
r.mapcalc --overwrite "xre_hrel2 = if(isnull(xre_hrel2)==1,0,xre_hrel2)" #setting undefined raster cells to zero

r.mapcalc --overwrite "xre_tstart = if(xre_hrel2>0,150,-1)" #start time of landslide 2

r.mapcalc --overwrite "xre_hentrmax = xre_elev-xre_elevr" #maximum depth of entrainment

#Multi-phase model with three phases (solid and fine-solid landslides, fluid reservoir)> and entrainment of dam
r.avaflow prefix=xre_exp1 cellsize="$cellsize" phases=m elevation=xre_elev hrelease1=xre_hrel1 hrelease2=xre_hrel2 hrelease3=xre_hrell trelease=xre_tstart hentrmax1=xre_hentrmax hydrocoords=2600,1000,1000,180 friction=45,25,0,0,0,0,0.0 viscosity=-3,0,2.5,-9999,-3,0 basal=-5.5,0.0,0.0,0.0,0.0 thresholds=0.25,10000,10000,0.01 controls=0,0,0,1,0,0 time=5,300 cfl=0.25,0.001 profile=300,1700,1000,1000,3100,1000

#Multi-phase model with three phases (solid landslide, fine-solid hydrograph release, fluid reservoir) and entrainment of dam
r.avaflow prefix=xre_exp2 cellsize="$cellsize" phases=m elevation=xre_elev hrelease1=xre_hrel2 hrelease3=xre_hrell hentrmax1=xre_hentrmax hydrograph=xre_hydrograph.txt hydrocoords=250,250,100,225,2600,1000,1000,180 friction=45,25,0,0,0,0,0.0 viscosity=-3,0,2.5,5,-3,0 basal=-5.5,0.0,0.0,0.0,0.0 thresholds=0.25,10000,10000,0.01 controls=0,0,0,1,0,0 time=5,300 cfl=0.25,0.001 profile=300,1700,1000,1000,3100,1000

g.region -d

I received this error:

Traceback (most recent call last):

File "/home/tphan/.grass7/addons/scripts/r.avaflow", line 8411, in main() File "/home/tphan/.grass7/addons/scripts/r.avaflow", line 2568, in main grass.run_command("r.avaflow.main") # executing r.avaflow File "/usr/local/grass78/etc/python/grass/script/core.py", line 441, in run_command return handle_errors(returncode, returncode, args, kwargs) File "/usr/local/grass78/etc/python/grass/script/core.py", line 342, in handle_errors raise CalledModuleError(module=None, code=code, grass.exceptions.CalledModuleError: Module run None r.avaflow.main ended with error Process ended with non-zero return code -11. See errors in the (error) output.`

I'm not sure what I did wrong. This is an example from r.avaflow and I just run the script to test the software.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.