[cig-commits] r13305 - in seismo/3D/ADJOINT_TOMO/flexwin: latex latex/figures/socal scripts user_files/socal_3D

carltape at geodynamics.org carltape at geodynamics.org
Thu Nov 13 23:51:42 PST 2008


Author: carltape
Date: 2008-11-13 23:51:42 -0800 (Thu, 13 Nov 2008)
New Revision: 13305

Added:
   seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T002_T030_m00
   seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T002_T030_m12
   seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T002_T030_m13
   seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T003_T030_m12
   seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T003_T030_m13
   seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T030_m12
   seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T030_m13
   seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T040_m00_orig
   seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/user_functions_m12.f90
   seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/user_functions_m13.f90
Removed:
   seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T040_m00
Modified:
   seismo/3D/ADJOINT_TOMO/flexwin/latex/figures/socal/9818433_CLC_window.eps
   seismo/3D/ADJOINT_TOMO/flexwin/latex/figures/socal/9818433_CLC_window.pdf
   seismo/3D/ADJOINT_TOMO/flexwin/latex/figures/socal/9818433_FMP_window.eps
   seismo/3D/ADJOINT_TOMO/flexwin/latex/figures/socal/9818433_FMP_window.pdf
   seismo/3D/ADJOINT_TOMO/flexwin/latex/figures/socal/9983429_T06_rs.eps
   seismo/3D/ADJOINT_TOMO/flexwin/latex/figures/socal/9983429_T06_rs.pdf
   seismo/3D/ADJOINT_TOMO/flexwin/latex/figures_paper.tex
   seismo/3D/ADJOINT_TOMO/flexwin/latex/flexwin_paper.pdf
   seismo/3D/ADJOINT_TOMO/flexwin/scripts/pick_all_windows.pl
   seismo/3D/ADJOINT_TOMO/flexwin/scripts/pick_all_windows_local.pl
   seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T030_m00
   seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T030_m11
   seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/user_functions_m00.f90
   seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/user_functions_m11.f90
Log:
Figure updates for FLEXWIN paper.  Also updated socal user files.


Modified: seismo/3D/ADJOINT_TOMO/flexwin/latex/figures/socal/9818433_CLC_window.eps
===================================================================
(Binary files differ)

Modified: seismo/3D/ADJOINT_TOMO/flexwin/latex/figures/socal/9818433_CLC_window.pdf
===================================================================
(Binary files differ)

Modified: seismo/3D/ADJOINT_TOMO/flexwin/latex/figures/socal/9818433_FMP_window.eps
===================================================================
(Binary files differ)

Modified: seismo/3D/ADJOINT_TOMO/flexwin/latex/figures/socal/9818433_FMP_window.pdf
===================================================================
(Binary files differ)

Modified: seismo/3D/ADJOINT_TOMO/flexwin/latex/figures/socal/9983429_T06_rs.eps
===================================================================
(Binary files differ)

Modified: seismo/3D/ADJOINT_TOMO/flexwin/latex/figures/socal/9983429_T06_rs.pdf
===================================================================
(Binary files differ)

