[GRASS-user] Grass/GMT problem

Roger Mason rmason at esd.mun.ca
Wed Jul 9 08:26:23 EDT 2008


Hello,

I'm using the following to generate fake landscapes to be contoured in
GMT:

    r.surf.fractal out="landscape"
    r.rescale input="landscape" output="rescaled" to=0.0,30.1 --o
    r.neighbors input="rescaled" output="smoothed" size=25 --o
    r.out.bin -h input=smoothed output=gmt.grd --o

I set up gmt as follows:

  psbasemap -JX10 -R0/100/0/100 -P -B -K -U"Contour Map" > map.ps

and invoke gmt's contour command thus:

    grdcontour gmt.grd=bf -D -M -J -C5 -A5 -Gd3c -Wa2ta -O -K >> map.ps

The problem is that the produced "map" consists of very small, closed
loops that bear no resemblance to the landscape.  You may ask how I
know what the landscape should look like.  If I export the raster as
integer values, and import into into GMT using 'grdcontour gmt.grd=bf'
then everything is fine.  I have tried r.out.gdal with the GMT and
netCDF types but the resulting files could not be read by grdcontour.

At the moment I don't know how to determine whether it is Grass, GMT
or my ineptitude that is the problem.

Thanks for any help.

Roger

Grass 6.3.0
GMT 4.1.1
Gentoo Linux


More information about the grass-user mailing list