Forestry and Grass + scripts for models

Bruce Byars Bruce_Byars at baylor.edu
Tue Oct 26 13:55:08 EDT 1999


Agustin,

You bring up an interesting point for modeling applications.
At the present time, there is so much going on with respect that
we are not working on developing a new framework for modeling
in GRASS.  What we have been very successful in is using grass
as a kind of "front-end" processor to develop/analyze/display data
for use in complex stand-alone models.  In our experience this is
the best of both worlds.  It is not really time-consuming to write
either scripts or C programs for this type of data development.
In this way, a user can use whatever model they are comfortable
with, using grass for data development and display.

For example, we use grass to develop input data into the SWAT
watershed hydrology model.  SWAT is a very large and complex
model, but using grass we significantly cut down the time to develop
inputs and analyze results spatially.  Other good examples of this
type of approach are answers and agnps.  This also allows us to
use standard and accepted models to get results.  It also does away
with having to learn what would undoubtedly be a very large and
complex system in order to handle any sort of modeling.  (I still use
mapcalc and binfer for these types of things.)

If you have any ideas/suggestions/comments, feel free to let us know.

Thanks!

Bruce


Agustin Lobo wrote:

> Well, I would not say that is "ideal", it is possible.
> Actually, writing (i.e. population or metapopulation) models
> in C (or C++) is far from ideal, as writing the code tends to
> imply too much time devoted to "low level" (not a fair term, but an
> usual one) programming and the resulting code uses to be
> too obscure for others to read (often it's easier to
> write your own program in C than reading it afterwards).
>
> A closer-to-ideal situation would be having an script language, from
> which you can call grass programs. I wrote a model
> for gap dynamics in a neotropical forest using the c-shell
> and calling grass functions. It was better (easier and faster) than
> using C, but the code was almost as cryptic. Another problem
> was the very limited power of the c-shell to manage
> arrays (only 1-D) and to make computations (only integers), which
> had to solve by using awk sometimes.
>
> Now there are other script languages than could be better, i.e.,
> like perl, does anybody have experience at integrating grass
> commands within a perl script?
>
> Finally, I explored the possibility of using Splus (R is now a
> free alternative and mostly compatible) programs, as Splus (or R)
> can issue OS commands. Therefore, it is possible, from within an
> Splus program, run i.e. r.stats and read in the result into
> an S array and make computations. But the communication is
> through files.
>
> In any case, I think that the (near) future of Grass should contemplate
> the use of an scripting language for modeling. Is anybody at Baylor
> working in this direction?
>
> Agus
>
> Dr. Agustin Lobo
> Instituto de Ciencias de la Tierra (CSIC)
> Lluis Sole Sabaris s/n
> 08028 Barcelona SPAIN
> tel 34 93409 5410
> fax 34 93411 0012
> alobo at ija.csic.es
> http://pangea.ija.csic.es/alobo
>
> On Tue, 26 Oct 1999, Roy Sanderson wrote:
>
> > Hello
> >
> > Colleagues of mine have been using GRASS for several years to model red and
> > grey squirrel populations under different forest management regimes, and
> > various control measures for grey squirrels.  Grass is ideal for this type
> > of work, especially since you can integrate your own process-based
> > population models (we write ours in C) into the Grass environment.
> >
> > Roy
> >
> > At 04:32 pm 26/10/99 +0200, you wrote:
> > >Hello (again)
> > >
> > >I'm wondering if anybody of the grass-community has used Grass combined
> > >with forestry --> modelling and planning etc.
> > >
> > >
> > >
> > >sincerely Kjell-Olav
> > >
> > >
> > >
> >
> > ----------------------------------------------------------------------------
> > Roy Sanderson
> > Centre for Land Use and Water Resources Research
> > Porter Building
> > University of Newcastle
> > Newcastle upon Tyne
> > NE1 7RU
> > United Kingdom
> >
> > Tel: +44 191 222 7789
> > Fax: +44 191 222 6563
> > r.a.sanderson at newcastle.ac.uk
> > URL: http://www.cluwrr.ncl.ac.uk
> > ----------------------------------------------------------------------------
> >



More information about the grass-user mailing list