[cig-commits] [commit] QA: Fix several warnings in Perl script. (0ee5c6b)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Mon Jan 20 11:49:46 PST 2014


Repository : ssh://geoshell/specfem2d

On branch  : QA
Link       : https://github.com/geodynamics/specfem2d/compare/28743f19b9f9fdb75d359c135053825c0ffd05b3...5e8aa55e68fd17b6f475fb65531b84195e497aa1

>---------------------------------------------------------------

commit 0ee5c6b21d1ba1fea3cfe60a2ecf39eb3d304569
Author: Elliott Sales de Andrade <esalesde at physics.utoronto.ca>
Date:   Tue Jan 7 17:29:31 2014 -0500

    Fix several warnings in Perl script.
    
    I wonder if we should just remove this commented code, though.


>---------------------------------------------------------------

0ee5c6b21d1ba1fea3cfe60a2ecf39eb3d304569
 UTILS/visualization/plot_wavefield.pl | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/UTILS/visualization/plot_wavefield.pl b/UTILS/visualization/plot_wavefield.pl
index efd9570..7265cb9 100755
--- a/UTILS/visualization/plot_wavefield.pl
+++ b/UTILS/visualization/plot_wavefield.pl
@@ -139,7 +139,6 @@ $dY     = "-Y$dY0";
 $fsize0 = "18";
 $fsize1 = "10";
 $fsize2 = "10";
-$fsize3 = "4";
 $fontno = "1";
 $tick   = "0.1c";
 $cgray = 200;
@@ -159,13 +158,13 @@ if($irecsurf == 1) {$rdy = 6; $tdy = 15;}
 
 # -N or not
 $rec = "-W1p $rfill -Si10p -D${rdx}p/${rdy}p";
-$rec2 = "-W1p,0/255/255 $rfill -Si10p -D${rdx}p/${rdy}p";
+#$rec2 = "-W1p,0/255/255 $rfill -Si10p -D${rdx}p/${rdy}p";
 $textrec = "-D${tdx}p/${tdy}p -W255 -C1p -N";
 
 # source and receivers
 $srcfile = "$idir1/SOURCE";
 $recfile = "$idir1/STATIONS";
-$recfile2 = "$idir1/STATIONS_target";
+#$recfile2 = "$idir1/STATIONS_target";
 if (not -e $srcfile) {die("check if sfile $srcfile exist or not\n");}
 if (not -e $recfile) {die("check if rfile $recfile exist or not\n");}
 $srcx = `grep "xs                              =" $srcfile | awk '{print \$3}'`; chomp($srcx);
@@ -192,7 +191,7 @@ print "\n projection is $J \n";
 $scale_color = 21.0;
 $colorbar = "seis";
 @norm = ("1e$pwr[0]","1e$pwr[1]","1e$pwr[2]");
-$fac = 5;      # KEY: enhance the interaction field (increase for more contrast)
+#$fac = 5;      # KEY: enhance the interaction field (increase for more contrast)
 print "@norm \n";
 
 $numw = @cmax;
@@ -241,9 +240,9 @@ if ($itype != 0) {
 
 # color bars
 # NOTE: there seems to be a max LENGTH of the label string for the color bars
-$BscaleSx = sprintf("-B%2.2e:\"%s (x, z, t), 10\@+%2.2i\@+  m\":",$bs[0],$titles[0],$pwr[0]);
-$BscaleSy = sprintf("-B%2.2e:\"%s (x, z, t), 10\@+%2.2i\@+  m\":",$bs[1],$titles[1],$pwr[1]);
-$BscaleSz = sprintf("-B%2.2e:\"%s (x, z, t), 10\@+%2.2i\@+ m\":",$bs[2],$titles[2],$pwr[2]);
+#$BscaleSx = sprintf("-B%2.2e:\"%s (x, z, t), 10\@+%2.2i\@+  m\":",$bs[0],$titles[0],$pwr[0]);
+#$BscaleSy = sprintf("-B%2.2e:\"%s (x, z, t), 10\@+%2.2i\@+  m\":",$bs[1],$titles[1],$pwr[1]);
+#$BscaleSz = sprintf("-B%2.2e:\"%s (x, z, t), 10\@+%2.2i\@+ m\":",$bs[2],$titles[2],$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
@@ -388,7 +387,7 @@ for ($i = $imin; $i <= $imax; $i++) {
 
     # label the figures
    if (0==1) {
-     if ($i==imin) {
+     if ($i==$imin) {
        print CSH "pstext $J $R -K -O -V >>$psfile<<EOF\n -2 -0.5 14 0 $fontno CM rock\nEOF\n";
        print CSH "pstext $J $R -K -O -V >>$psfile<<EOF\n -1 0.75 14 0 $fontno CM ice\nEOF\n";
        print CSH "pstext $J $R -K -O -V >>$psfile<<EOF\n 1.0 0.75 14 0 $fontno CM water\nEOF\n";



More information about the CIG-COMMITS mailing list