Computer Programs in Seismology Tutorial

Wave propagation for ocean floor observations

DOITSW

This script executes the surface wave codes to create the theoretical dispersion curves for the five different water thicknesses. The initial appearance of the OCEAN_SW directory is


> ls -F
DOITSW*		OCEAN_2.0.mod	
OCEAN_1.0.mod	OCEAN_3.0.mod	
OCEAN_4.0.mod	OCEAN_5.0.mod 

After executing the DOITSW command this directory will appear as


>ls -F
ALLR.PLT	OCEAN_1.0.mod	OCEAN_4.0.mod	swDIR_2.0/	swDIR_5.0/
DOITSW* 	OCEAN_2.0.mod	OCEAN_5.0.mod	swDIR_3.0/	
LLL.PLT 	OCEAN_3.0.mod	swDIR_1.0/	swDIR_4.0/

The subdirectories, such as swDIR_3.0 for the 3.0km water thickness will have the following files:

> ls -F
L.PLT		SLEGN.dsp	SREGN.dsp	sdisp96.lov	sdisp96.ray	
OCEAN_3.0.mod	SREGNC.PLT	SLEGNC.PLT	slegn96.egn     sregn96.egn
R.PLT		SLEGNU.PLT	SREGNU.PLT	sdisp96.dat	

The sdisp96.dat is created by the program sprep96, sdisp96.lov and sdisp96.ray are created by sdisp96, sregn96.egn by sregn96 and slegn96.egn by slegn96. The program sdpegn96 creates the group (U) and phase (C) velocity plots for Love (L) and Rayleigh (R) dispersion. Finally the -S flag to sdpegn96 will create the theoretical dispersion files SLEGN.dsp and SREGN.dsp for use with the inversion program surf96 or for user defined purposes. The surf96 dispersion format is described in the CPS distribution at PROGRAMS.330/DOC/OVERVIEW.pdf/cps330o.pdf.

For the purpose of this particular tutorial, the group and phase velocity plots are combined for each wave type to create the composite L.PLT and R.PLT. Because this is done by a simple cat command the Y-axis label will be messy. However the phase velocity is plotted as a solid curve and the group velocity as a dashed curve. Two modes are displayed since the synthetic waveforms show a strong first higher mode for some Green's functions.

The last thing that the script does is to combine the L.PLT files for each water depth to make the top level plot file ALLL.PLT Similarly all of the Rayleigh wave dispersion plots are combined to create the ALLR.PLT. The result are messy files whose only purpose to to show the effect of the water thickness on the Love (none) and Rayleigh (a lot) waves.

To use this enter a command as

 DOITSW 

The DOITSW shell script is


#!/bin/sh

for D in 1.0 2.0 3.0 4.0 5.0
do
   case $D in
      0.5) KOLOR=1000 ;;  # These are CALPLOT colors. See the 
      1.0) KOLOR=1020 ;;  # Appendix of the PDF in >
      2.0) KOLOR=1040 ;;  # PROGRAMS.330/DOC
      3.0) KOLOR=1060 ;;
      4.0) KOLOR=1080 ;;
      5.0) KOLOR=1100 ;;
   esac

   if [ ! -d swDIR_${D} ]    #Create a unique directory for each model 
   then
      mkdir swDIR_${D}
   fi
   cp OCEAN_${D}.mod swDIR_${D}
   #  run in a sub shell
   (
      cd swDIR_${D}
      sprep96 -PMIN 1 -PMAX 150 -M OCEAN_${D}.mod -NMOD 2 -L -R  
                        #Execute the surface wave codes to get dispersion
                        #for fundamental and first high modes
      sdisp96
      sregn96
      slegn96
set -x
      sdpegn96 -R -C -XLOG -PER -S  -K ${KOLOR} -XMIN 1 -XMAX 150 \
                -YMIN 0.0 -YMAX 5.0
      sdpegn96 -R -U -XLOG -PER -S  -K ${KOLOR} -XMIN 1 -XMAX 150 \
                -YMIN 0.0 -YMAX 5.0 -DT "short"
      sdpegn96 -L -C -XLOG -PER -S  -K ${KOLOR} -XMIN 1 -XMAX 150 \
                -YMIN 0.0 -YMAX 5.0
      sdpegn96 -L -U -XLOG -PER -S  -K ${KOLOR} -XMIN 1 -XMAX 150 \
                -YMIN 0.0 -YMAX 5.0 -DT "short"
      cat SREGN[CU].PLT > R.PLT
      cat SLEGN[CU].PLT > L.PLT
   )
done

cat */R.PLT > ALLR.PLT
cat */L.PLT > ALLL.PLT