[cig-commits] r14996 - seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/UTILS/seis_process
tan2 at geodynamics.org
tan2 at geodynamics.org
Thu May 14 16:22:29 PDT 2009
Author: tan2
Date: 2009-05-14 16:22:29 -0700 (Thu, 14 May 2009)
New Revision: 14996
Modified:
seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/UTILS/seis_process/process_syn.pl.in
Log:
calling convolution program after closing sac to avoid racing condition
Modified: seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/UTILS/seis_process/process_syn.pl.in
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/UTILS/seis_process/process_syn.pl.in 2009-05-14 21:51:13 UTC (rev 14995)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/UTILS/seis_process/process_syn.pl.in 2009-05-14 23:22:29 UTC (rev 14996)
@@ -125,12 +125,6 @@
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 @@
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