#! /bin/csh -f #--------------------------------------------------- # Map of event locations and focal mechanisms # cmt_plot_new.gmt (copied from cmt_plot.gmt on 09-Nov-2005) # # # EXAMPLES: # cmt_plot_new.gmt cmt_jdf_M5p5.save -135 -115 35 55 Harvard_CMT_M5p5 -Sm0.2 # cmt_plot_new.gmt cmt_jdf_M5p5.save -135 -115 35 55 Harvard_CMT_M5p5_DC -Sd0.2 # #--------------------------------------------------- if ($#argv != 7) then echo "Usage: cmt_plot.gmt file_name minlon maxlon minlat maxlat title mag_scale" echo "title must be one word or multiple words connected by underscores" echo " " exit endif #set src = "opt/gmt3/bin/" set datafile = "{$1}" set psfile = "{$6}.ps" set jpgfile = "{$6}.jpg" set bounds = "-R{$2}/{$3}/{$4}/{$5}" set proj = "-Jm0.30" set cinfo = "-W0.5p -Df -I1 -N1 -A400" set cmt_type = "{$7} -L0.5p/0/0/0 -G150" set origin = "-Y2 -X2 " set plates = "/home/datalib/Plate_Boundaries/nuvel1_boundaries" # datafile generated using the [GMT psmeca input] option on the Harvard catalogue # extract the columns you want #awk '{print $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $1+1, $2+1}' $datafile >! temp awk '{print $1, $2, $3, $4, $5, $6, $7, $8, $9, $10}' $datafile >! temp # plot coastline set misc = "-V -K -P" pscoast $proj $bounds $cinfo $misc -Ba4dWESN:."$6": $origin >! $psfile # plot plate boundaries set misc = "-V -K -O -P" psxy $plates $proj $bounds -M -W1.5p/255/0/0q $misc >> $psfile # plot events as dots #awk '{print $1,$2}' temp | psxy -Sc5p -W1.0p -G200 $proj $bounds $misc >> $psfile # CMT solution (deviatoric) : -Sm # double-couple only : -Sd set misc = "-V -O -P" #psmeca temp $proj $bounds$cmt_type -C1p -CP2p $misc >> $psfile psmeca temp $proj $bounds $cmt_type $misc >> $psfile rm -f temp xv $psfile & echo "Plotting ..."