[cig-commits] r14493 - seismo/3D/ADJOINT_TOMO/iterate_adj/SEM2D_iterate/PLOTTING

carltape at geodynamics.org carltape at geodynamics.org
Fri Mar 27 13:32:32 PDT 2009


Author: carltape
Date: 2009-03-27 13:32:32 -0700 (Fri, 27 Mar 2009)
New Revision: 14493

Modified:
   seismo/3D/ADJOINT_TOMO/iterate_adj/SEM2D_iterate/PLOTTING/plot_surf_16frames.pl
Log:
Modified grdimage command in plot_surf_16frames.pl


Modified: seismo/3D/ADJOINT_TOMO/iterate_adj/SEM2D_iterate/PLOTTING/plot_surf_16frames.pl
===================================================================
--- seismo/3D/ADJOINT_TOMO/iterate_adj/SEM2D_iterate/PLOTTING/plot_surf_16frames.pl	2009-03-27 20:25:52 UTC (rev 14492)
+++ seismo/3D/ADJOINT_TOMO/iterate_adj/SEM2D_iterate/PLOTTING/plot_surf_16frames.pl	2009-03-27 20:32:32 UTC (rev 14493)
@@ -19,33 +19,28 @@
 #    [002] single src-rec (banana-doughnut)
 #    [003] 132 recs (rayleigh)
 #
-#    scripts/plot_surf_16frames.pl OUTPUT 0 5 0/4000/400 400/1200/2000/2400 3/8/7 1.0/2.5/0.5 0.06 0 1 1
-#    scripts/plot_surf_16frames.pl OUTPUT 1 1 0/4000/400 400/1200/2000/2800 3/8/7 1.0/2.5/0.5 0.06 0 1 1
-#    scripts/plot_surf_16frames.pl OUTPUT 2 1 0/4000/400 400/1200/2000/2800 3/9/9 1.0/3.0/4.0 0.06 0 5 1
-#    scripts/plot_surf_16frames.pl OUTPUT 3 5 0/4000/400 400/1200/2000/2800 3/8/7 1.0/2.5/0.5 0.06 0 1 1
+#  EXECUTE FROM /PLOTTING/FIGURES:
+#    ../plot_surf_16frames.pl /net/denali/scratch1/carltape/OUTPUT 0 5 0/4000/400 400/1200/2000/2400 3/8/7 1.0/2.5/0.5 0.06 0 1 1
+#    ../plot_surf_16frames.pl /net/denali/scratch1/carltape/OUTPUT 1 1 0/4000/400 400/1200/2000/2800 3/8/7 1.0/2.5/0.5 0.06 0 1 1
+#    ../plot_surf_16frames.pl /net/denali/scratch1/carltape/OUTPUT 2 1 0/4000/400 400/1200/2000/2800 3/9/9 1.0/3.0/4.0 0.06 0 5 1
+#    ../plot_surf_16frames.pl /net/denali/scratch1/carltape/OUTPUT 3 5 0/4000/400 400/1200/2000/2800 3/8/7 1.0/2.5/0.5 0.06 0 1 1
 #-------------------------
 #
 #  01-Feb-2006
-#    scripts/plot_surf_16frames.pl OUTPUT/run_0012/event_001 0/4000/400 800/1600/2400/3200 3/8/7 1.0/10/1    0.06 0 1 2
-#    scripts/plot_surf_16frames.pl OUTPUT/run_1000/event_005 0/4000/400 800/1600/2400/3200 3/9/8 1.0/05/1    0.06 0 1 2
+#    ../plot_surf_16frames.pl OUTPUT/run_0012/event_001 0/4000/400 800/1600/2400/3200 3/8/7 1.0/10/1    0.06 0 1 2
+#    ../plot_surf_16frames.pl OUTPUT/run_1000/event_005 0/4000/400 800/1600/2400/3200 3/9/8 1.0/05/1    0.06 0 1 2
 #
-#    scripts/plot_surf_16frames.pl OUTPUT/run_3100/event_005 0/4000/400 800/1200/1600/2000 3/9/8 1.0/05/1    0.06 0 1 2
-#    scripts/plot_surf_16frames.pl OUTPUT/run_3101/event_005 0/4000/400 800/1200/1600/2000 3/5/5 1.0/01/1    0.06 0 3 2
+#    ../plot_surf_16frames.pl OUTPUT/run_3100/event_005 0/4000/400 800/1200/1600/2000 3/9/8 1.0/05/1    0.06 0 1 2
+#    ../plot_surf_16frames.pl OUTPUT/run_3101/event_005 0/4000/400 800/1200/1600/2000 3/5/5 1.0/01/1    0.06 0 3 2
 #
 #   AGU 2006
