[GRASS-user] The r.gmtg moduel for MODFLOW.

Hamish hamish_nospam at yahoo.com
Sun May 6 02:45:46 EDT 2007


Antonio Gennarini wrote:
> I just downloaded the r.gmtg module from
> http://www.valledemexico.ambitiouslemon.com/gwmodelling.html for
> MODFLOW integration within GRASS. However, I don't seem to understand
> how to compile this module. I seem to understand that I should be
> using Gmake, however, Debian doesn't seem to have such a package ... 
> What string should a give the compiler and what development packages
> should be installed on my machine.

from the web page:
"The current version works with GRASS 5.4 and MODFLOW 96 (a recent
version, not the one from 1996) but current work is being done to
develop a new version for GRASS 6.0 and MODFLOW 2000."


"Gmakefile" was the name for GRASS 5 makefiles, to compile a module you
would run gmake5 instead of "make". In GRASS 6 it now uses normal
"make", but this means you need to use a normal Makefile too.

So you will need to port the module to GRASS 6 by writing a new Makefile
for it.

First you need to build all of grass from source code to get the correct
build environment set up.

- put the r.gmtg code into the raster/ dir in the grass source.
- copy a Makefile from another raster module into raster/r.gmtg dir.
  try to take it from a raster with similar needs (eg vector lib
  support?)
- edit the Makefile for the module name.
- move r.gmtg.html to r.gmtg/description.html
- run "make" in the raster/r.gmtg dir.

Because it uses FORTRAN, maybe rewriting the Makefile is difficult
without more help and you should just try building it with the old GRASS
5.4 for which it was written? (ie I'm no make expert)

In GRASS 6 there is a new "GEM" system for building modules without
first having to build all of grass yourself:
  http://grass.ibiblio.org/grass63/manuals/html63_user/gem/index.html


I see r.gmtg is for ground water flow modelling (MODFLOW). Maybe Soeren
has some new and interesting module for GRASS 6.3 you could try?


Hamish




More information about the grass-user mailing list