[cig-commits] r21220 - seismo/3D/ADJOINT_TOMO/iterate_adj/model_plot/gmt
carltape at geodynamics.org
carltape at geodynamics.org
Thu Jan 10 13:29:11 PST 2013
Author: carltape
Date: 2013-01-10 13:29:11 -0800 (Thu, 10 Jan 2013)
New Revision: 21220
Added:
seismo/3D/ADJOINT_TOMO/iterate_adj/model_plot/gmt/plot_horz_models.csh
Modified:
seismo/3D/ADJOINT_TOMO/iterate_adj/model_plot/gmt/plot_horz_models.pl
Log:
tested tomo xc plotting script
Added: seismo/3D/ADJOINT_TOMO/iterate_adj/model_plot/gmt/plot_horz_models.csh
===================================================================
--- seismo/3D/ADJOINT_TOMO/iterate_adj/model_plot/gmt/plot_horz_models.csh (rev 0)
+++ seismo/3D/ADJOINT_TOMO/iterate_adj/model_plot/gmt/plot_horz_models.csh 2013-01-10 21:29:11 UTC (rev 21220)
@@ -0,0 +1,59 @@
+gmtset PAPER_MEDIA letter MEASURE_UNIT inch BASEMAP_TYPE plain PLOT_DEGREE_FORMAT D TICK_LENGTH 6p LABEL_FONT_SIZE 10 ANOT_FONT_SIZE 10 HEADER_FONT 1 ANOT_FONT 1 LABEL_FONT 1 HEADER_FONT_SIZE 12 FRAME_PEN 1p TICK_PEN 1p
+makecpt -Cseis -T-1.010e-01/1.010e-01/3.108e-03 -D > color1a.cpt
+makecpt -Cseis -T3.167e+00/3.868e+00/1.079e-02 -D > color1b.cpt
+makecpt -Cseis -T-1.010e-01/1.010e-01/3.108e-03 -D > color2.cpt
+psbasemap -JM2.8 -R-121.2/-114.8/32.3/36.7 -Ba1f0.5d:." ":wesn -K -V -X1i -Y5i > horz_xc_vs_m16_m00_021_extra0.ps
+psbasemap -JM2.8 -R-121.2/-114.8/32.3/36.7 -Ba1f0.5d:." ":wesn -G220/220/220 -K -O -V >> horz_xc_vs_m16_m00_021_extra0.ps
+grep -v NaN INPUT/horz_02/horz_xc_vs_m16_m00_021_mask1.dat | awk '{print $1,$2,$3/1000}' | xyz2grd -Gtemp.grd -R-121.2/-114.8/32.3/36.7 -I2m
+grdimage temp.grd -Ccolor1b.cpt -JM2.8 -Q -K -O -V >> horz_xc_vs_m16_m00_021_extra0.ps
+psscale -Ccolor1b.cpt -D0.84/-0.2/1.68/0.15h -B2.00e-01f0.1:" ": -E10p -K -O -V >> horz_xc_vs_m16_m00_021_extra0.ps
+pstext -N -R0/1/0/1 -JM2.8 -K -O -V >>horz_xc_vs_m16_m00_021_extra0.ps<<EOF
+0.7 -0.19 10 0 1 LM (3.50 \261 10 \045)
+EOF
+pstext -N -R0/1/0/1 -JM2.8 -K -O -V >>horz_xc_vs_m16_m00_021_extra0.ps<<EOF
+0.7 -0.1 10 0 1 LM Vs km/s
+EOF
+pscoast -JM2.8 -R-121.2/-114.8/32.3/36.7 -Df -A0/0/4 -W0.75p -Na/0.75p -K -O -V >> horz_xc_vs_m16_m00_021_extra0.ps
+psxy /home/carltape/gmt/faults/jennings_more.xy -JM2.8 -R-121.2/-114.8/32.3/36.7 -m -W0.75p,0/0/0 -K -V -O >> horz_xc_vs_m16_m00_021_extra0.ps
+psbasemap -JM2.8 -R-121.2/-114.8/32.3/36.7 -Ba1f0.5d:." ":wesn -K -V -O >> horz_xc_vs_m16_m00_021_extra0.ps
+pstext -R0/1/0/1 -JM2.8 -N -C4p -W255/255/255o,1.0p,0/0/0,solid -G0/0/0 -K -O -V >>horz_xc_vs_m16_m00_021_extra0.ps<<EOF
+0 0.05 11 0 1 LB m00
+EOF
+pstext -N -R0/1/0/1 -JM2.8 -K -O -V >>horz_xc_vs_m16_m00_021_extra0.ps<<EOF
+-0.15 0.4 14 90 1 CM Depth = 10.0 km
+EOF
+psbasemap -JM2.8 -R-121.2/-114.8/32.3/36.7 -Ba1f0.5d:." ":WEsn -K -O -V -X3.3 >> horz_xc_vs_m16_m00_021_extra0.ps
+psbasemap -JM2.8 -R-121.2/-114.8/32.3/36.7 -Ba1f0.5d:." ":WEsn -G220/220/220 -K -O -V >> horz_xc_vs_m16_m00_021_extra0.ps
+grep -v NaN INPUT/horz_02/horz_xc_vs_m16_m00_021_mask1.dat | awk '{print $1,$2,$4/1000}' | xyz2grd -Gtemp.grd -R-121.2/-114.8/32.3/36.7 -I2m
+grdimage temp.grd -Ccolor1b.cpt -JM2.8 -Q -K -O -V >> horz_xc_vs_m16_m00_021_extra0.ps
+psscale -Ccolor1b.cpt -D0.84/-0.2/1.68/0.15h -B2.00e-01f0.1:" ": -E10p -K -O -V >> horz_xc_vs_m16_m00_021_extra0.ps
+pstext -N -R0/1/0/1 -JM2.8 -K -O -V >>horz_xc_vs_m16_m00_021_extra0.ps<<EOF
+0.7 -0.19 10 0 1 LM (3.50 \261 10 \045)
+EOF
+pstext -N -R0/1/0/1 -JM2.8 -K -O -V >>horz_xc_vs_m16_m00_021_extra0.ps<<EOF
+0.7 -0.1 10 0 1 LM Vs km/s
+EOF
+pscoast -JM2.8 -R-121.2/-114.8/32.3/36.7 -Df -A0/0/4 -W0.75p -Na/0.75p -K -O -V >> horz_xc_vs_m16_m00_021_extra0.ps
+psxy /home/carltape/gmt/faults/jennings_more.xy -JM2.8 -R-121.2/-114.8/32.3/36.7 -m -W0.75p,0/0/0 -K -V -O >> horz_xc_vs_m16_m00_021_extra0.ps
+psbasemap -JM2.8 -R-121.2/-114.8/32.3/36.7 -Ba1f0.5d:." ":WEsn -K -V -O >> horz_xc_vs_m16_m00_021_extra0.ps
+pstext -R0/1/0/1 -JM2.8 -N -C4p -W255/255/255o,1.0p,0/0/0,solid -G0/0/0 -K -O -V >>horz_xc_vs_m16_m00_021_extra0.ps<<EOF
+0 0.05 11 0 1 LB m16
+EOF
+psbasemap -JM2.8 -R-121.2/-114.8/32.3/36.7 -Ba1f0.5d:." ":wesn -K -O -V -X3.3 >> horz_xc_vs_m16_m00_021_extra0.ps
+psbasemap -JM2.8 -R-121.2/-114.8/32.3/36.7 -Ba1f0.5d:." ":wesn -G220/220/220 -K -O -V >> horz_xc_vs_m16_m00_021_extra0.ps
+awk '{print $1,$2,$5}' INPUT/horz_02/horz_xc_vs_m16_m00_021_mask1.dat | xyz2grd -Gtemp.grd -R-121.2/-114.8/32.3/36.7 -I2m
+grdimage temp.grd -Ccolor2.cpt -JM2.8 -K -O -V -Q >> horz_xc_vs_m16_m00_021_extra0.ps
+psscale -Ccolor2.cpt -D0.84/-0.2/1.68/0.15h -Ba1.00e-01f0.05:" ": -E10p -K -O -V >> horz_xc_vs_m16_m00_021_extra0.ps
+pstext -N -R0/1/0/1 -JM2.8 -K -O -V >>horz_xc_vs_m16_m00_021_extra0.ps<<EOF
+0.7 -0.1 10 0 1 LM ln(m16 / m00)
+EOF
+pscoast -JM2.8 -R-121.2/-114.8/32.3/36.7 -Df -A0/0/4 -W0.75p -Na/0.75p -K -O -V >> horz_xc_vs_m16_m00_021_extra0.ps
+psxy /home/carltape/gmt/faults/jennings_more.xy -JM2.8 -R-121.2/-114.8/32.3/36.7 -m -W0.75p,0/0/0 -K -V -O >> horz_xc_vs_m16_m00_021_extra0.ps
+psbasemap -JM2.8 -R-121.2/-114.8/32.3/36.7 -Ba1f0.5d:." ":wesn -K -V -O >> horz_xc_vs_m16_m00_021_extra0.ps
+pstext -R0/1/0/1 -JM2.8 -N -C4p -W255/255/255o,1.0p,0/0/0,solid -G0/0/0 -K -O -V >>horz_xc_vs_m16_m00_021_extra0.ps<<EOF
+0 0.05 11 0 1 LB ln(m16/m00)
+EOF
+pstext -N -R0/1/0/1 -JM2.8 -O -V >>horz_xc_vs_m16_m00_021_extra0.ps<<EOF
+ 0.5 0.98 16 0 1 CM
+EOF
+ps2pdf horz_xc_vs_m16_m00_021_extra0.ps
Modified: seismo/3D/ADJOINT_TOMO/iterate_adj/model_plot/gmt/plot_horz_models.pl
===================================================================
--- seismo/3D/ADJOINT_TOMO/iterate_adj/model_plot/gmt/plot_horz_models.pl 2013-01-10 21:14:26 UTC (rev 21219)
+++ seismo/3D/ADJOINT_TOMO/iterate_adj/model_plot/gmt/plot_horz_models.pl 2013-01-10 21:29:11 UTC (rev 21220)
@@ -4,7 +4,7 @@
#
# plot_horz_models.pl
# Carl Tape
-# 07-Dec-2008 (last used 13-June-2011)
+# 07-Dec-2008 (last checked 10-Jan-2013 with GMT 4.5.3)
#
# This script reads in a horizontal cross-section data file with five columns:
# lon, lat, model-1, model-2, ln(model-2 / model-1)
@@ -16,7 +16,7 @@
#
# FIGURES:
# plot_horz_models.pl 5/5 m00/m16 1 1/0/1/0.2 # Vs
-# plot_horz_models.pl 21/21 m00/m16 1 0/0/1/0.2 # Vs
+# plot_horz_models.pl 21/21 m00/m16 1 0/0/1/0.2 # Vs TEST
# plot_horz_models.pl 41/41 m00/m16 1 0/0/1/0.2 # Vs
# plot_horz_models.pl 5/5 m00/m16 0 1/0/1/0.3 # Vb
# plot_horz_models.pl 21/21 m00/m16 0 0/0/1/0.3 # Vb
@@ -316,7 +316,8 @@
#print CSH "psscale -C${cptfile1a} $Dscale $Bscale1a -K -O -V >> $psfile\n";
print CSH "psscale -C${cptfile1b} $Dscale2 $Bscale1b -K -O -V >> $psfile\n";
#$slab1 = sprintf("ln(%s / %.2f)",$mtit,$cnorm/1000);
- $slab1 = sprintf("(%.2f \261 %.0f \045)",$cnorm/1000,$cpert1*100);
+ $slab1 = sprintf("(%.2f \\261 %.0f \\045)",$cnorm/1000,$cpert1*100);
+
$slab2 = "$mtit km/s";
print CSH "pstext -N $R_title $J_title -K -O -V >>$psfile<<EOF\n$xtx3 $ytx3 $fsize2 0 $fontno LM $slab1\nEOF\n";
print CSH "pstext -N $R_title $J_title -K -O -V >>$psfile<<EOF\n$xtx4 $ytx4 $fsize2 0 $fontno LM $slab2\nEOF\n";
@@ -331,7 +332,7 @@
#print CSH "psscale -C${cptfile1a} $Dscale $Bscale1a -K -O -V >> $psfile\n";
print CSH "psscale -C${cptfile1b} $Dscale2 $Bscale1b -K -O -V >> $psfile\n";
#$slab1 = sprintf("ln(%s / %.2f)",$mtit,$cnorm/1000);
- $slab1 = sprintf("(%.2f \261 %.0f \045)",$cnorm/1000,$cpert1*100);
+ $slab1 = sprintf("(%.2f \\261 %.0f \\045)",$cnorm/1000,$cpert1*100);
$slab2 = "$mtit km/s";
print CSH "pstext -N $R_title $J_title -K -O -V >>$psfile<<EOF\n$xtx3 $ytx3 $fsize2 0 $fontno LM $slab1\nEOF\n";
print CSH "pstext -N $R_title $J_title -K -O -V >>$psfile<<EOF\n$xtx4 $ytx4 $fsize2 0 $fontno LM $slab2\nEOF\n";
@@ -466,7 +467,7 @@
print CSH "awk '{print \$1,\$2,\$4/1000}' $dfile | xyz2grd -G$grdfile $R $interp\n";
print CSH "grdimage $grdfile -C$cptfile1b $J -Q -K -O -V >> $psfile\n";
print CSH "psscale -C${cptfile1b} $Dscale2 $Bscale1b -K -O -V >> $psfile\n";
- $slab1 = sprintf("(%.2f \261 %.0f \045)",$cnorm/1000,$cpert1*100);
+ $slab1 = sprintf("(%.2f \\261 %.0f \\045)",$cnorm/1000,$cpert1*100);
$slab2 = "$mtit km/s";
print CSH "pstext -N $R_title $J_title -K -O -V >>$psfile<<EOF\n$xtx3 $ytx3 $fsize2 0 $fontno LM $slab1\nEOF\n";
print CSH "pstext -N $R_title $J_title -K -O -V >>$psfile<<EOF\n$xtx4 $ytx4 $fsize2 0 $fontno LM $slab2\nEOF\n";
More information about the CIG-COMMITS
mailing list