-#    scripts/plot_surf_16frames.pl OUTPUT 4700 1 0/4000/400 400/1200/2000/2400 3/8/8 1.0/2/5 0.06 0 1 0
-#    scripts/plot_surf_16frames.pl OUTPUT 4750 1 0/4000/400 400/1200/2000/2400 3/8/8 1.0/2/5 0.06 0 1 0
+#    ../plot_surf_16frames.pl OUTPUT 4700 1 0/4000/400 400/1200/2000/2400 3/8/8 1.0/2/5 0.06 0 1 0
+#    ../plot_surf_16frames.pl OUTPUT 4750 1 0/4000/400 400/1200/2000/2400 3/8/8 1.0/2/5 0.06 0 1 0
 #
 #-------------------------
 #  04-Jan-2008
-#    scripts/plot_surf_16frames.pl OUTPUT_2 6000 5 0/4000/400 400/1200/2000/2400 3/8/8 1.0/2/5 0.06 0 1 2
+#    ../plot_surf_16frames.pl OUTPUT_2 6000 5 0/4000/400 400/1200/2000/2400 3/8/8 1.0/2/5 0.06 0 1 2
 #
-#=============================================================
-#
-#  WARNING: there is some plotting problem with pscontour
-#  The x-y points must have "enough" digits for it to work.
-#  This was adjusted in the output files from wave2d_solver.f90.
-#
 #==========================================================
 
 if (@ARGV < 9) {die("Usage: plot_surf_16frames.pl basedir f-first/f-last/f-inc f1/f2/f3 pwr1/pwr2/pwr3 c1/c2/c3 DT bool_finite_source IKER \n");}
@@ -78,8 +73,10 @@
 
 $comp = 1;  # y-component only (surface waves)
 
-# resolution of color plots
-$interp = "-I0.5m/0.5m -S4m";   # key information
+# KEY: resolution of color plots
+#$interp = "-I0.5m/0.5m -S4m";
+$interp = "-I1m/1m -S4m";   # key information
+$interp = "-I2m/2m -S4m";   # key information
 $grdfile = "temp.grd";
 
 # plotting specifications
@@ -100,7 +97,7 @@
 
 $cshfile = "plot_surf_16frames.csh";
 open(CSH,">$cshfile");
-print CSH "gmtset BASEMAP_TYPE plain PLOT_DEGREE_FORMAT D TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2  HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 CHAR_ENCODING Standard+\n";
+print CSH "gmtset BASEMAP_TYPE plain PAPER_MEDIA letter PLOT_DEGREE_FORMAT D TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2  HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 CHAR_ENCODING Standard+\n";
 
 
 # KEY: scaling for color
@@ -118,9 +115,12 @@
 
 # NOTE the syn (or data) and abr (alpha-beta-rho; or cbr or kmr) suffixes.
 @wavefield = ("forward_syn","adjoint","kernel_abr");
+ at wavefield = ("forward","adjoint","kernel");      # GJI figures
 @titles    = ("Regular  Wavefield","Adjoint  Wavefield","Interaction  Field",$col4);
 $numw = @wavefield;
 
