[cig-commits] [commit] devel: updates scripts and reference solutions for new file name format **net**.**sta**... (3ad6405)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Jan 8 11:36:03 PST 2015


Repository : https://github.com/geodynamics/specfem3d

On branch  : devel
Link       : https://github.com/geodynamics/specfem3d/compare/bb56942e46ba174f771c76f345e4bd1352d9db4b...3ad640558f4b1a557ba5ff694dac9425571ba95c

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

commit 3ad640558f4b1a557ba5ff694dac9425571ba95c
Author: daniel peter <peterda at ethz.ch>
Date:   Thu Jan 8 09:51:55 2015 +0100

    updates scripts and reference solutions for new file name format **net**.**sta**...


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

3ad640558f4b1a557ba5ff694dac9425571ba95c
 .gitattributes                                         |  4 ++++
 .../SEM/{X20.DB.BXX.adj => DB.X20.BXX.adj}             |  0
 .../SEM/{X20.DB.BXY.adj => DB.X20.BXY.adj}             |  0
 .../SEM/{X20.DB.BXZ.adj => DB.X20.BXZ.adj}             |  0
 .../homogeneous_acoustic/create_adjoint_sources.sh     | 18 ++++++++++++------
 utils/seis_process/rotate.pl                           |  1 +
 6 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/.gitattributes b/.gitattributes
index afd089c..5d4acdc 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,2 +1,6 @@
 *.ai binary
 *.pdf binary
+*.semd binary
+*.sema binary
+*.adj binary
+*.ascii binary
diff --git a/EXAMPLES/homogeneous_acoustic/SEM/X20.DB.BXX.adj b/EXAMPLES/homogeneous_acoustic/SEM/DB.X20.BXX.adj
similarity index 100%
rename from EXAMPLES/homogeneous_acoustic/SEM/X20.DB.BXX.adj
rename to EXAMPLES/homogeneous_acoustic/SEM/DB.X20.BXX.adj
diff --git a/EXAMPLES/homogeneous_acoustic/SEM/X20.DB.BXY.adj b/EXAMPLES/homogeneous_acoustic/SEM/DB.X20.BXY.adj
similarity index 100%
rename from EXAMPLES/homogeneous_acoustic/SEM/X20.DB.BXY.adj
rename to EXAMPLES/homogeneous_acoustic/SEM/DB.X20.BXY.adj
diff --git a/EXAMPLES/homogeneous_acoustic/SEM/X20.DB.BXZ.adj b/EXAMPLES/homogeneous_acoustic/SEM/DB.X20.BXZ.adj
similarity index 100%
rename from EXAMPLES/homogeneous_acoustic/SEM/X20.DB.BXZ.adj
rename to EXAMPLES/homogeneous_acoustic/SEM/DB.X20.BXZ.adj
diff --git a/EXAMPLES/homogeneous_acoustic/create_adjoint_sources.sh b/EXAMPLES/homogeneous_acoustic/create_adjoint_sources.sh
index ba15323..38e0ce5 100755
--- a/EXAMPLES/homogeneous_acoustic/create_adjoint_sources.sh
+++ b/EXAMPLES/homogeneous_acoustic/create_adjoint_sources.sh
@@ -2,8 +2,14 @@
 
 mkdir -p SEM
 
-#cp OUTPUT_FILES/X20.DB.BX*.semd SEM/
-if [ ! -e SEM/X20.DB.BXX.semd ]; then echo "please copy traces X20.DB.BX*.semd to SEM/"; exit 1; fi
+# station
+station="X20"
+network="DB"
+
+sta=$network.$station
+
+#cp OUTPUT_FILES/$sta.BX*.semd SEM/
+if [ ! -e SEM/$sta.BXX.semd ]; then echo "please copy traces $sta.BX*.semd to SEM/"; exit 1; fi
 
 
 #cp ~/SPECFEM3D_svn/utils/adjoint_sources/traveltime/xcreate_adjsrc_traveltime SEM/
@@ -12,15 +18,15 @@ if [ ! -e SEM/xcreate_adjsrc_traveltime ]; then echo "please make xcreate_adjsrc
 # creates adjoint sources
 cd SEM/
 
-./xcreate_adjsrc_traveltime 9. 30. 3 X20.DB.BX*.semd
-if [ ! -e X20.DB.BXZ.semd.adj ]; then echo "error creating adjoint sources, please check..."; exit 1; fi
+./xcreate_adjsrc_traveltime 9. 30. 3 $sta.BX*.semd
+if [ ! -e $sta.BXZ.semd.adj ]; then echo "error creating adjoint sources, please check..."; exit 1; fi
 
 rename .semd.adj .adj *semd.adj
 
 # uses Z-component source for all 
 # (acoustic adjoint sources are read from component 1 -> BXX.adj)
-cp X20.DB.BXZ.adj X20.DB.BXX.adj
-cp X20.DB.BXZ.adj X20.DB.BXY.adj
+cp $sta.BXZ.adj $sta.BXX.adj
+cp $sta.BXZ.adj $sta.BXY.adj
 
 cd ../
 
diff --git a/utils/seis_process/rotate.pl b/utils/seis_process/rotate.pl
index ec2cb27..9e40682 100755
--- a/utils/seis_process/rotate.pl
+++ b/utils/seis_process/rotate.pl
@@ -33,6 +33,7 @@ if (!$opt_l) {$opt_l = 0;}
 #$saclst = "/opt/seismo-util/bin/saclst";
 #if (not -f $saclst) {die("No such file as $saclst\n");}
 $saclst = "saclst";
+if (system("which $saclst >/dev/null") != 0) {die(" No $saclst file\n");}
 
 $undef=-12345.0;
 $eps=0.1;



More information about the CIG-COMMITS mailing list