GRASS modeling

I want to do modeling in GRASS but I do not yet have all
documentation. I am intereested in knowing how to run models that test
for various conditions in data sets, all within the GRASS environment.
I know how to write scripts, but not how to construct tests within a
given program, i.e. "if...then".

The on-line manual entry for r.mapcalc does make reference to if
statements, but it does not elaborate. Presumably, I can write a
script that invokes a series of GRASS commands, any one of which may
be in a loop. Any help on how to do this, on the extent of
programming functions available in GRASS, and on how to get real time
displays of model results would be appreciated.

  Please reply to : slu@titania.rutgers.edu

Shen Lu (slu@titania.rutgers.edu) writes on 5 Oct 93:

The on-line manual entry for r.mapcalc does make reference to if
statements, but it does not elaborate. Presumably, I can write a

There should be a reference to the r.mapcalc tutorial (I didn't
check - maybe there is, maybe there isn't).

script that invokes a series of GRASS commands, any one of which may
be in a loop. Any help on how to do this, on the extent of

just as you would do in normal script programming.
For example, in csh:

foreach file ($LOCATION/cell)
  d.rast $file:t
  sleep 10
end

programming functions available in GRASS, and on how to get real time
displays of model results would be appreciated.

Please reply to : slu@titania.rutgers.edu