#!/bin/sh # # drft06rr_summarymap - Create the final regional overview map # showing all the data collected as well as existing data # # Paul Wessel, 11-DEC-2001 DIR=drft06rr prefix=drft06rr if [ $# -eq 0 ] && [ -f $DIR/$prefix.summary.jpg ]; then echo "drft06rr_summarymap: 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 grep '^Dredge' waypoints.txt | grep '\-' | egrep -v ':' | tr '-' ' ' | awk '{printf "%s:%sW\t%s:%sS\t%s\t%s\n", $6, $7, $4, $5, $2, $3}' > dredges.d psxy -R$R -JM$width -K /dev/null -Y1.1 -X0.75 > $prefix.summary.ps if [ ! -f $prefix.summimage.ps ]; then # We do this to save time grdimage -R -JM data/$prefix.grd -Idata/$prefix.int.grd -Ei -C$prefix.cpt -O -K -V > $prefix.summimage.ps fi cat $prefix.summimage.ps >> $prefix.summary.ps pscoast -R -JM -B5g5f1 -G100 -O -K -W0.25p >> $prefix.summary.ps psxy -R -JM $GMT_DATADIR/plate_boundaries_1996.d -M -O -K -W1p >> $prefix.summary.ps echo "282.95 -12.10" > lima.d psxy -R -JM -O -K -Sa0.15 -G0/255/0 -W0.25p lima.d >> $prefix.summary.ps psxy -R -JM 200nm_line.d -O -K -W1p/255/130/0 >> $prefix.summary.ps psxy -R -JM -O -K -W0.5p waypts.d >> $prefix.summary.ps psxy -R -JM -O -K -W0/255 waypts.d >> $prefix.summary.ps psxy -R -JM -O -K -Sc0.03i -G0 waypts.d >> $prefix.summary.ps psxy -R -JM -O -K -Ss0.075 -W0.25p -G150 -H Bonatti_rocks.d >> $prefix.summary.ps psxy -R -JM -O -K -Ss0.075 -W0.25p -G255/255/50 -H misc_rocks.d >> $prefix.summary.ps psxy -R -JM -O -K -Ss0.075 -W0.25p -G200/50/200 -H Hydros_rocks.d >> $prefix.summary.ps psxy -R -JM -O -K -Ss0.075 -W0.25p -G0/0/150 -H Clark_and_Dymond_rocks.d >> $prefix.summary.ps psxy -R -JM -O -K -Ss0.075 -W0.25p -G255 -H glor07mv_no_rocks.d >> $prefix.summary.ps psxy -R -JM -O -K -Ss0.075 -W0.25p -G0/200/200 -H glor07mv_rocks.d >> $prefix.summary.ps psxy -R -JM -O -K -Ss0.075 -W0.25p -G0/200/0 -H Oconnor_rocks.d >> $prefix.summary.ps psxy Bonatti_dates.d -H -R -JM -O -K -St0.1i -G100/255/255 -W0.25p >> $prefix.summary.ps psxy Oconnor_dates.d -H -R -JM -O -K -St0.1i -G255/0/255 -W0.25p >> $prefix.summary.ps psxy glor07mv_dates.d -H -R -JM -O -K -St0.1i -G255 -W0.25p >> $prefix.summary.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.1/0 >> $prefix.summary.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.1/0 >> $prefix.summary.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.1/0 >> $prefix.summary.ps awk '{if ($NF != "D") print $1, $2}' dredges.d | psxy -R -JM -O -K -G220/180/0 -Sc0.085 -W0.25p >> $prefix.summary.ps awk '{if ($NF == "D") print $1, $2}' dredges.d | psxy -R -JM -O -K -G255/0/0 -Sc0.085 -W0.25p >> $prefix.summary.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.summary.ps echo "105:21.96W 26:28.44S" | psxy -R -JM -O -K -Sa0.15 -G255/255/0 -W0.25p >> $prefix.summary.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.summary.ps psscale -C$prefix.cpt -D$x0/-0.4/$width/0.1h -O -K -B/:m: >> $prefix.summary.ps gmtset ANOT_FONT_SIZE 9 pslegend -R -JM -O -K -D243.25/-10.25/4/1.925/TL -F -G255 << EOF >> $prefix.summary.ps G -0.05i H 13 5 DRIFT EXPEDITION LEG 6 MAP LEGEND D 0.25 0.5p N 2 S 0.1 c 0.05i 0/0/0 0.25p 0.25 Waypoints S 0.1 t 0.12i 255/0/255 0.25p 0.25 Dates from O\`Conner S 0.1 c 0.1i 255/0/0 0.25p 0.25 Datable dredge locations S 0.1 t 0.12i 255/255/255 0.25p 0.25 Dates from Gloria07mv S 0.1 c 0.1i 220/180/0 0.25p 0.25 Other dredge locations S 0.1 t 0.12i 100/255/255 0.25p 0.25 Dates from Bonatti D 1 0.25tap S 0.1 S 0.10i 0/0/150 0.25p 0.25 Clark and Dymond samples S 0.1 S 0.10i 150/150/150 0.25p 0.25 Bonatti samples S 0.1 S 0.10i 255/255/255 0.25p 0.25 Gloria07mv no-rock samples S 0.1 S 0.10i 0/200/200 0.25p 0.25 Gloria07mv rock samples S 0.1 S 0.10i 0/200/0 0.25p 0.25 OConner samples S 0.1 S 0.10i 200/50/200 0.25p 0.25 Hydros samples S 0.1 S 0.10i 255/255/50 0.25p 0.25 Misc samples D 1 0.25tap S 0.1 a 0.125i 255/255/0 0.25p 0.25 Salas y Gomez Island S 0.1 a 0.125i 255/0/0 0.25p 0.25 Easter Island S 0.1 a 0.125i 0/255/0 0.25p 0.25 Callao, Peru S 0.1 - 0.125i - 2p/255/100/0 0.25 Peru 200 nm boundary EOF psxy -R -JM -O /dev/null >> $prefix.summary.ps gv $prefix.summary.ps & rm $prefix.cpt lima.d convert -density 75x75 -page 1000x1000 -rotate 90 -crop 0x0 $prefix.summary.ps $DIR/$prefix.summary.jpg convert -density 600x600 -page 1000x1000 -rotate 90 -crop 0x0 $prefix.summary.ps $DIR/$prefix.summary.hires.jpg ps2pdf $prefix.summary.ps $DIR/$prefix.summary.pdf ps2eps $prefix.summary.ps mv $prefix.summary.eps $DIR rm -f $prefix.summary.ps