[cig-commits] [commit] pluggable: calling convolution program after closing sac to avoid racing condition (94deefb)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Apr 9 08:56:10 PDT 2014


Repository : ssh://geoshell/specfem3d_globe

On branch  : pluggable
Link       : https://github.com/geodynamics/specfem3d_globe/compare/64e1b38f0c5ebb4056cce0b15d41c0b9f94ab6e5...099a4d330d5b173b21e51ad441f9f429e5d37842

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

commit 94deefbbab1378da3a7bf757160ea3ac16fab6f8
Author: Eh Tan <tan2 at earth.sinica.edu.tw>
Date:   Thu May 14 23:22:29 2009 +0000

    calling convolution program after closing sac to avoid racing condition


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

94deefbbab1378da3a7bf757160ea3ac16fab6f8
 UTILS/seis_process/process_syn.pl.in | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/UTILS/seis_process/process_syn.pl.in b/UTILS/seis_process/process_syn.pl.in
index fec0102..b8f77c8 100755
--- a/UTILS/seis_process/process_syn.pl.in
+++ b/UTILS/seis_process/process_syn.pl.in
@@ -125,12 +125,6 @@ foreach $file (@ARGV) {
     if ($opt_c) {open(SAC,"|$sac");}else {open(SAC,"|$sac > /dev/null");}
     print SAC "echo on\n r $outfile\n";}
 
-  if (not $opt_h eq "") { # convolve source time function
-    if ($opt_h > $min_hdur) {$hdur = $opt_h;}
-    system("@prefix@/bin/convolve_stf g $hdur $outfile");
-    system("mv ${outfile}.conv ${outfile}");}
-
-
   if ($opt_a) { # add station information
     print "Add station information\n";
     print SAC "ch kstnm $sta knetwk $net kcmpnm $comp\n ";
@@ -206,6 +200,12 @@ foreach $file (@ARGV) {
   print SAC "w over\nquit\n";
   close(SAC);
 
+  if (not $opt_h eq "") { # convolve source time function
+    if ($opt_h > $min_hdur) {$hdur = $opt_h;}
+    elsif(not $opt_m) {die("Error: HDUR <= $min_hdur, but no -m flag.\n");}
+    system("@prefix@/bin/convolve_stf g $hdur $outfile");
+    system("mv ${outfile}.conv ${outfile}");}
+
 }
 if ($sta_text) {
    print "\n\nNotice the following stations are not found in the station file\n   $sta_text\n\n";}



More information about the CIG-COMMITS mailing list