Computer Programs in Seismology Tutorial

Surface wave inversion kernels - II

Introduction

Although the programs surf96 and joint96 have been available for almost 40 years, access to the actual partial derivatives used in the inversion of surface-wave data has not been easy to obtain unless one really read the programs.

This tutorial is a follow on to the tutorial describing srfker96. the purpose of that program was to provide the inversion kernels, e.g., the partial derivatives of the dispersion value with respect to the medium parameters in a manner that permitted their plots.  Recently there was a request for the partial derivatives themselves for use in an user developed inversion program. For this reason srfpar96 is now provided.  This new program uses the data sets and some of the internal files used by surf96.

To permit the user to tailor the information provided by srfpar96, the output is performed in subroutine outputpar.  This subroutine is well commented, so that the output can be reformatted for the user's independent code.

The detailed theory concerning the partial derivatives  is given in surf.pdf. The discussion shows how to use the new program with others contained in PROGRAMS.330/VOLIV/src.

The complete set of scripts for running the programs are given in DIST.tgz. After downloading, unpack using the command:

gunzip -c DIST.tgz | tar xvf -

This will create the subdirectory SWKERNELS1/DIST. cd SWKERNELS1/DIST. There are two subdirectories: Q and NOQ which permit one to duplicate the results shown in this tutorial.

Tutorial download

Download DIST.tgz. Then

gunzip -c DIST.tgz | tar xf -
cd DIST.tgz

You will see the following directory structure:

SWKERNELS1/
| ----- srfpar96.f
| ----- surf.pdf
| ----- Q/
| | ---- SCMQ.mod
| | ---- disp.d
| | ---- sobs.d
|
| ----- NOQ/
| ---- SCM.mod
| | ---- disp.d
| | ---- sobs.d

Source code

The srfpar96.f  will be included in the next distribution of Computer Programs in Seismology. It is also given here:

srfpar96.f

Compile this with the command

gfortran -frecord-marker=4 srfpar96.f -o srfpar96

Use of srfpar96

Before running this program, you must have the dispersion file in surf96 format, the velocity model in model96  format and the sobs.d control file. These are requires by surf96 which initially reads these using srfpre96. 

The sobs.d used in Example 1 below is

   4.99999989E-03   4.99999989E-03   0.00000000       4.99999989E-03   0.00000000    
1 1 2 2 1 2 2 0 1 0
SCM.mod
disp.d

I usually create this file interactively using srfpre96, which creates sobs.d if it does now exist, or which uses an existing sobs.d. The meaning of the entries on the four lines is as follows:

The safest way to create sobs.d is to run surf96/srfrpe96 interactively.

Tests

Example 1

The first example is in the subdirectory NOQ. In this directory you will find the following files: sobs.d, SCM.mod and disp.d. Not the that Q fields in SCM.mod are set to zero.  This is because srfpar96 will compute dispersion for causal Q, which means that the pahse and group velocities will differ from purely infinite Q models. 

In this example srfker96 will also be run.

srfpre96                   Create the control files
srfdis96 Get the phase velocities for the current model
srfdrl96 Run first. Get the Love partials and group velocities
srfdrr96 Get the Rayleigh wave partials, merge with the Love wave
srfpar96 > srfpar96.txt Output partials for observed dispersion

srfker96 > srfker96.txt Output kernels for the the model. The entries here will often be greater than the observed dispersion.

Here is the output: srfpar96.txt and srfker96.txt.

An entry of srfpar96.txt for one observation looks like

        2        2        1   12.0000000    3.50000000    3.14152980   0.358470201    2
   5.15833758E-02  -2.00628449E-04
  0.755849659      -2.36292444E-02
   7.48062041E-03   0.00000000    
 -0.244638950      -1.38737843E-04
  -1.36846924      -1.22778639E-02

The entries of the first line are type (1=Love, 2=Rayleigh), dispersion value (1=phase velocity, 2=group velocity, 3=gamma), mode number (0=fundamental), period, observed dispersion, predicted dispersion, residual (observed - predicted), and finally the number of layers.

The next five lines are the partial derivatives of the dispersion value, corresponding to each layer of the model:

dvda       - partial of value with respect to P velocity
dvdb       - partial of value with respect to S velocity
dvdh       - partial of value with respect to layer thickness
dvdqainc - partial of value with respect to inverse Qp
dvdqbinv - partial of value with respect to inverse Qs

The example code in subroutine outputpar always outputs the five partials. However for love waves the dvda and dvdqainv will  be zeros since love waves are not a function of the p-wave velocities.

Example 2

This differs from the previous example in that the velocity model has Qp=600 and Qs=300 in the first layers. Because of this the predicted dispersion values and partial derivatives will be different form the results of Example 1. The difference will be greater that  for models with much lower Q. and data at shorter periods.

The output of this example is srfpar96.txt and srfker96.txt.

Discussion

As mentioned the number of partials output can be less than the number of dispersion points. The dist.d had the following entry

SURF96 R C X 1 50.0 3.9 0.01

The first higher modes for the model only appear at periods less than about 15s. Thus this observation at a period of 50s  will not be used for the inversion since the model does not support it.

Compare the output of the srfpar96.txt and srfker96.txt

to ensure that the srfpar96 output is correct.

Thoughts on inversion

An iterative inversion will run through a sequence of models. Here is how I might approach it.

Have an sobs.d that looks like

   4.99999989E-03   4.99999989E-03   0.00000000       4.99999989E-03   0.00000000    
1 1 2 2 1 2 2 0 1 0. This will be different for your data
T.mod
disp.d

Now if the sequence of models is something like 000.mod

cp 000.mod

srfpre96
srfdis96
srfdrl96
srfdrr96
your_modified_srfpar96 > output
your inversion which creates a new model, e.g. out.mod

cp out.mod 001.mod
cp 001.mod T.mod


srfpre96
srfdis96
srfdrl96
srfdrr96

your_modified_srfpar96 > output
your inversion which creates a new model, e.g. out.mod