+#$numw = 2;
+
 for ($k = 0; $k < $numw; $k ++ ){
   $ss = 0;
   for ($j = $first; $j <= $end; $j = $j + $nint) {
@@ -195,14 +195,14 @@
 
 # color bars
 # NOTE: there seems to be a max LENGTH of the label string for the color bars
-#$BscaleS1 = sprintf("-B%2.2e:\" s ( $pt, t )  ( 10\@+-%2.2i\@+  m )\":",$bs[0],$pwr[0]);  # $k = 0
-#$BscaleS2 = sprintf("-B%2.2e:\" s\@+\262\@+ ( $pt, t )  ( 10\@+-%2.2i\@+  kg\@+-1\@+ s  [\@~\143\@~] )\":",$bs[1],$pwr[1]);   # $k = 1
-#$BscaleI  = sprintf("-B%2.2e:\" K\@~\242\@~ ( $pt, t )  ( 10\@+-%2.2i\@+ m\@+-2\@+ s\@+-1\@+ [\@~\143\@~] )\":",$bs2,$pwr[2]);
-#$BscaleK  = sprintf("-B%2.2e:\" K ( $pt, t )  ( 10\@+-%2.2i\@+  m\@+-2\@+ [\@~\143\@~] )\":",$bs,$pwr[2]);
-$BscaleS1 = sprintf("-B%2.2e:\" s ( $pt, t )  ( 10\@+-%i\@+  m )\":",$bs[0],$pwr[0]);  # $k = 0
-$BscaleS2 = sprintf("-B%2.2e:\" s\@+\262\@+ ( $pt, t )  ( 10\@+-%i\@+ )\":",$bs[1],$pwr[1]);   # $k = 1
-$BscaleI  = sprintf("-B%2.2e:\" K\302 ( $pt, t )  ( 10\@+-%i\@+ )\":",$bs2,$pwr[2]);
-$BscaleK  = sprintf("-B%2.2e:\" K ( $pt, t )  ( 10\@+-%i\@+ )\":",$bs,$pwr[2]);
+$BscaleS1 = sprintf("-B%2.2e:\"s ($pt, t), 10\@+-%2.2i\@+  m\":",$bs[0],$pwr[0]);  # $k = 0
+$BscaleS2 = sprintf("-B%2.2e:\"s\@+\262\@+ ($pt, t), 10\@+-%2.2i\@+ kg\@+-1\@+ s  [F]\":",$bs[1],$pwr[1]);   # $k = 1
+$BscaleI  = sprintf("-B%2.2e:\"K\302 ($pt, t), 10\@+-%2.2i\@+ m\@+-2\@+ s\@+-1\@+ [F]\":",$bs2,$pwr[2]);
+$BscaleK  = sprintf("-B%2.2e:\"K ($pt, t), 10\@+-%2.2i\@+  m\@+-2\@+ [F]\":",$bs,$pwr[2]);
+#$BscaleS1 = sprintf("-B%2.2e:\" s ( $pt, t )  ( 10\@+-%i\@+  m )\":",$bs[0],$pwr[0]);  # $k = 0
+#$BscaleS2 = sprintf("-B%2.2e:\" s\@+\262\@+ ( $pt, t )  ( 10\@+-%i\@+ )\":",$bs[1],$pwr[1]);   # $k = 1
+#$BscaleI  = sprintf("-B%2.2e:\" K\302 ( $pt, t )  ( 10\@+-%i\@+ )\":",$bs2,$pwr[2]);
+#$BscaleK  = sprintf("-B%2.2e:\" K ( $pt, t )  ( 10\@+-%i\@+ )\":",$bs,$pwr[2]);
 
 #$Bscale = sprintf("-B%2.2e",$bs[$k]);
 
@@ -261,7 +261,6 @@
 
    # PLOT THE FORWARD WAVEFIELD
    if($icolor==1) {
-      #print CSH "awk '{print \$1,\$2,\$($comp+2) / $norm[$k]}' $snapshot_f | pscontour $J $R $B -A- -Ccolor_${k}.cpt -I -K -O -P -V >> $psfile\n";
       print CSH "awk '{print \$1,\$2,\$($comp+2) / $norm[$k]}' $snapshot_f | nearneighbor -G$grdfile $R $interp\n";
       print CSH "grdimage $grdfile -Ccolor_${k}.cpt $J -K -O -P -V -Q >> $psfile\n";
    }
@@ -296,7 +295,6 @@
    # PLOT THE ADJOINT WAVEFIELD
    print CSH "psbasemap $J $R $B -K -O -P -V $dX >> $psfile\n";
    if($icolor==1) {
-      #print CSH "awk '{print \$1,\$2,\$($comp+2) / $norm[$k]}' $snapshot_a | pscontour $J $R $B -A- -Ccolor_${k}.cpt -I -K -O -P -V >> $psfile\n";
       print CSH "awk '{print \$1,\$2,\$($comp+2) / $norm[$k]}' $snapshot_a | nearneighbor -G$grdfile $R $interp\n";
       print CSH "grdimage $grdfile -Ccolor_${k}.cpt $J -K -O -P -V -Q >> $psfile\n";
    }
@@ -316,8 +314,8 @@
    # PLOT THE INTERACTION FIELD
    print CSH "psbasemap $J $R $B -K -O -P -V $dX >> $psfile\n";
    if($icolor==1) {
-      #print CSH "awk '{print \$1,\$2,\$3 / $norm[$k]}' $snapshot_k | pscontour $J $R $B -A- -Ccolor_I.cpt -I -K -O -P -V >> $psfile\n";
-      print CSH "awk '{print \$1,\$2,\$7 / $norm[$k]}' $snapshot_k | nearneighbor -G$grdfile $R $interp\n";
+      print CSH "awk '{print \$1,\$2,\$3 / $norm[$k]}' $snapshot_k | nearneighbor -G$grdfile $R $interp\n";
+      #print CSH "awk '{print \$1,\$2,\$7 / $norm[$k]}' $snapshot_k | nearneighbor -G$grdfile $R $interp\n";   # GJI figures
       print CSH "grdimage $grdfile -Ccolor_I.cpt $J -K -O -P -V -Q >> $psfile\n";
    }
    print CSH "pscoast $J $R $B -W1p -Na/1p -Dh -K -O -P -V >> $psfile\n";
@@ -350,8 +348,8 @@
 
 #-------------------------
 print CSH "pstext $J -R0/1/0/1 -O -P -V >>$psfile<<EOF\n 10 10 $fsize0 0 $fontno CM junk \nEOF\n";  # FINISH
-print CSH "convert $psfile $jpgfile\n";
+#print CSH "convert $psfile $jpgfile\n";
 
 close (CSH);
 system("csh -f $cshfile");
-system("xv $jpgfile &");
+system("ghostview $psfile &");



More information about the CIG-COMMITS mailing list