I am trying to create a flood modelling system. The system consists of two parts mainly a river flooding simulation and rainfall simulation. To do this I am running the latest version of GRASS 6.4. Also I am using the SRTM obtained from CGIAR as my DEM.

I would like to ask what are the most appropriate commands to run a simulation. Ex. Terraflow

Also since we are modelling flooding based on a river, is it advisable to use HEC-RAS? It was created by the same folks who made GRASS. :)

I am more of a programmer rather than an engineer. It is my first venture into simulation systems as part of my degree.

As of now Here is our plan for the rainfall (pseudocode):

int i = 0, j = 0;
int passes, numberOfmesh;
double rainAmount;
double store1[][];
double store2[][];

numberOfmesh = getTotalMeshCells();
passes = computePasses(numberOfmesh());
rainAmount = getRainAmount();

/* rainAmount corresponds to the input of the user in the textfield.
store1 contains the elevation and the number of times an amount of water
has been passed to it (per pixel)
store2 contains the elevation and the total accumulated water (per pixel)
Both store1 and store2 have 'n' number of rows and 2 columns;

while(i != passes)
    while(j != numberOfmesh)
        direct = getDirection(store[j][0]);
        /* direct corresponds to the direction of a mesh cell;
        I don't know what id the datatype for direct; */       

        store2[j][6] += rainAmount;


//Here is what gotoDirect is supposed to do:

   /* How can we determine the elevation of the mesh cell to where the
     'direct' points to?
     In the following code, j refers to the elevation of the mesh cell where
     the 'direct' point to.

   store1[j][7] += 1;
   /* increases the number of times that an amount of water
   was passed to it */

//Here is what computeAccumulated is supposed to do:

    while(j != numberOfmesh)
        store2[j][8] += store1[j][9] * rainAmount;       


4 Answers 4


I can't speak much on GRASS specifically, but it looks like what you're trying to do here is develop flow direction and accumulation grids - I'm pretty sure GRASS already has that functionality built-in.

Once you've developed those grids, you can use a regression equation (the USGS develops these: http://water.usgs.gov/osw/programs/nss/pubs.html#wv) to compute the flow at a specific cell, and use those flows in a HEC-RAS model. HEC-RAS is good for flood modeling, but it has a number of limitations - namely that it's clunky and there isn't any documentation that I'm aware of on the file structures. But it's free and very widely-used by civil engineers.

If what you're looking to do is integrate hydrology and hydraulics into a single process, be prepared to do a lot of reading on fluid dynamics.


It wasn't clear from the description of your project whether you are trying to model the passage of a flood wave through a 2-D flow grid (i.e., the change in inundation area as a function of time as the flood passes from upstream to downstream), or whether your output is to show the highest flood elevation at any given point caused by a single flooding event (like what is shown in the FEMA flood insurance maps).

The method suggested by thwllms (using the USGS regression equations at each cell) would give you the PEAK flow of a given return period (probability of being equalled or exceeded in any given year) at a particular location in a river. Running HEC-RAS for the river in question will give you the steady-state water surface elevation FOR THAT ONE FLOW at any given river cross section. (HEC-RAS is mostly a one-dimensional, steady-state "water surface profile" model.) The water surface elevations thus obtained are then transferred onto a paper topo map or to a DEM to derive the inundation areas caused by that level of flood flow. This is the method traditionally used (with some variations) for the FEMA flood insurance studies.

If your project is to model the passage of a single flood wave over time, then the flows are not steady-state, and HEC-RAS may not be the best model to use. There are other models used by USGS, the Corps of Engineers, and the Bureau of Reclamation (along with the engineering agencies of state governments) that model such flows. Unfortunately, I'm not very familiar with these unsteady-state models.

Once you've decided on what kind of river flows you want to model, it'll be appropriate to seek out the appropriate model to use. Good luck!

  • My project is to create a flood modelling software. I will simulate the possible floods caused by the outflow of a dam. It is the outflow from the opening of the gates of the dam (not by dam break) to be channeled along a river. Is this considered as a steady-state?
    – teamAngat
    Feb 9, 2011 at 4:07
  • 1
    Sorry, just saw your comment this afternoon. Joseph Jones has answered your question about flow from an open gate, and I agree with his answer.
    – Howard Y
    Feb 10, 2011 at 20:22

The rainfall part gets complicated fast if you want to be realistic....How much rain sinks into the ground? evaporates? causes snowmelt? How quickly does it flow over saturated ground? etc. etc. If this is just an "exercise", go ahead and treat the whole world as concrete and be done with it.

Flow out of a gate, constant and long term is classic steady state. HEC-RAS is appropriate.

Otherwise, you would need to team with an engineer to guide you in the application of the governing equations for open channel flow...totally reinvinting the wheel. Realistically, you would need channel bathymetry unless the flow is much larger than the channel can accomodate. SRTM is too crude for a credible simulation, but again, it sounds like this is an exercise in coding.....


For the rainfall simulation, you should definitely take a look at the iHacres module in SAGA GIS. More information here: http://www.ufz.de/index.php?en=17175

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.