#!/bin/sh # # drft06rr_regionalmap - Create the regional overview map # # Make a plain map of DRFT06RR area, showing previous data, box outlines etc. # # Paul Wessel, 15-NOV-2001 DIR=drft06rr prefix=drft06rr if [ $# -eq 0 ] && [ -f $DIR/$prefix.map.jpg ]; then echo "drft06rr_regionalmap: Map already exists, use -f to force a new map" >&2 exit fi R=243/290/-30/-10 width=9.5 gmtset PLOT_DEGREE_FORMAT ddd:mm:ssF GRIDFILE_SHORTHAND true PAPER_MEDIA letter ANOT_FONT_SIZE +12p HEADER_OFFSET 0.2i #-------------------------------------------------- if [ ! -f data/$prefix.grd ]; then grdraster 5 -R$R -Gdata/$prefix.grd -V grdgradient data/$prefix.grd -Nt1.2 -A90 -Gdata/$prefix.int.grd -V fi # Need map height and where to center the color bar: height=`echo 243 -10 | mapproject -R$R -JM$width | cut -f2` x0=`gmtmath -Q $width 0.5 MUL =` makecpt -Crainbow -T-6000/0/500 -Z > $prefix.cpt psxy -R$R -JM$width -K /dev/null -Y1.1 -X0.75 > $prefix.map.ps if [ ! -f $prefix.smallimage.ps ]; then # We do this to save time grdimage -R -JM data/$prefix.grd -Idata/$prefix.int.grd -C$prefix.cpt -Ei -O -K -V > $prefix.smallimage.ps fi cat $prefix.smallimage.ps >> $prefix.map.ps pscoast -R -JM -B5g5f1 -G100 -O -K -W0.25p >> $prefix.map.ps psxy -R -JM $GMT_DATADIR/plate_boundaries_1996.d -M -O -K -W1p >> $prefix.map.ps echo "282.95 -12.10" > lima.d psxy -R -JM -O -K -Sc0.125 -G0/255/0 -W0.25p lima.d >> $prefix.map.ps grep -v '#' drft06rr_boxes.lis | awk '{ printf "> %s %s %s\n%s\t%s\n%s\t%s\n%s\t%s\n%s\t%s\n", $3, $4, $1, $2, $4, $3, $4, $3, $5, $2, $5}' > boxes.d psxy -R -JM boxes.d -M -W0.75p -O -K -L -A >> $prefix.map.ps psxy -R -JM 200nm_line.d -O -K -W1p/255/130/0 >> $prefix.map.ps psxy -R -JM -O -K -Sc0.075 -W0.25p -G255 -H Bonatti_rocks.d misc_rocks.d Hydros_rocks.d Clark_and_Dymond_rocks.d glor07mv_no_rocks.d glor07mv_rocks.d Oconnor_rocks.d >> $prefix.map.ps grep '^>' boxes.d | awk '{print $2, $3, 16, 0, 1, "RB", $4}' | pstext -R -JM -O -K -D-0.03/0.03 -G255 -S0.75p >> $prefix.map.ps psxy -R -JM -O -K -St0.1i -G100/255/255 -W0.25p Bonatti_dates.d -H >> $prefix.map.ps psxy Oconnor_dates.d -H -R -JM -O -K -St0.1i -G255/0/255 -W0.25p >> $prefix.map.ps psxy glor07mv_dates.d -H -R -JM -O -K -St0.1i -G255 -W0.25p >> $prefix.map.ps awk '{printf "%s %s 6 0 0 LM %s Ma\n", $1, $2, $3}' Bonatti_dates.d | pstext -H -R -JM -O -K -D0.2/0 >> $prefix.map.ps awk '{printf "%s %s 6 0 0 LM %s Ma\n", $1, $2, $3}' Oconnor_dates.d | pstext -H -R -JM -O -K -D0.2/0 >> $prefix.map.ps awk '{printf "%s %s 6 0 0 LM %s Ma\n", $1, $2, $3}' glor07mv_dates.d | pstext -H -R -JM -O -K -D0.2/0 >> $prefix.map.ps # Plot Easter and Salas y Gomez locations echo "109:22.50W 27:07.02S" | psxy -R -JM -O -K -Sa0.15 -G255/0/0 -W0.25p >> $prefix.map.ps echo "105:21.96W 26:28.44S" | psxy -R -JM -O -K -Sa0.15 -G255/255/0 -W0.25p >> $prefix.map.ps xi=`gmtmath -Q $width 0.75 SUB =` yi=`gmtmath -Q $height 0.9145 SUB =` psimage data/moai.ras -E2000 -C$xi/$yi -F1p -O -K >> $prefix.map.ps psscale -C$prefix.cpt -D$x0/-0.4/$width/0.1h -O -K -B/:m: >> $prefix.map.ps pslegend -R -JM -O -K -D243.25/-10.25/2.35/1.8/TL -F -G255 << EOF >> $prefix.map.ps G -0.05i H 16 5 MAP LEGEND D 0.25 1p S 0.1 t 0.125i 255/0/255 0.25p 0.3 Samples from O\`Conner S 0.1 t 0.125i 255/255/255 0.25p 0.3 Samples from Gloria07mv S 0.1 t 0.125i 100/255/255 0.25p 0.3 Samples from Bonatti S 0.1 c 0.1i 255/255/255 0.25p 0.3 Previous dredge locations S 0.1 a 0.125i 255/255/0 0.25p 0.3 Salas y Gomez Island S 0.1 a 0.125i 255/0/0 0.25p 0.3 Easter Island S 0.1 - 0.15i - 2p/255/100/0 0.3 Peru 200 nm boundary EOF psxy -R -JM -O /dev/null >> $prefix.map.ps #gv $prefix.map.ps & rm $prefix.cpt lima.d boxes.d convert -density 75x75 -page 1000x1000 -rotate 90 -crop 0x0 $prefix.map.ps $DIR/$prefix.map.jpg convert -density 600x600 -page 1000x1000 -rotate 90 -crop 0x0 $prefix.map.ps $DIR/$prefix.map.hires.jpg ps2pdf $prefix.map.ps $DIR/$prefix.map.pdf ps2eps $prefix.map.ps mv $prefix.map.eps $DIR rm -f $prefix.map.ps