Modified: seismo/3D/ADJOINT_TOMO/flexwin/latex/figures_paper.tex
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/latex/figures_paper.tex	2008-11-14 05:34:12 UTC (rev 13304)
+++ seismo/3D/ADJOINT_TOMO/flexwin/latex/figures_paper.tex	2008-11-14 07:51:42 UTC (rev 13305)
@@ -274,10 +274,10 @@
 %\center
 \includegraphics[width=5.7in]{figures/japan/KIS_BO_091502B}
 \caption{\label{fg:KIS_BO_091502B}
-Window selection results for event 091502B from Table~\ref{tb:events} recorded at station KIS ($33.87$\degN, $135.89$\degE, $\Delta=11.79$\deg).
-(a)~Event and station map: event 091502B is indicated by the beach ball with the
-CMT focal mechanism, station KIS is marked by the red triangle and all the other stations
-which recorded this event are marked by grey triangles.
+Window selection results for event 091502B from Table~\ref{tb:events} recorded at station KIS ($\Delta=11.79$\deg).
+%(a)~Event and station map: event 091502B is indicated by the beach ball with the CMT focal mechanism, station KIS is marked by the red triangle and all the other stations which recorded this event are marked by grey triangles.
+(a)~Map showing all stations with at least one measurement window for the period range \trange{24}{120} for this event.  ({\bf MIN: IS THIS CORRECT?})
+Red triangle denotes station KIS.
 (b)~Results for station KIS for the period range \trange{24}{120}.
 Vertical (Z), radial (R), and transverse (T) records of data (black, left column) and synthetics (red, left column), as well as the STA/LTA records (right column) used to produce the window picks.
 (c)~Results for station KIS for the period range \trange{6}{30}.
@@ -289,10 +289,10 @@
 %\center
 \includegraphics[width=5.7in]{figures/japan/SHR_BO_200511211536A}
 \caption{\label{fg:SHR_BO_200511211536A}
-Window selection results for event 20051121536A from Table~\ref{tb:events} recorded at station SHR ($44.06$\degN, $144.99$\degE, $\Delta=17.47$\deg).
-(a)~Event and station map: event 20051121536A is indicated by the beach ball with the
-CMT focal mechanism, station SHR is marked by the red triangle and all the other stations
-which recorded this event are marked by grey triangles.
+Window selection results for event 20051121536A from Table~\ref{tb:events} recorded at station SHR ($\Delta=17.47$\deg).
+%(a)~Event and station map: event 20051121536A is indicated by the beach ball with the CMT focal mechanism, station SHR is marked by the red triangle and all the other stations which recorded this event are marked by grey triangles.
+(a)~Map showing all stations with at least one measurement window for the period range \trange{24}{120} for this event.  ({\bf MIN: IS THIS CORRECT?})
+Red triangle denotes station SHR.
 (b)~Results for station SHR for the period range \trange{24}{120}.
 Vertical (Z), radial (R), and transverse (T) records of data (black, left column) and synthetics (red, left column), as well as the STA/LTA records (right column) used to produce the window picks.
 (c)~Results for station SHR for the period range \trange{6}{30}.
@@ -370,18 +370,20 @@
 %\center
 \includegraphics[width=6in]{figures/socal/9818433_CLC_window.pdf}
 \caption{\label{fg:socal_CLC} 
-Window selection results for event 9818433 from Table~\ref{tb:events} recorded at station CLC.
-(a)~Source and station information for event 9818433 and station CLC.
-(b)~Paths to each station with at least one measurement window for the period range \trange{6}{40}.
-There are a total of 341 windows picked within 310 records.
-Triangle denotes station CLC.
-(c)~Paths to each station with at least one measurement window for the period range \trange{2}{40}.
-There are a total of 190 windows picked within 193 records.
-Triangle denotes station CLC.
-(d)~Results for station CLC for the period range \trange{6}{40}.
+Window selection results for event 9818433 from Table~\ref{tb:events} recorded at station CLC ($\Delta = 211.7$~km).
+%(a)~Source and station information for event 9818433 and station CLC.
+%(b)~Paths to each station with at least one measurement window for the period range \trange{6}{40}.
+%There are a total of 341 windows picked within 310 records.
+%Triangle denotes station CLC.
+%(c)~Paths to each station with at least one measurement window for the period range \trange{2}{40}.
+%There are a total of 190 windows picked within 193 records.
+%Triangle denotes station CLC.
+(a)~Map showing all stations with at least one measurement window for the period range \trange{6}{40} for this event.
+Red triangle denotes station CLC.
+(b)~Results for station CLC for the period range \trange{6}{40}.
 Vertical (Z), radial (R), and transverse (T) records of data (black, left column) and synthetics (red, left column), as well as the STA:LTA records (right column) used to produce the window picks.
-(e)~Results for station CLC for the period range \trange{2}{40}.
-Note that corresponding lower-passed filtered versions are shown in (d).
+(c)~Results for station CLC for the period range \trange{2}{40}.
+Note that corresponding lower-passed filtered versions are shown in (b).
 }
 \end{figure}
 
@@ -390,7 +392,7 @@
 %\center
 \includegraphics[width=6in]{figures/socal/9818433_FMP_window.pdf}
 \caption{\label{fg:socal_FMP} 
-Window selection results for event 9818433 from Table~\ref{tb:events} recorded at station FMP.
+Window selection results for event 9818433 from Table~\ref{tb:events} recorded at station FMP ($\Delta = 52.2$~km).
 Same caption as Figure~\ref{fg:socal_CLC}, only for a different station.
 }
 \end{figure}

Modified: seismo/3D/ADJOINT_TOMO/flexwin/latex/flexwin_paper.pdf
===================================================================
(Binary files differ)

Modified: seismo/3D/ADJOINT_TOMO/flexwin/scripts/pick_all_windows.pl
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/scripts/pick_all_windows.pl	2008-11-14 05:34:12 UTC (rev 13304)
+++ seismo/3D/ADJOINT_TOMO/flexwin/scripts/pick_all_windows.pl	2008-11-14 07:51:42 UTC (rev 13305)
@@ -4,7 +4,7 @@
 #
 #  pick_all_windows.pl
 #  Carl Tape
-#  09-June-2008
+#  09-Oct-2008
 #
 #  The script reads in a set of data directories, each labeled as an event ID,
 #  and it copies the data and synthetics into the windowing code, runs the code,
@@ -38,12 +38,12 @@
 #     prepare_meas_all.pl
 #
 #  EXAMPLES:
-#    pick_all_windows.pl m11 0 6/30   1/204 1/1/1/0 1 0     # make plots and WINDOWS file, T = 6-40s
-#    pick_all_windows.pl m11 0 3/30   1/204 1/1/1/1 1 0     # 
-#    pick_all_windows.pl m11 0 2/30   1/204 1/1/1/1 1 0     # make plots and WINDOWS file, T = 2-40s
+#    pick_all_windows.pl m13 0 6/30   1/204 1/1/1/0 1 0     # make plots and WINDOWS file, T = 6-30s
+#    pick_all_windows.pl m13 0 3/30   1/204 1/1/1/1 1 0     # make plots and WINDOWS file, T = 3-30s
+#    pick_all_windows.pl m13 0 2/30   1/204 1/1/1/1 1 0     # make plots and WINDOWS file, T = 2-30s
 #
-#    pick_all_windows.pl m00 0 6/30 179/179 1/1/0/0 1 0     # make plots only, T = 6-40s
-#    pick_all_windows.pl m00 0 6/30 179/179 0/0/1/0 1 0     # make WINDOWS file, T = 6-40s
+#    pick_all_windows.pl m00 0 6/30 179/179 1/1/0/0 1 0     # make plots only, T = 6-30s
+#    pick_all_windows.pl m00 0 6/30 179/179 0/0/1/0 1 0     # make WINDOWS file, T = 6-30s
 #
 #==========================================================
 
@@ -306,12 +306,12 @@
     print CSH "echo Event ID is $eid -- $kk out of $nevent\n";
 
     $eout = "${eid}_${Ttag}_${smodel}";	                # output file tag
-    $measdir = "$rundir/$eid/$smodel/WINDOW_${Ttag}";   # main run directory
+    $savedir = "$rundir/$eid/$smodel/WINDOW_${Ttag}";   # main run directory
 
     # If the windowing code has already been run, then move to the next event.
     # NOTE: to overwrite, just comment out this option
-    if (-f "$measdir/${eout}_runfile") {
-      print "--> $measdir/${eout}_runfile exists -- on to next event\n";
+    if (-f "$savedir/${eout}_runfile") {
+      print "--> $savedir/${eout}_runfile exists -- on to next event\n";
 
     } else {
       print "--> do this event\n";
@@ -346,13 +346,13 @@
 
       # copy prepared data and synthetic files into a directory for measurement code
       if ($imeas == 1) {
-	#$measdir = "$rundir/$eid/$smodel/WINDOW_${Ttag}";
-	print CSH "echo copying prepared DATA and SYN to ${measdir}...\n";
+	#$savedir = "$rundir/$eid/$smodel/WINDOW_${Ttag}";
+	print CSH "echo copying prepared DATA and SYN to ${savedir}...\n";
 	print CSH "mkdir -p $rundir/$eid\n";
 	print CSH "mkdir -p $rundir/$eid/$smodel/\n";
-	print CSH "mkdir -p $measdir\n";
-	print CSH "\\rm -rf $measdir/SYN ; cp -r ${dir_win_run_syn} $measdir\n";
-	print CSH "\\rm -rf $measdir/DATA ; cp -r ${dir_win_run_data} $measdir\n";
+	print CSH "mkdir -p $savedir\n";
+	print CSH "\\rm -rf $savedir/SYN ; cp -r ${dir_win_run_syn} $savedir\n";
+	print CSH "\\rm -rf $savedir/DATA ; cp -r ${dir_win_run_data} $savedir\n";
       }
  
       # copy input file into output directory
@@ -410,12 +410,13 @@
 	# copy window file to another location
 	print CSH "\\cp ${dir_win_run_meas}/${ofile} ${odir}/${ofile}\n";
 
-	# leave copy in MEASURE directory (generic name called my mt_measure_adj.f90)
+	# leave copy in MEASURE directory (use the generic name called by mt_measure_adj.f90)
 	print CSH "\\cp ${dir_win_run_meas}/${ofile} ${dir_win_run_meas}/MEASUREMENT_WINDOWS\n";
 
 	# copy all window output files, including figures, into RUN directory
-	print CSH "\\cp ${odir}/*${eout}* $measdir\n";
-	print CSH "\\cp ${par_file} ${userfun_file} ${dir_prepare}/${pseis} $measdir\n";
+	print CSH "\\cp ${odir}/*${eout}* $savedir\n";
+	print CSH "\\cp ${savedir}/${ofile} ${savedir}/${ofile}_orig\n";    # extra copy
+	print CSH "\\cp ${par_file} ${userfun_file} ${dir_prepare}/${pseis} $savedir\n";
       }
 
     }

Modified: seismo/3D/ADJOINT_TOMO/flexwin/scripts/pick_all_windows_local.pl
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/scripts/pick_all_windows_local.pl	2008-11-14 05:34:12 UTC (rev 13304)
+++ seismo/3D/ADJOINT_TOMO/flexwin/scripts/pick_all_windows_local.pl	2008-11-14 07:51:42 UTC (rev 13305)
@@ -26,12 +26,13 @@
 #  EXAMPLES:
 #     /net/denali/scratch1/carltape/svn/cig/seismo/3D/ADJOINT_TOMO/flexwin_work/scripts/pick_all_windows_local.pl
 #
-#     pick_all_windows_local.pl 2/40 1/1/1/1 input MEASURE
-#     pick_all_windows_local.pl 6/40 1/1/1/0 input MEASURE
+#     pick_all_windows_local.pl 2/30 1/1/1/1 input MEASURE
+#     pick_all_windows_local.pl 6/30 1/1/1/0 input MEASURE
 #
-#     pick_all_windows_local.pl 6/40 1/1/1/0 input_test MEASURE_TEST    # plots AND window file
-#     pick_all_windows_local.pl 6/40 0/0/1/0 input_test MEASURE_TEST    # window file only
-#     pick_all_windows_local.pl 6/40 1/1/0/0 input_test MEASURE_TEST   # plots only
+#     pick_all_windows_local.pl 6/30 1/1/1/0 input_test MEASURE_TEST    # plots AND window file
+#     pick_all_windows_local.pl 6/30 0/0/1/0 input_test MEASURE_TEST    # window file only
+#     pick_all_windows_local.pl 6/30 1/1/0/0 input_test MEASURE_TEST    # plots only
+#     pick_all_windows_local.pl 2/30 1/1/0/1 input_test MEASURE_TEST    # plots only
 #
 #==========================================================
 

Added: seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T002_T030_m00
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T002_T030_m00	                        (rev 0)
+++ seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T002_T030_m00	2008-11-14 07:51:42 UTC (rev 13305)
@@ -0,0 +1,71 @@
+# -------------------------------------------------------------
+#
+#    This is the parameter file for FLEXWIN.  It is based on the
+#    same syntax as the Par_file for SPECFEM.  Variable names are
+#    put first, values are placed after the 34th column.
+#
+#    Comment lines and blank lines are significant.  If you
+#    change the layout of this file or add/remove parameters
+#    you must also modify the user_variables module and the 
+#    read_parameter_file subroutine at the start of seismo_subs.f90.
+#    
+# -------------------------------------------------------------
+ 
+# -------------------------------------------------------------
+# boolean parameters
+DEBUG                           = .true.
+MAKE_SEISMO_PLOTS               = .true.
+MAKE_WINDOW_FILES               = .true.
+BODY_WAVE_ONLY                  = .true.
+
+# -------------------------------------------------------------
+# period min/max for filtering
+RUN_BANDPASS                    = .false.
+WIN_MIN_PERIOD                  = 2.00
+WIN_MAX_PERIOD                  = 30.00
+
+# -------------------------------------------------------------
+# E(t) water level
+STALTA_BASE                     = 0.07
+
+# -------------------------------------------------------------
+# maximum allowable time shift from reference TSHIFT
+TSHIFT_BASE                     = 3.0
+TSHIFT_REFERENCE                = 1.0
+
+# -------------------------------------------------------------
+# maximum allowable amplitude measurement relative to reference DLNA
+DLNA_BASE                       = 1.0
+DLNA_REFERENCE                  = 0.0
+
+# -------------------------------------------------------------
+# limit on CC for window acceptance
+CC_BASE                         = 0.85
+
+# -------------------------------------------------------------
+# boolean switch for check_data_quality
+DATA_QUALITY                    = .true.
+
+# if DATA_QUALITY = .true. and if two different measurements of
+# signal-to-noise ratios exceeds these two base levels,
+# then the data time series (and syn) is kept
+SNR_INTEGRATE_BASE              = 2.5  
+SNR_MAX_BASE                    = 3.5
+
+# -------------------------------------------------------------
+# limit on signal to noise ratio in a particular window.
+WINDOW_SNR_BASE                 = 4.0
+
+# -------------------------------------------------------------
+# Fine tuning constants 
+C_0  (internal minima)          = 1.0
+C_1  (small windows)            = 5.0
+C_2  (prominence)               = 0.0
+C_3a (separation height)        = 4.0 
+C_3b (separation time)          = 2.5 
+C_4a (curtail on left)          = 2.0 
+C_4b (curtail on right)         = 6.0 
+
+WEIGHT_SPACE_COVERAGE           = 1.0
+WEIGHT_AVERAGE_CC               = 1.0
+WEIGHT_N_WINDOWS                = 1.0

Added: seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T002_T030_m12
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T002_T030_m12	                        (rev 0)
+++ seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T002_T030_m12	2008-11-14 07:51:42 UTC (rev 13305)
@@ -0,0 +1,71 @@
+# -------------------------------------------------------------
+#
+#    This is the parameter file for FLEXWIN.  It is based on the
+#    same syntax as the Par_file for SPECFEM.  Variable names are
+#    put first, values are placed after the 34th column.
+#
+#    Comment lines and blank lines are significant.  If you
+#    change the layout of this file or add/remove parameters
+#    you must also modify the user_variables module and the 
+#    read_parameter_file subroutine at the start of seismo_subs.f90.
+#    
+# -------------------------------------------------------------
+ 
+# -------------------------------------------------------------
+# boolean parameters
+DEBUG                           = .true.
+MAKE_SEISMO_PLOTS               = .true.
+MAKE_WINDOW_FILES               = .true.
+BODY_WAVE_ONLY                  = .true.
+
+# -------------------------------------------------------------
+# period min/max for filtering
+RUN_BANDPASS                    = .false.
+WIN_MIN_PERIOD                  = 2.00
+WIN_MAX_PERIOD                  = 30.00
+
+# -------------------------------------------------------------
+# E(t) water level
+STALTA_BASE                     = 0.07
+
+# -------------------------------------------------------------
+# maximum allowable time shift from reference TSHIFT
+TSHIFT_BASE                     = 2.0
+TSHIFT_REFERENCE                = 0.0
+
+# -------------------------------------------------------------
+# maximum allowable amplitude measurement relative to reference DLNA
+DLNA_BASE                       = 1.0
+DLNA_REFERENCE                  = 0.0
+
+# -------------------------------------------------------------
+# limit on CC for window acceptance
+CC_BASE                         = 0.85
+
+# -------------------------------------------------------------
+# boolean switch for check_data_quality
+DATA_QUALITY                    = .true.
+
+# if DATA_QUALITY = .true. and if two different measurements of
+# signal-to-noise ratios exceeds these two base levels,
+# then the data time series (and syn) is kept
+SNR_INTEGRATE_BASE              = 2.5  
+SNR_MAX_BASE                    = 3.5
+
+# -------------------------------------------------------------
+# limit on signal to noise ratio in a particular window.
+WINDOW_SNR_BASE                 = 4.0
+
+# -------------------------------------------------------------
+# Fine tuning constants 
+C_0  (internal minima)          = 1.0
+C_1  (small windows)            = 5.0
+C_2  (prominence)               = 0.0
+C_3a (separation height)        = 4.0 
+C_3b (separation time)          = 2.5 
+C_4a (curtail on left)          = 2.0 
+C_4b (curtail on right)         = 6.0 
+
+WEIGHT_SPACE_COVERAGE           = 1.0
+WEIGHT_AVERAGE_CC               = 0.0
+WEIGHT_N_WINDOWS                = 5.0

Added: seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T002_T030_m13
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T002_T030_m13	                        (rev 0)
+++ seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T002_T030_m13	2008-11-14 07:51:42 UTC (rev 13305)
@@ -0,0 +1,71 @@
+# -------------------------------------------------------------
+#
+#    This is the parameter file for FLEXWIN.  It is based on the
+#    same syntax as the Par_file for SPECFEM.  Variable names are
+#    put first, values are placed after the 34th column.
+#
+#    Comment lines and blank lines are significant.  If you
+#    change the layout of this file or add/remove parameters
+#    you must also modify the user_variables module and the 
+#    read_parameter_file subroutine at the start of seismo_subs.f90.
+#    
+# -------------------------------------------------------------
+ 
+# -------------------------------------------------------------
+# boolean parameters
+DEBUG                           = .true.
+MAKE_SEISMO_PLOTS               = .true.
+MAKE_WINDOW_FILES               = .true.
+BODY_WAVE_ONLY                  = .true.
+
+# -------------------------------------------------------------
+# period min/max for filtering
+RUN_BANDPASS                    = .false.
+WIN_MIN_PERIOD                  = 2.00
+WIN_MAX_PERIOD                  = 30.00
+
+# -------------------------------------------------------------
+# E(t) water level
+STALTA_BASE                     = 0.07
+
+# -------------------------------------------------------------
+# maximum allowable time shift from reference TSHIFT
+TSHIFT_BASE                     = 2.0
+TSHIFT_REFERENCE                = 0.0
+
+# -------------------------------------------------------------
+# maximum allowable amplitude measurement relative to reference DLNA
+DLNA_BASE                       = 1.0
+DLNA_REFERENCE                  = 0.0
+
+# -------------------------------------------------------------
+# limit on CC for window acceptance
+CC_BASE                         = 0.85
+
+# -------------------------------------------------------------
+# boolean switch for check_data_quality
+DATA_QUALITY                    = .true.
+
+# if DATA_QUALITY = .true. and if two different measurements of
+# signal-to-noise ratios exceeds these two base levels,
+# then the data time series (and syn) is kept
+SNR_INTEGRATE_BASE              = 2.5  
+SNR_MAX_BASE                    = 3.5
+
+# -------------------------------------------------------------
+# limit on signal to noise ratio in a particular window.
+WINDOW_SNR_BASE                 = 4.0
+
+# -------------------------------------------------------------
+# Fine tuning constants 
+C_0  (internal minima)          = 1.0
+C_1  (small windows)            = 5.0
+C_2  (prominence)               = 0.0
+C_3a (separation height)        = 4.0 
+C_3b (separation time)          = 2.5 
+C_4a (curtail on left)          = 2.0 
+C_4b (curtail on right)         = 6.0 
+
+WEIGHT_SPACE_COVERAGE           = 1.0
+WEIGHT_AVERAGE_CC               = 1.0
+WEIGHT_N_WINDOWS                = 1.0

Added: seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T003_T030_m12
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T003_T030_m12	                        (rev 0)
+++ seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T003_T030_m12	2008-11-14 07:51:42 UTC (rev 13305)
@@ -0,0 +1,71 @@
+# -------------------------------------------------------------
+#
+#    This is the parameter file for FLEXWIN.  It is based on the
+#    same syntax as the Par_file for SPECFEM.  Variable names are
+#    put first, values are placed after the 34th column.
+#
+#    Comment lines and blank lines are significant.  If you
+#    change the layout of this file or add/remove parameters
+#    you must also modify the user_variables module and the 
+#    read_parameter_file subroutine at the start of seismo_subs.f90.
+#    
+# -------------------------------------------------------------
+ 
+# -------------------------------------------------------------
+# boolean parameters
+DEBUG                           = .true.
+MAKE_SEISMO_PLOTS               = .true.
+MAKE_WINDOW_FILES               = .true.
+BODY_WAVE_ONLY                  = .true.
+
+# -------------------------------------------------------------
+# period min/max for filtering
+RUN_BANDPASS                    = .false.
+WIN_MIN_PERIOD                  = 3.00
+WIN_MAX_PERIOD                  = 30.00
+
+# -------------------------------------------------------------
+# E(t) water level
+STALTA_BASE                     = 0.11
+
+# -------------------------------------------------------------
+# maximum allowable time shift from reference TSHIFT
+TSHIFT_BASE                     = 3.0
+TSHIFT_REFERENCE                = 0.0
+
+# -------------------------------------------------------------
+# maximum allowable amplitude measurement relative to reference DLNA
+DLNA_BASE                       = 1.0
+DLNA_REFERENCE                  = 0.0
+
+# -------------------------------------------------------------
+# limit on CC for window acceptance
+CC_BASE                         = 0.80
+
+# -------------------------------------------------------------
+# boolean switch for check_data_quality
+DATA_QUALITY                    = .true.
+
+# if DATA_QUALITY = .true. and if two different measurements of
+# signal-to-noise ratios exceeds these two base levels,
+# then the data time series (and syn) is kept
+SNR_INTEGRATE_BASE              = 2.5  
+SNR_MAX_BASE                    = 3.5
+
+# -------------------------------------------------------------
+# limit on signal to noise ratio in a particular window.
+WINDOW_SNR_BASE                 = 4.0
+
+# -------------------------------------------------------------
+# Fine tuning constants 
+C_0  (internal minima)          = 1.3
+C_1  (small windows)            = 4.0
+C_2  (prominence)               = 0.0
+C_3a (separation height)        = 4.0 
+C_3b (separation time)          = 2.5 
+C_4a (curtail on left)          = 2.0 
+C_4b (curtail on right)         = 6.0 
+
+WEIGHT_SPACE_COVERAGE           = 0.70
+WEIGHT_AVERAGE_CC               = 0.25
+WEIGHT_N_WINDOWS                = 0.05

Added: seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T003_T030_m13
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T003_T030_m13	                        (rev 0)
+++ seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T003_T030_m13	2008-11-14 07:51:42 UTC (rev 13305)
@@ -0,0 +1,71 @@
+# -------------------------------------------------------------
+#
+#    This is the parameter file for FLEXWIN.  It is based on the
+#    same syntax as the Par_file for SPECFEM.  Variable names are
+#    put first, values are placed after the 34th column.
+#
+#    Comment lines and blank lines are significant.  If you
+#    change the layout of this file or add/remove parameters
+#    you must also modify the user_variables module and the 
+#    read_parameter_file subroutine at the start of seismo_subs.f90.
+#    
+# -------------------------------------------------------------
+ 
+# -------------------------------------------------------------
+# boolean parameters
+DEBUG                           = .true.
+MAKE_SEISMO_PLOTS               = .true.
+MAKE_WINDOW_FILES               = .true.
+BODY_WAVE_ONLY                  = .true.
+
+# -------------------------------------------------------------
+# period min/max for filtering
+RUN_BANDPASS                    = .false.
+WIN_MIN_PERIOD                  = 3.00
+WIN_MAX_PERIOD                  = 30.00
+
+# -------------------------------------------------------------
+# E(t) water level
+STALTA_BASE                     = 0.11
+
+# -------------------------------------------------------------
+# maximum allowable time shift from reference TSHIFT
+TSHIFT_BASE                     = 3.0
+TSHIFT_REFERENCE                = 0.0
+
+# -------------------------------------------------------------
+# maximum allowable amplitude measurement relative to reference DLNA
+DLNA_BASE                       = 1.0
+DLNA_REFERENCE                  = 0.0
+
+# -------------------------------------------------------------
+# limit on CC for window acceptance
+CC_BASE                         = 0.80
+
+# -------------------------------------------------------------
+# boolean switch for check_data_quality
+DATA_QUALITY                    = .true.
+
+# if DATA_QUALITY = .true. and if two different measurements of
+# signal-to-noise ratios exceeds these two base levels,
+# then the data time series (and syn) is kept
+SNR_INTEGRATE_BASE              = 2.5  
+SNR_MAX_BASE                    = 3.5
+
+# -------------------------------------------------------------
+# limit on signal to noise ratio in a particular window.
+WINDOW_SNR_BASE                 = 4.0
+
+# -------------------------------------------------------------
+# Fine tuning constants 
+C_0  (internal minima)          = 1.3
+C_1  (small windows)            = 4.0
+C_2  (prominence)               = 0.0
+C_3a (separation height)        = 4.0 
+C_3b (separation time)          = 2.5 
+C_4a (curtail on left)          = 2.0 
+C_4b (curtail on right)         = 6.0 
+
+WEIGHT_SPACE_COVERAGE           = 0.70
+WEIGHT_AVERAGE_CC               = 0.25
+WEIGHT_N_WINDOWS                = 0.05

Modified: seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T030_m00
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T030_m00	2008-11-14 05:34:12 UTC (rev 13304)
+++ seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T030_m00	2008-11-14 07:51:42 UTC (rev 13305)
@@ -25,7 +25,7 @@
 WIN_MAX_PERIOD                  = 30.00
 
 # -------------------------------------------------------------
-# E(t) water level  (0.23)
+# E(t) water level
 STALTA_BASE                     = 0.18
 
 # -------------------------------------------------------------
@@ -35,8 +35,8 @@
 
 # -------------------------------------------------------------
 # maximum allowable amplitude measurement relative to reference DLNA
-DLNA_BASE                       = 1.0
-DLNA_REFERENCE                  = 0.5
+DLNA_BASE                       = 1.5
+DLNA_REFERENCE                  = 0.0
 
 # -------------------------------------------------------------
 # limit on CC for window acceptance
@@ -54,7 +54,7 @@
 
 # -------------------------------------------------------------
 # limit on signal to noise ratio in a particular window.
-WINDOW_SNR_BASE                 = 2.5
+WINDOW_SNR_BASE                 = 3.0
 
 # -------------------------------------------------------------
 # Fine tuning constants 
@@ -66,6 +66,6 @@
 C_4a (curtail on left)          = 2.5
 C_4b (curtail on right)         = 12.0 
 
-WEIGHT_SPACE_COVERAGE           = 1.0
-WEIGHT_AVERAGE_CC               = 0.0
-WEIGHT_N_WINDOWS                = 0.0
+WEIGHT_SPACE_COVERAGE           = 0.5
+WEIGHT_AVERAGE_CC               = 1.0
+WEIGHT_N_WINDOWS                = 0.7

Modified: seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T030_m11
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T030_m11	2008-11-14 05:34:12 UTC (rev 13304)
+++ seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T030_m11	2008-11-14 07:51:42 UTC (rev 13305)
@@ -25,7 +25,7 @@
 WIN_MAX_PERIOD                  = 30.00
 
 # -------------------------------------------------------------
-# E(t) water level  (0.23)
+# E(t) water level
 STALTA_BASE                     = 0.18
 
 # -------------------------------------------------------------
@@ -54,7 +54,7 @@
 
 # -------------------------------------------------------------
 # limit on signal to noise ratio in a particular window.
-WINDOW_SNR_BASE                 = 2.5
+WINDOW_SNR_BASE                 = 3.0
 
 # -------------------------------------------------------------
 # Fine tuning constants 
@@ -66,6 +66,6 @@
 C_4a (curtail on left)          = 2.5
 C_4b (curtail on right)         = 12.0 
 
-WEIGHT_SPACE_COVERAGE           = 1.0
-WEIGHT_AVERAGE_CC               = 0.0
-WEIGHT_N_WINDOWS                = 0.0
+WEIGHT_SPACE_COVERAGE           = 0.5
+WEIGHT_AVERAGE_CC               = 1.0
+WEIGHT_N_WINDOWS                = 0.7

Added: seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T030_m12
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T030_m12	                        (rev 0)
+++ seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T030_m12	2008-11-14 07:51:42 UTC (rev 13305)
@@ -0,0 +1,71 @@
+# -------------------------------------------------------------
+#
+#    This is the parameter file for FLEXWIN.  It is based on the
+#    same syntax as the Par_file for SPECFEM.  Variable names are
+#    put first, values are placed after the 34th column.
+#
+#    Comment lines and blank lines are significant.  If you
+#    change the layout of this file or add/remove parameters
+#    you must also modify the user_variables module and the 
+#    read_parameter_file subroutine at the start of seismo_subs.f90.
+#    
+# -------------------------------------------------------------
+ 
+# -------------------------------------------------------------
+# boolean parameters
+DEBUG                           = .true.
+MAKE_SEISMO_PLOTS               = .true.
+MAKE_WINDOW_FILES               = .true.
+BODY_WAVE_ONLY                  = .false.
+
+# -------------------------------------------------------------
+# period min/max for filtering
+RUN_BANDPASS                    = .false.
+WIN_MIN_PERIOD                  = 6.00
+WIN_MAX_PERIOD                  = 30.00
+
+# -------------------------------------------------------------
+# E(t) water level
+STALTA_BASE                     = 0.18
+
+# -------------------------------------------------------------
+# maximum allowable time shift from reference TSHIFT
+TSHIFT_BASE                     = 4.0
+TSHIFT_REFERENCE                = 0.0
+
+# -------------------------------------------------------------
+# maximum allowable amplitude measurement relative to reference DLNA
+DLNA_BASE                       = 1.5
+DLNA_REFERENCE                  = 0.0
+
+# -------------------------------------------------------------
+# limit on CC for window acceptance
+CC_BASE                         = 0.71
+
+# -------------------------------------------------------------
+# boolean switch for check_data_quality
+DATA_QUALITY                    = .true.
+
+# if DATA_QUALITY = .true. and if two different measurements of
+# signal-to-noise ratios exceeds these two base levels,
+# then the data time series (and syn) is kept
+SNR_INTEGRATE_BASE              = 3.0  
+SNR_MAX_BASE                    = 2.5
+
+# -------------------------------------------------------------
+# limit on signal to noise ratio in a particular window.
+WINDOW_SNR_BASE                 = 3.0
+
+# -------------------------------------------------------------
+# Fine tuning constants 
+C_0  (internal minima)          = 0.7
+C_1  (small windows)            = 2.0
+C_2  (prominence)               = 0.0
+C_3a (separation height)        = 3.0 
+C_3b (separation time)          = 2.0 
+C_4a (curtail on left)          = 2.5
+C_4b (curtail on right)         = 12.0 
+
+WEIGHT_SPACE_COVERAGE           = 0.5
+WEIGHT_AVERAGE_CC               = 1.0
+WEIGHT_N_WINDOWS                = 0.7

Added: seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T030_m13
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T030_m13	                        (rev 0)
+++ seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T030_m13	2008-11-14 07:51:42 UTC (rev 13305)
@@ -0,0 +1,71 @@
+# -------------------------------------------------------------
+#
+#    This is the parameter file for FLEXWIN.  It is based on the
+#    same syntax as the Par_file for SPECFEM.  Variable names are
+#    put first, values are placed after the 34th column.
+#
+#    Comment lines and blank lines are significant.  If you
+#    change the layout of this file or add/remove parameters
+#    you must also modify the user_variables module and the 
+#    read_parameter_file subroutine at the start of seismo_subs.f90.
+#    
+# -------------------------------------------------------------
+ 
+# -------------------------------------------------------------
+# boolean parameters
+DEBUG                           = .true.
+MAKE_SEISMO_PLOTS               = .true.
+MAKE_WINDOW_FILES               = .true.
+BODY_WAVE_ONLY                  = .false.
+
+# -------------------------------------------------------------
+# period min/max for filtering
+RUN_BANDPASS                    = .false.
+WIN_MIN_PERIOD                  = 6.00
+WIN_MAX_PERIOD                  = 30.00
+
+# -------------------------------------------------------------
+# E(t) water level
+STALTA_BASE                     = 0.18
+
+# -------------------------------------------------------------
+# maximum allowable time shift from reference TSHIFT
+TSHIFT_BASE                     = 4.0
+TSHIFT_REFERENCE                = 0.0
+
+# -------------------------------------------------------------
+# maximum allowable amplitude measurement relative to reference DLNA
+DLNA_BASE                       = 1.5
+DLNA_REFERENCE                  = 0.0
+
+# -------------------------------------------------------------
+# limit on CC for window acceptance
+CC_BASE                         = 0.71
+
+# -------------------------------------------------------------
+# boolean switch for check_data_quality
+DATA_QUALITY                    = .true.
+
+# if DATA_QUALITY = .true. and if two different measurements of
+# signal-to-noise ratios exceeds these two base levels,
+# then the data time series (and syn) is kept
+SNR_INTEGRATE_BASE              = 3.0  
+SNR_MAX_BASE                    = 2.5
+
+# -------------------------------------------------------------
+# limit on signal to noise ratio in a particular window.
+WINDOW_SNR_BASE                 = 3.0
+
+# -------------------------------------------------------------
+# Fine tuning constants 
+C_0  (internal minima)          = 0.7
+C_1  (small windows)            = 2.0
+C_2  (prominence)               = 0.0
+C_3a (separation height)        = 3.0 
+C_3b (separation time)          = 2.0 
+C_4a (curtail on left)          = 2.5
+C_4b (curtail on right)         = 12.0 
+
+WEIGHT_SPACE_COVERAGE           = 0.5
+WEIGHT_AVERAGE_CC               = 1.0
+WEIGHT_N_WINDOWS                = 0.7

Deleted: seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T040_m00
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T040_m00	2008-11-14 05:34:12 UTC (rev 13304)
+++ seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T040_m00	2008-11-14 07:51:42 UTC (rev 13305)
@@ -1,69 +0,0 @@
-# -------------------------------------------------------------
-#
-#    This is the parameter file for FLEXWIN.  It is based on the
-#    same syntax as the Par_file for SPECFEM.  Variable names are
-#    put first, values are placed after the 34th column.
-#
-#    Comment lines and blank lines are significant.  If you
-#    change the layout of this file or add/remove parameters
-#    you must also modify the user_variables module and the 
-#    read_parameter_file subroutine at the start of seismo_subs.f90.
-#    
-# -------------------------------------------------------------
- 
-# -------------------------------------------------------------
-# boolean parameters
-DEBUG                           = .true.
-MAKE_SEISMO_PLOTS               = .true.
-MAKE_WINDOW_FILES               = .true.
-BODY_WAVE_ONLY                  = .false.
-
-# -------------------------------------------------------------
-# period min/max for filtering
-RUN_BANDPASS                    = .false.
-WIN_MIN_PERIOD                  = 6.00
-WIN_MAX_PERIOD                  = 40.00
-
-# -------------------------------------------------------------
-# E(t) water level  (0.23)
-STALTA_BASE                     = 0.18
-
-# -------------------------------------------------------------
-# TSHIFT
-TSHIFT_BASE                     = 10.0
-
-# -------------------------------------------------------------
-# limit on CC for window acceptance
-CC_BASE                         = 0.71
-
-# -------------------------------------------------------------
-# limit on dlnA (dA/A) for window acceptance
-DLNA_BASE                       = 1.5
-
-# -------------------------------------------------------------
-# boolean switch for check_data_quality
-DATA_QUALITY                    = .true.
-
-# if DATA_QUALITY = .true. and if two different measurements of
-# signal-to-noise ratios exceeds these two base levels,
-# then the data time series (and syn) is kept
-SNR_INTEGRATE_BASE              = 3.0  
-SNR_MAX_BASE                    = 2.5
-
-# -------------------------------------------------------------
-# limit on signal to noise ratio in a particular window.
-WINDOW_SNR_BASE                 = 2.5
-
-# -------------------------------------------------------------
-# Fine tuning constants 
-C_0  (internal minima)          = 0.7
-C_1  (small windows)            = 2.0
-C_2  (prominence)               = 0.0
-C_3a (separation height)        = 3.0 
-C_3b (separation time)          = 2.0 
-C_4a (curtail on left)          = 2.5
-C_4b (curtail on right)         = 12.0 
-
-WEIGHT_SPACE_COVERAGE           = 1.0
-WEIGHT_AVERAGE_CC               = 0.0
-WEIGHT_N_WINDOWS                = 0.0

Added: seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T040_m00_orig
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T040_m00_orig	                        (rev 0)
+++ seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/PAR_FILE_T006_T040_m00_orig	2008-11-14 07:51:42 UTC (rev 13305)
@@ -0,0 +1,69 @@
+# -------------------------------------------------------------
+#
+#    This is the parameter file for FLEXWIN.  It is based on the
+#    same syntax as the Par_file for SPECFEM.  Variable names are
+#    put first, values are placed after the 34th column.
+#
+#    Comment lines and blank lines are significant.  If you
+#    change the layout of this file or add/remove parameters
+#    you must also modify the user_variables module and the 
+#    read_parameter_file subroutine at the start of seismo_subs.f90.
+#    
+# -------------------------------------------------------------
+ 
+# -------------------------------------------------------------
+# boolean parameters
+DEBUG                           = .true.
+MAKE_SEISMO_PLOTS               = .true.
+MAKE_WINDOW_FILES               = .true.
+BODY_WAVE_ONLY                  = .false.
+
+# -------------------------------------------------------------
+# period min/max for filtering
+RUN_BANDPASS                    = .false.
+WIN_MIN_PERIOD                  = 6.00
+WIN_MAX_PERIOD                  = 40.00
+
+# -------------------------------------------------------------
+# E(t) water level  (0.23)
+STALTA_BASE                     = 0.18
+
+# -------------------------------------------------------------
+# TSHIFT
+TSHIFT_BASE                     = 10.0
+
+# -------------------------------------------------------------
+# limit on CC for window acceptance
+CC_BASE                         = 0.71
+
+# -------------------------------------------------------------
+# limit on dlnA (dA/A) for window acceptance
+DLNA_BASE                       = 1.5
+
+# -------------------------------------------------------------
+# boolean switch for check_data_quality
+DATA_QUALITY                    = .true.
+
+# if DATA_QUALITY = .true. and if two different measurements of
+# signal-to-noise ratios exceeds these two base levels,
+# then the data time series (and syn) is kept
+SNR_INTEGRATE_BASE              = 3.0  
+SNR_MAX_BASE                    = 2.5
+
+# -------------------------------------------------------------
+# limit on signal to noise ratio in a particular window.
+WINDOW_SNR_BASE                 = 2.5
+
+# -------------------------------------------------------------
+# Fine tuning constants 
+C_0  (internal minima)          = 0.7
+C_1  (small windows)            = 2.0
+C_2  (prominence)               = 0.0
+C_3a (separation height)        = 3.0 
+C_3b (separation time)          = 2.0 
+C_4a (curtail on left)          = 2.5
+C_4b (curtail on right)         = 12.0 
+
+WEIGHT_SPACE_COVERAGE           = 1.0
+WEIGHT_AVERAGE_CC               = 0.0
+WEIGHT_N_WINDOWS                = 0.0

Modified: seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/user_functions_m00.f90
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/user_functions_m00.f90	2008-11-14 05:34:12 UTC (rev 13304)
+++ seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/user_functions_m00.f90	2008-11-14 07:51:42 UTC (rev 13305)
@@ -1,4 +1,21 @@
 ! -------------------------------------------------------------
+! edit here to change T0 and T1 on some condition 
+! Note, this function is called AFTER the seismogram has been 
+! read but before it is filtered.
+! -------------------------------------------------------------
+
+subroutine modify_T0_T1_on_condition
+  use seismo_variables
+
+  ! do nothing
+
+  ! adjust fstart and fend accordingly
+  !FSTART=1./WIN_MAX_PERIOD
+  !FEND=1./WIN_MIN_PERIOD
+
+end subroutine modify_T0_T1_on_condition
+
+! -------------------------------------------------------------
 ! Edit here to change the time dependent properties of the selection criteria
 ! Note, this function is called AFTER the seismogram has been read.
 ! -------------------------------------------------------------
@@ -8,8 +25,8 @@
   integer :: i
   double precision :: time
 
-  ! for qinya's scsn picking
   double precision :: Pnl_start, S_end, Sw_start, Sw_end
+  double precision :: Nlam, dtresh, vref
  
 !===========================
 
@@ -60,7 +77,10 @@
   signal_end = Sw_end
   noise_end  = Pnl_start
   if(DEBUG) then
-     write(*,*) 'DEBUG : P_pick = ', sngl(P_pick)
+     if (BODY_WAVE_ONLY) then
+         write(*,*) 'DEBUG : P_pick = ', P_pick
+         write(*,*) 'DEBUG : S_pick = ', S_pick
+     endif
      write(*,*) 'DEBUG : signal_end = ', sngl(signal_end)
      write(*,*) 'DEBUG : noise_end = ', sngl(noise_end)
   endif
@@ -77,12 +97,11 @@
 
      ! raises STA/LTA water level after surface wave arrives
      if (BODY_WAVE_ONLY) then
-
-        !if(time.gt.S_end) then
-        if(time.gt.Sw_end) then
+        if(time.gt.S_end) then
+        !if(time.gt.Sw_end) then
            STALTA_W_LEVEL(i) = 10.*STALTA_BASE
         endif
-     
+        
      else
 !!$        ! set time- and distance-specific Tshift and DlnA to mimic Qinya's criteria
 !!$        ! (see Liu et al., 2004, p. 1755; note comment above)
@@ -100,10 +119,33 @@
         !   STALTA_W_LEVEL(i) = 2.0*STALTA_BASE
         !endif
 
+        ! allow 100 seconds to possibly capture additional phases
+        if(time.gt. (Sw_end+100.0) ) then
+           STALTA_W_LEVEL(i) = 10.*STALTA_BASE
+        endif
+
      endif
 
   enddo
 
+ ! --------------------------------
+ ! if the distance to the station is less than N wavelengths, then reject records
+ ! by reasing the entire water level
+
+  Nlam = 1.7    ! number of wavelengths
+  vref = 2.0    ! reference velocity, km/s
+  dtresh = Nlam*WIN_MIN_PERIOD*vref
+  if (dist_km .le. dtresh ) then
+     if(DEBUG) then
+         write(*,*) 'REJECT by raising water level: station is too close for this period range'
+         write(*,*) 'dist_km, dtresh = Nlam*WIN_MIN_PERIOD, Nlam, WIN_MIN_PERIOD :'
+         write(*,'(4f12.4)') dist_km, dtresh, Nlam, WIN_MIN_PERIOD
+     endif
+     do i = 1,npts
+        STALTA_W_LEVEL(i) = 10.*STALTA_BASE
+     enddo
+  endif
+
 ! The following is for check_window quality_s2n
 
 ! -----------------------------------------------------------------

Modified: seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/user_functions_m11.f90
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/user_functions_m11.f90	2008-11-14 05:34:12 UTC (rev 13304)
+++ seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/user_functions_m11.f90	2008-11-14 07:51:42 UTC (rev 13305)
@@ -25,8 +25,8 @@
   integer :: i
   double precision :: time
 
-  ! for qinya's scsn picking
   double precision :: Pnl_start, S_end, Sw_start, Sw_end
+  double precision :: Nlam, dtresh, vref
  
 !===========================
 
@@ -128,6 +128,24 @@
 
   enddo
 
+ ! --------------------------------
+ ! if the distance to the station is less than N wavelengths, then reject records
+ ! by reasing the entire water level
+
+  Nlam = 1.7    ! number of wavelengths
+  vref = 2.0    ! reference velocity, km/s
+  dtresh = Nlam*WIN_MIN_PERIOD*vref
+  if (dist_km .le. dtresh ) then
+     if(DEBUG) then
+         write(*,*) 'REJECT by raising water level: station is too close for this period range'
+         write(*,*) 'dist_km, dtresh = Nlam*WIN_MIN_PERIOD, Nlam, WIN_MIN_PERIOD :'
+         write(*,'(4f12.4)') dist_km, dtresh, Nlam, WIN_MIN_PERIOD
+     endif
+     do i = 1,npts
+        STALTA_W_LEVEL(i) = 10.*STALTA_BASE
+     enddo
+  endif
+
 ! The following is for check_window quality_s2n
 
 ! -----------------------------------------------------------------

Added: seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/user_functions_m12.f90
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/user_functions_m12.f90	                        (rev 0)
+++ seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/user_functions_m12.f90	2008-11-14 07:51:42 UTC (rev 13305)
@@ -0,0 +1,179 @@
+! -------------------------------------------------------------
+! edit here to change T0 and T1 on some condition 
+! Note, this function is called AFTER the seismogram has been 
+! read but before it is filtered.
+! -------------------------------------------------------------
+
+subroutine modify_T0_T1_on_condition
+  use seismo_variables
+
+  ! do nothing
+
+  ! adjust fstart and fend accordingly
+  !FSTART=1./WIN_MAX_PERIOD
+  !FEND=1./WIN_MIN_PERIOD
+
+end subroutine modify_T0_T1_on_condition
+
+! -------------------------------------------------------------
+! Edit here to change the time dependent properties of the selection criteria
+! Note, this function is called AFTER the seismogram has been read.
+! -------------------------------------------------------------
+subroutine set_up_criteria_arrays
+  use seismo_variables 
+
+  integer :: i
+  double precision :: time
+
+  double precision :: Pnl_start, S_end, Sw_start, Sw_end
+  double precision :: Nlam, dtresh, vref
+ 
+!===========================
+
+! -----------------------------------------------------------------
+! This is the basic version of the subroutine - no variation with time
+! -----------------------------------------------------------------
+   do i = 1, npts
+     time = b+(i-1)*dt
+     DLNA_LIMIT(i) = DLNA_BASE
+     CC_LIMIT(i) = CC_BASE
+     TSHIFT_LIMIT(i) = TSHIFT_BASE       ! WIN_MIN_PERIOD/2.0
+     STALTA_W_LEVEL(i) = STALTA_BASE
+     S2N_LIMIT(i) = WINDOW_S2N_BASE
+   enddo
+
+!!$  if (.not. BODY_WAVE_ONLY) then
+!!$     Pnl_start =  -5.0 + dist_km/7.8
+!!$     Sw_start  = -15.0 + dist_km/3.5
+!!$     Sw_end    =  35.0 + dist_km/3.1
+!!$  else
+!!$     Pnl_start =  P_pick - 5.0
+!!$     S_end     =  S_pick + 5.0
+!!$     Sw_start  = -15.0 + dist_km/3.5
+!!$     Sw_end    =  35.0 + dist_km/3.1
+!!$  endif
+
+  ! regional (Qinya's formulation):
+  ! -------------------------------------------------------------
+  ! see Liu et al. (2004), p. 1755, but note that the PARENTHESES
+  ! that are listed in the publication should not be there
+  ! THESE ARE PROBABLY NOT ACCURATE ENOUGH FOR LONGER PATHS.
+
+  Sw_start  = -15.0 + dist_km/3.5
+  Sw_end    =  35.0 + dist_km/3.1
+
+  if (BODY_WAVE_ONLY) then
+     !Pnl_start =  P_pick - 5.0
+     !S_end     =  S_pick + 5.0
+     Pnl_start =  P_pick - 2.5*WIN_MIN_PERIOD
+     S_end     =  S_pick + 2.5*WIN_MIN_PERIOD
+
+  else
+     Pnl_start =  -5.0 + dist_km/7.8
+     S_end     =  Sw_start
+  endif
+
+  ! variables for signal to noise ratio criteria.
+  signal_end = Sw_end
+  noise_end  = Pnl_start
+  if(DEBUG) then
+     if (BODY_WAVE_ONLY) then
+         write(*,*) 'DEBUG : P_pick = ', P_pick
+         write(*,*) 'DEBUG : S_pick = ', S_pick
+     endif
+     write(*,*) 'DEBUG : signal_end = ', sngl(signal_end)
+     write(*,*) 'DEBUG : noise_end = ', sngl(noise_end)
+  endif
+
+ ! --------------------------------
+ ! modulate criteria in time
+  do i = 1, npts
+     time = b+(i-1)*dt     ! time
+
+     ! raises STA/LTA water level before P wave arrival.
+     if(time.lt.Pnl_start) then
+        STALTA_W_LEVEL(i) = 10.*STALTA_BASE
+     endif
+
+     ! raises STA/LTA water level after surface wave arrives
+     if (BODY_WAVE_ONLY) then
+        !if(time.gt.S_end) then
+        if(time.gt.Sw_end) then
+           STALTA_W_LEVEL(i) = 10.*STALTA_BASE
+        endif
+        
+     else
+!!$        ! set time- and distance-specific Tshift and DlnA to mimic Qinya's criteria
+!!$        ! (see Liu et al., 2004, p. 1755; note comment above)
+!!$        if(time.ge.Pnl_start .and. time.lt.Sw_start) then
+!!$           !DLNA_LIMIT(i) = 1.5  ! ratio is 2.5, and dlna is ratio-1
+!!$           TSHIFT_LIMIT(i) = 3.0 + dist_km/80.0
+!!$        endif
+!!$        if(time.ge.Sw_start .and. time.le.Sw_end) then
+!!$           !DLNA_LIMIT(i) = 1.5  ! ratio is 2.5, and dlna is ratio-1
+!!$           TSHIFT_LIMIT(i) = 3.0 + dist_km/50.0
+!!$        endif
+
+        ! double the STA/LTA water level after the surface waves
+        !if(time.gt.Sw_end) then
+        !   STALTA_W_LEVEL(i) = 2.0*STALTA_BASE
+        !endif
+
+        ! allow 100 seconds to possibly capture additional phases
+        if(time.gt. (Sw_end+100.0) ) then
+           STALTA_W_LEVEL(i) = 10.*STALTA_BASE
+        endif
+
+     endif
+
+  enddo
+
+ ! --------------------------------
+ ! if the distance to the station is less than N wavelengths, then reject records
+ ! by reasing the entire water level
+
+  Nlam = 1.7    ! number of wavelengths
+  vref = 2.0    ! reference velocity, km/s
+  dtresh = Nlam*WIN_MIN_PERIOD*vref
+  if (dist_km .le. dtresh ) then
+     if(DEBUG) then
+         write(*,*) 'REJECT by raising water level: station is too close for this period range'
+         write(*,*) 'dist_km, dtresh = Nlam*WIN_MIN_PERIOD, Nlam, WIN_MIN_PERIOD :'
+         write(*,'(4f12.4)') dist_km, dtresh, Nlam, WIN_MIN_PERIOD
+     endif
+     do i = 1,npts
+        STALTA_W_LEVEL(i) = 10.*STALTA_BASE
+     enddo
+  endif
+
+! The following is for check_window quality_s2n
+
+! -----------------------------------------------------------------
+! Start of user-dependent portion
+
+! This is where you modulate the time dependence of the selection
+! criteria.  You have access to the following parameters from the 
+! seismogram itself:
+!
+! dt, b, kstnm, knetwk, kcmpnm
+! evla, evlo, stla, stlo, evdp, azimuth, backazimuth, dist_deg, dist_km
+! num_phases, ph_names, ph_times
+!
+! Example of modulation:
+!-----------------------
+! To increase s2n limit after arrival of R1 try
+!
+! R_vel=3.2
+! R_time=dist_km/R_vel
+! do i = 1, npts
+!   time=b+(i-1)*dt
+!   if (time.gt.R_time) then
+!     S2N_LIMIT(i)=2*WINDOW_S2N_BASE
+!   endif
+! enddo
+!
+! End of user-dependent portion
+! -----------------------------------------------------------------
+
+end subroutine set_up_criteria_arrays
+! -------------------------------------------------------------

Added: seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/user_functions_m13.f90
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/user_functions_m13.f90	                        (rev 0)
+++ seismo/3D/ADJOINT_TOMO/flexwin/user_files/socal_3D/user_functions_m13.f90	2008-11-14 07:51:42 UTC (rev 13305)
@@ -0,0 +1,179 @@
+! -------------------------------------------------------------
+! edit here to change T0 and T1 on some condition 
+! Note, this function is called AFTER the seismogram has been 
+! read but before it is filtered.
+! -------------------------------------------------------------
+
+subroutine modify_T0_T1_on_condition
+  use seismo_variables
+
+  ! do nothing
+
+  ! adjust fstart and fend accordingly
+  !FSTART=1./WIN_MAX_PERIOD
+  !FEND=1./WIN_MIN_PERIOD
+
+end subroutine modify_T0_T1_on_condition
+
+! -------------------------------------------------------------
+! Edit here to change the time dependent properties of the selection criteria
+! Note, this function is called AFTER the seismogram has been read.
+! -------------------------------------------------------------
+subroutine set_up_criteria_arrays
+  use seismo_variables 
+
+  integer :: i
+  double precision :: time
+
+  double precision :: Pnl_start, S_end, Sw_start, Sw_end
+  double precision :: Nlam, dtresh, vref
+ 
+!===========================
+
+! -----------------------------------------------------------------
+! This is the basic version of the subroutine - no variation with time
+! -----------------------------------------------------------------
+   do i = 1, npts
+     time = b+(i-1)*dt
+     DLNA_LIMIT(i) = DLNA_BASE
+     CC_LIMIT(i) = CC_BASE
+     TSHIFT_LIMIT(i) = TSHIFT_BASE       ! WIN_MIN_PERIOD/2.0
+     STALTA_W_LEVEL(i) = STALTA_BASE
+     S2N_LIMIT(i) = WINDOW_S2N_BASE
+   enddo
+
+!!$  if (.not. BODY_WAVE_ONLY) then
+!!$     Pnl_start =  -5.0 + dist_km/7.8
+!!$     Sw_start  = -15.0 + dist_km/3.5
+!!$     Sw_end    =  35.0 + dist_km/3.1
+!!$  else
+!!$     Pnl_start =  P_pick - 5.0
+!!$     S_end     =  S_pick + 5.0
+!!$     Sw_start  = -15.0 + dist_km/3.5
+!!$     Sw_end    =  35.0 + dist_km/3.1
+!!$  endif
+
+  ! regional (Qinya's formulation):
+  ! -------------------------------------------------------------
+  ! see Liu et al. (2004), p. 1755, but note that the PARENTHESES
+  ! that are listed in the publication should not be there
+  ! THESE ARE PROBABLY NOT ACCURATE ENOUGH FOR LONGER PATHS.
+
+  Sw_start  = -15.0 + dist_km/3.5
+  Sw_end    =  35.0 + dist_km/3.1
+
+  if (BODY_WAVE_ONLY) then
+     !Pnl_start =  P_pick - 5.0
+     !S_end     =  S_pick + 5.0
+     Pnl_start =  P_pick - 2.5*WIN_MIN_PERIOD
+     S_end     =  S_pick + 2.5*WIN_MIN_PERIOD
+
+  else
+     Pnl_start =  -5.0 + dist_km/7.8
+     S_end     =  Sw_start
+  endif
+
+  ! variables for signal to noise ratio criteria.
+  signal_end = Sw_end
+  noise_end  = Pnl_start
+  if(DEBUG) then
+     if (BODY_WAVE_ONLY) then
+         write(*,*) 'DEBUG : P_pick = ', P_pick
+         write(*,*) 'DEBUG : S_pick = ', S_pick
+     endif
+     write(*,*) 'DEBUG : signal_end = ', sngl(signal_end)
+     write(*,*) 'DEBUG : noise_end = ', sngl(noise_end)
+  endif
+
+ ! --------------------------------
+ ! modulate criteria in time
+  do i = 1, npts
+     time = b+(i-1)*dt     ! time
+
+     ! raises STA/LTA water level before P wave arrival.
+     if(time.lt.Pnl_start) then
+        STALTA_W_LEVEL(i) = 10.*STALTA_BASE
+     endif
+
+     ! raises STA/LTA water level after surface wave arrives
+     if (BODY_WAVE_ONLY) then
+        !if(time.gt.S_end) then
+        if(time.gt.Sw_end) then
+           STALTA_W_LEVEL(i) = 10.*STALTA_BASE
+        endif
+        
+     else
+!!$        ! set time- and distance-specific Tshift and DlnA to mimic Qinya's criteria
+!!$        ! (see Liu et al., 2004, p. 1755; note comment above)
+!!$        if(time.ge.Pnl_start .and. time.lt.Sw_start) then
+!!$           !DLNA_LIMIT(i) = 1.5  ! ratio is 2.5, and dlna is ratio-1
+!!$           TSHIFT_LIMIT(i) = 3.0 + dist_km/80.0
+!!$        endif
+!!$        if(time.ge.Sw_start .and. time.le.Sw_end) then
+!!$           !DLNA_LIMIT(i) = 1.5  ! ratio is 2.5, and dlna is ratio-1
+!!$           TSHIFT_LIMIT(i) = 3.0 + dist_km/50.0
+!!$        endif
+
+        ! double the STA/LTA water level after the surface waves
+        !if(time.gt.Sw_end) then
+        !   STALTA_W_LEVEL(i) = 2.0*STALTA_BASE
+        !endif
+
+        ! allow 100 seconds to possibly capture additional phases
+        if(time.gt. (Sw_end+100.0) ) then
+           STALTA_W_LEVEL(i) = 10.*STALTA_BASE
+        endif
+
+     endif
+
+  enddo
+
+ ! --------------------------------
+ ! if the distance to the station is less than N wavelengths, then reject records
+ ! by reasing the entire water level
+
+  Nlam = 1.7    ! number of wavelengths
+  vref = 2.0    ! reference velocity, km/s
+  dtresh = Nlam*WIN_MIN_PERIOD*vref
+  if (dist_km .le. dtresh ) then
+     if(DEBUG) then
+         write(*,*) 'REJECT by raising water level: station is too close for this period range'
+         write(*,*) 'dist_km, dtresh = Nlam*WIN_MIN_PERIOD, Nlam, WIN_MIN_PERIOD :'
+         write(*,'(4f12.4)') dist_km, dtresh, Nlam, WIN_MIN_PERIOD
+     endif
+     do i = 1,npts
+        STALTA_W_LEVEL(i) = 10.*STALTA_BASE
+     enddo
+  endif
+
+! The following is for check_window quality_s2n
+
+! -----------------------------------------------------------------
+! Start of user-dependent portion
+
+! This is where you modulate the time dependence of the selection
+! criteria.  You have access to the following parameters from the 
+! seismogram itself:
+!
+! dt, b, kstnm, knetwk, kcmpnm
+! evla, evlo, stla, stlo, evdp, azimuth, backazimuth, dist_deg, dist_km
+! num_phases, ph_names, ph_times
+!
+! Example of modulation:
+!-----------------------
+! To increase s2n limit after arrival of R1 try
+!
+! R_vel=3.2
+! R_time=dist_km/R_vel
+! do i = 1, npts
+!   time=b+(i-1)*dt
+!   if (time.gt.R_time) then
+!     S2N_LIMIT(i)=2*WINDOW_S2N_BASE
+!   endif
+! enddo
+!
+! End of user-dependent portion
+! -----------------------------------------------------------------
+
+end subroutine set_up_criteria_arrays
+! -------------------------------------------------------------



More information about the CIG-COMMITS mailing list