kintcalc2 - CShell Script
kintcalc2
Comments
#!/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}"
    exit
endif

#  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
setenv MODDIR $MODEL/$MOD

#  Create a directory for the Green's functions

if (-d $MODDIR) then
 else
 mkdir $MODDIR
endif

cd $MODDIR
cp $CSHELL/kmodel.ref .

#  Build file for linmod program

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

#  Run linmod program to produce kmodel.in 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 < linmod.in

# build the kint.input file

echo "kmodel.in" > 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 > deplex.in
echo $MOD".spec" >> deplex.in

$CHUCKBIN/deplex < deplex.in > deplex.prt

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

echo $MOD".spec" > gint.sac.in
echo $MOD >> gint.sac.in
echo "0" >> gint.sac.in

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

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

$CSHELL/greenf.csh $MOD

$CHUCKBIN/grsynth < $CSHELL/grnsynth.ruk.in > 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.
 
 
 

Return



last modified 3/06/01