[cig-commits] r18873 - in seismo/2D/SPECFEM2D/trunk: DATA EXAMPLES/noise_uniform src/specfem2D

rmodrak at geodynamics.org rmodrak at geodynamics.org
Mon Sep 5 18:24:59 PDT 2011


Author: rmodrak
Date: 2011-09-05 18:24:58 -0700 (Mon, 05 Sep 2011)
New Revision: 18873

Added:
   seismo/2D/SPECFEM2D/trunk/DATA/NOISE_TOMOGRAPHY/
Modified:
   seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_uniform/process.sh
   seismo/2D/SPECFEM2D/trunk/src/specfem2D/noise_tomography.f90
Log:
added directory DATA/NOISE_TOMOGRAPHY

Modified: seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_uniform/process.sh
===================================================================
--- seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_uniform/process.sh	2011-09-05 16:16:48 UTC (rev 18872)
+++ seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_uniform/process.sh	2011-09-06 01:24:58 UTC (rev 18873)
@@ -4,15 +4,17 @@
 
 # prepare directories
 rm -rf   DATA SEM NOISE_TOMOGRAPHY OUTPUT_FILES OUTPUT_ALL
-mkdir -p DATA SEM NOISE_TOMOGRAPHY OUTPUT_FILES OUTPUT_ALL
+mkdir -p DATA SEM NOISE_TOMOGRAPHY OUTPUT_FILES OUTPUT_ALL DATA/NOISE_TOMOGRAPHY OUTPUT_FILES/NOISE_TOMOGRAPHY
 
 
 # prepare files
 cp SOURCE_noise           DATA/SOURCE
 cp STATIONS_target_noise  DATA/STATIONS_target
-cp S_squared              NOISE_TOMOGRAPHY
 cp uniform.dat            DATA/
-echo 1 >                  NOISE_TOMOGRAPHY/irec_master
+echo 1 >                  DATA/NOISE_TOMOGRAPHY/irec_master
+if [ -f S_squared ]; then cp S_squared DATA/NOISE_TOMOGRAPHY/; fi
+
+# compile
 cd ../..
 make
 cd $RUN_DIR

Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/noise_tomography.f90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/noise_tomography.f90	2011-09-05 16:16:48 UTC (rev 18872)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/noise_tomography.f90	2011-09-06 01:24:58 UTC (rev 18873)
@@ -112,13 +112,13 @@
   integer :: i,ios
 
   !define master receiver
-  open(unit=509,file='OUTPUT_FILES/NOISE_TOMOGRAPHY/irec_master',status='old',action='read',iostat=ios)
+  open(unit=509,file='DATA/NOISE_TOMOGRAPHY/irec_master',status='old',action='read',iostat=ios)
   if (ios == 0) then
     read(509,*) irec_master
   else
     irec_master=1
     write(*,*) ''
-    write(*,*) 'Error opening OUTPUT_FILES/NOISE_TOMOGRAPHY/irec_master.'
+    write(*,*) 'Error opening DATA/NOISE_TOMOGRAPHY/irec_master.'
     write(*,*) 'Using irec_master=1. Continuing.'
     write(*,*) ''
   endif
@@ -219,8 +219,7 @@
 ! IN CASES SUCH AS THIS--WHERE THE USER REQUIRES A REALISTIC MODEL OF THE
 ! SEISMIC NOISE FIELD--THE VARIABE "time_function_type" SHOULD BE SET TO 0
 ! AND A TIME FUNCTION ENCODING THE DESIRED NOISE SPECTRUM SHOULD BE
-! ***SUPPLIED BY THE USER*** IN THE FILE
-! "OUTPUT_FILES/NOISE_TOMOGRAPHY/S_squared"
+! ***SUPPLIED BY THE USER*** IN THE FILE "DATA/NOISE_TOMOGRAPHY/S_squared"
 !
 ! The alternative--setting "time_function_type" to a value other than
 ! 0--results in an idealized time function that does represent a physically
@@ -236,7 +235,16 @@
   factor_noise = 1.d3
 
 
-  if( time_function_type == 1) then
+  if ( time_function_type == 0) then
+    !read in time function from file S_squared
+    open(unit=55,file='DATA/NOISE_TOMOGRAPHY/S_squared',status='old')
+    do it = 1,NSTEP
+      READ(55,*) time_function_noise(it)
+    enddo
+    close(55)
+
+
+  elseif( time_function_type == 1) then
     !Ricker (second derivative of a Gaussian) time function
     do it = 1,NSTEP
       t = it*deltat
@@ -271,15 +279,6 @@
     enddo
 
 
-  elseif( time_function_type == 0 ) then
-    !read in time function from file S_squared
-    open(unit=55,file='OUTPUT_FILES/NOISE_TOMOGRAPHY/S_squared',status='old')
-    do it = 1,NSTEP
-      READ(55,*) time_function_noise(it)
-    enddo
-    close(55)
-
-
   else
     call exit_MPI('unknown noise time function')
 



More information about the CIG-COMMITS mailing list