kintcalc2 - CShell Script
#!/bin/csh -f

#          kintcalc2

#  Create a directory name for the Green's functions
#  Create a linear gradient crust and mantle model using linmod.f
#  Run kint to produce Green's functions
#  Run deplex to demultiplex Green's functions
#  Run gint.sac to create Green's functions
#  Run grsynth to constuct synthetics

#     C.A. Langston 9/28/00

if ($#argv != 11) then
    echo "Usage:  $0 {model# v1 v2 v3 v4 sigc sigm cth cmth nlayer mlayer}"

#  Environment for directory structure

setenv CHUCKBIN '/space/langston/ts3/bin'
setenv MODEL '/space/langston/ts3/Tanzania/kint/models'
setenv CSHELL '/space/langston/ts3/Tanzania/kint/cshells'
setenv SACMAC '/space/langston/ts3/Tanzania/kint/sacmacros'
set MOD = "mod"$1

#  Create a directory for the Green's functions

if (-d $MODDIR) then
 mkdir $MODDIR

cp $CSHELL/kmodel.ref .

#  Build file for linmod program

echo $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 >
echo "1000  500  1000 500" >>

#  Run linmod program to produce file for kint program
#  Note that kmodel.ref should be set up before doing this.  kmodel.ref
#  is a reference kint model file with integration parameters and 
#  station information contained in the "cshells" directory.

$CHUCKBIN/linmod <

# build the kint.input file

echo "" > kint.input
echo "kint.prt"$1 >> kint.input
echo "kint.pun"$1 >> kint.input

# Run kint

$CHUCKBIN/kint < kint.input > kint.output

# Demultiplex the spectra

echo "kint.pun"$1 >
echo $MOD".spec" >>

$CHUCKBIN/deplex < > deplex.prt

# Run gint.sac to produce time series for each Green's function

echo $MOD".spec" >
echo $MOD >>
echo "0" >>

$CHUCKBIN/gint.sac < > gint.sac.prt

#  Green's functions have been computed, now run grsynth for
#     synthetics
#  Note: and greenf.csh files should be set up
#         in the "cshells" directory

$CSHELL/greenf.csh $MOD

$CHUCKBIN/grsynth < $CSHELL/ > grnsynth.prt

#  Adjust origin times of synthetics

$SACDIR/bin/sac2000 < $SACMAC/synth.macro

#  Adjust origin times for the Model200 phase time inversion

$SACDIR/bin/sac2000 < $MODEL/mod200/synth200.macro

#  All done!


11 arguments!

Particular to my file system

Make a directory for the synthetic seismograms

"linmod" makes a linear gradient crustal model

setup the wavenumber integration

This takes hours.

gint.sac is a fortran77 program that reads SAC files

Produce synthetic seismograms for a particular source model

Run SAC, the file "synth.macro" has already been made.


last modified 3/06/01