Jump to content

User talk:Captain Blood~enwiki/GMT Example

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Nice Example

[edit]

Would just like to say thanks for this working example, it worked exactly the way it was meant to. I installed GMT with cygwin on Windows Vista on my laptop, was a bit tricky to get it all working right but got there in the end. The main problem was getting cygwin to run properly, to anyone reading this the key for me was to go to bash.exe and under properties/compatibility choose run as administrator, otherwise the GMT executables just keep crashing. Jackaranga 09:14, 3 October 2007 (UTC)[reply]

Nice Example Thanks Captain Blood

[edit]

I also was able to follow the instructions.Got it working with cygwin running on Vista.

Here I have a few comments where I had trouble.

When downloading the etopo2.grid.gz from http://dss.ucar.edu/datasets/ds759.3/data/etopo2_2001sep/index.html created by Ben Horner-Johnson I was getting an error when trying to apply gunzip to it I email the guy resposible at the site and he mentioned that the file was alredy uncompress so all I needed was to change the name from etopo2.grd.gz to etopo2.grd.

The other issue I have was all the files need to be save in Unix format (Could be done easily using TexPad (editor). Otherwise you keep getting and error that looks like

c:\programs\GMT\bin\grdimage.exe: GMT Fatal Error: Z-slice with dz = 0 c:\programs\GMT\bin\psscale.exe: GMT Fatal Error: Z-slice with dz = 0

After fixing those things the program ran as describe.

Beautiful maps! Thanks Again Captain Blood

SilentVoice

Another script to make the tiles from noaa into grd files easier

[edit]

This script could be use to do the conversion of the Tiles from the site http://www.ngdc.noaa.gov/mgg/topo/gltiles.html

It assumes all the Tiles are present in the directory where you run the script and it will produce all the grd pair Doing this will be useful as it will allow you to maps of any place on earth!


#!/bin/bash

#1 "GLOBE_G" "m" -R-180/-90/50/90 -I0.5m P i 1 0 -500 a10g
#2 "GLOBE_G" "m" -R-90/0/50/90    -I0.5m P i 1 0 -500 b10g
#3 "GLOBE_G" "m" -R0/90/50/90     -I0.5m P i 1 0 -500 c10g
#4 "GLOBE_G" "m" -R90/180/50/90   -I0.5m P i 1 0 -500 d10g
#5 "GLOBE_G" "m" -R-180/-90/0/50  -I0.5m P i 1 0 -500 e10g
#6 "GLOBE_G" "m" -R-90/0/0/50     -I0.5m P i 1 0 -500 f10g
#7 "GLOBE_G" "m" -R0/90/0/50      -I0.5m P i 1 0 -500 g10g
#8 "GLOBE_G" "m" -R90/180/0/50    -I0.5m P i 1 0 -500 h10g
#9  "GLOBE_G" "m" -R-180/-90/-50/0 -I0.5m P i 1 0 -500 i10g
#10 "GLOBE_G" "m" -R-90/0/-50/0    -I0.5m P i 1 0 -500 j10g
#11 "GLOBE_G" "m" -R0/90/-50/0     -I0.5m P i 1 0 -500 k10g
#12 "GLOBE_G" "m" -R90/180/-50/0   -I0.5m P i 1 0 -500 l10g
#13 "GLOBE_G" "m" -R-180/-90/-90/-50  -I0.5m P i 1 0 -500 m10g
#14 "GLOBE_G" "m" -R-90/0/-90/-50     -I0.5m P i 1 0 -500 n10g
#15 "GLOBE_G" "m" -R0/90/-90/-50      -I0.5m P i 1 0 -500 o10g
#16 "GLOBE_G" "m" -R90/180/-90/-50    -I0.5m P i 1 0 -500 p10g


#1 "GLOBE_G" "m" -R-180/-90/50/90 -I0.5m P i 1 0 -500 a10g
##a10g North America
echo "Making grid raster for Tile a10g"
grdraster 1 -R-180/-90/50/90 -Ga.grd
grdgradient a.grd -Ne.5 -A100 -M -Ga_i1.grd

#2 "GLOBE_G" "m" -R-90/0/50/90    -I0.5m P i 1 0 -500 b10g
#b10g England, Labrador
echo "Making grid raster for Tile b10g"
grdraster 2 -R-90/0/50/90 -Gb.grd
grdgradient b.grd -Ne.5 -A100 -M -Gb_i2.grd

#3 "GLOBE_G" "m" -R0/90/50/90     -I0.5m P i 1 0 -500 c10g
#c10g North Europe and Russia
echo "Making grid raster for Tile c10g"
grdraster 3 -R0/90/50/90 -Gc.grd
grdgradient c.grd -Ne.5 -A100 -M -Gc_i3.grd

#4 "GLOBE_G" "m" -R90/180/50/90   -I0.5m P i 1 0 -500 d10g
##d10g North Europe and Russia
echo "Making grid raster for Tile d10g"
grdraster 4 -R90/180/50/90 -Gd.grd
grdgradient d.grd -Ne.5 -A100 -M -Gd_i4.grd

#5 "GLOBE_G" "m" -R-180/-90/0/50  -I0.5m P i 1 0 -500 e10g
##e10g North Europe and Russia
echo "Making grid raster for Tile e10g"
grdraster 5 -R-180/-90/0/50 -Ge.grd
grdgradient e.grd -Ne.5 -A100 -M -Ge_i5.grd

#6 "GLOBE_G" "m" -R-90/0/0/50     -I0.5m P i 1 0 -500 f10g
#f10g  Africa North West
echo "Making grid raster for Tile f10g"
grdraster 6 -R-90/0/0/50 -Gf.grd
grdgradient f.grd -Ne.5 -A100 -M -Gf_i6.grd

#7 "GLOBE_G" "m" -R0/90/0/50      -I0.5m P i 1 0 -500 g10g
#g10g Mediterranean (Europe) Africa North
echo "Making grid raster for Tile g10g"
grdraster 7 -R0/90/0/50 -Gg.grd
grdgradient g.grd -Ne.5 -A100 -M -Gg_i7.grd

#8 "GLOBE_G" "m" -R90/180/0/50    -I0.5m P i 1 0 -500 h10g
##h10g North Europe and Russia
echo "Making grid raster for Tile h10g"
grdraster 8 -R90/180/0/50 -Gh.grd
grdgradient h.grd -Ne.5 -A100 -M -Gh_i8.grd


#9  "GLOBE_G" "m" -R-180/-90/-50/0 -I0.5m P i 1 0 -500 i10g
##i10g North Europe and Russia
echo "Making grid raster for Tile i10g"
grdraster 9 -R-180/-90/-50/0 -Gi.grd
grdgradient i.grd -Ne.5 -A100 -M -Gi_i9.grd

#10 "GLOBE_G" "m" -R-90/0/-50/0    -I0.5m P i 1 0 -500 j10g
##j10g North Europe and Russia
echo "Making grid raster for Tile j10g"
grdraster 10 -R-90/0/-50/0 -Gj.grd
grdgradient j.grd -Ne.5 -A100 -M -Gj_i10.grd

#11 "GLOBE_G" "m" -R0/90/-50/0     -I0.5m P i 1 0 -500 k10g
##k10g North Europe and Russia
echo "Making grid raster for Tile k10g"
grdraster 11 -R0/90/-50/0 -Gk.grd
grdgradient k.grd -Ne.5 -A100 -M -Gk_i11.grd

#12 "GLOBE_G" "m" -R90/180/-50/0   -I0.5m P i 1 0 -500 l10g
##l10g North Europe and Russia
echo "Making grid raster for Tile l10g"
grdraster 12 -R90/180/-50/0 -Gl.grd
grdgradient l.grd -Ne.5 -A100 -M -Gl_i12.grd

#13 "GLOBE_G" "m" -R-180/-90/-90/-50  -I0.5m P i 1 0 -500 m10g
##m10g North Europe and Russia
echo "Making grid raster for Tile m10g"
grdraster 13 -R-180/-90/-90/-50 -Gm.grd
grdgradient m.grd -Ne.5 -A100 -M -Gm_i13.grd

#14 "GLOBE_G" "m" -R-90/0/-90/-50     -I0.5m P i 1 0 -500 n10g
##n10g North Europe and Russia
echo "Making grid raster for Tile n10g"
grdraster 14 -R-90/0/-90/-50 -Gn.grd
grdgradient n.grd -Ne.5 -A100 -M -Gn_i14.grd



#15 "GLOBE_G" "m" -R0/90/-90/-50      -I0.5m P i 1 0 -500 o10g
##o10g North Europe and Russia
echo "Making grid raster for Tile o10g"
grdraster 15 -R0/90/-90/-50 -Go.grd
grdgradient o.grd -Ne.5 -A100 -M -Go_i15.grd

#16 "GLOBE_G" "m" -R90/180/-90/-50    -I0.5m P i 1 0 -500 p10g
##p10g North Europe and Russia
echo "Making grid raster for Tile p10g"
grdraster 16 -R90/180/-90/-50 -Gp.grd
grdgradient p.grd -Ne.5 -A100 -M -Gp_i16.grd

SilentVoice

Better formating for source code

[edit]

Captain Blood I added the wiki tags

<syntaxhighlight lang="bash"> .... </syntaxhighlight>

around your script to get a nicer formating. Hope you do not mind Best Regards SilentVoice

Question about "arctext" command used in http://de.wikipedia.org/wiki/Datei:Kanada_topo.jpg

[edit]

Hello Captain Blood,

Thank you for the excellent description about creating maps with GMT.

I am trying to understand how you did arctext in you example "Kanada".

arctext "Atlantischer Ozean" 2 14 0 23.5 12.5 180 1.2 20.0 >arcs.txt

On my Debian-Linux I do not have such a command. I installed the "R environment" which has an arctext command but I expect you did not use it. ( http://cran.r-project.org/web/packages/plotrix/plotrix.pdf )

Did you write your own wrapper script for acrtext which calculates values for pstext?

Regards, Michael — Preceding unsigned comment added by Captain Mi (talkcontribs) 08:38, 7 March 2011 (UTC)[reply]