[GRASSLIST:3423] Re: GRASS scripting question

Hamish hamish_nospam at yahoo.com
Sun May 16 21:10:54 EDT 2004


> I have generated 8760 (hourly) maps of radar precipitation fields that
> I need to sum to monthly (and daily) totals using r.mapcalc within a
> Perl script. I have tried *EVERYTHING* I can do with this but I keep
> getting an error related to the shell not properly handling '+'.


You may prefer to use r.series for some of this. In 5.3, compile by hand
by changing into the src/raster/r.series directory and running gmake5
and gmakelinks5. (add -i to install to /usr/local/grass or whatever if
needed)  It's compiled in 5.7 by default.

If you need to sum many maps (say 365) you'll have to make some
adjustments to the code and recompile GRASS. see:

http://article.gmane.org/gmane.comp.gis.grass.devel/1169
http://article.gmane.org/gmane.comp.gis.grass.devel/1172
http://article.gmane.org/gmane.comp.gis.grass.devel/2605

It should be really useful for daily totals and sums of those daily
totals into monthly totals.


Hamish




More information about the grass-user mailing list