#! /bin/sh


# Sufdmod2 --- example script for sufdmod2
# finite-difference modeling: part 1, the movie
# Author: John Stockwell
WIDTH=4000
HEIGHT=200
WIDTHOFF1=10
WIDTHOFF2=500
HEIGHTOFF1=50
HEIGHTOFF2=530

modelfile=model7.unif           # input model file for unif2aniso
ninf=2                          # number of interfaces (surface counts)
x0=0,0,0                        # x-position(s) for  vp00,vs00,rho00, etc.
z0=0,1000,1100                  # z-position(s) for  vp00,vs00,rho00, etc.
nz=200                          # size of z (depth) dimension  of model
nx=4000                         # size of x (horizontal) dimension of model
dz=10                           # increment in z direction
dx=10                           # increment in x direction
v00=3320,2898,3320              # wavespeed(s) at (x0,z0)
method=linear			# boundary interpolation method

n1=$nz d1=$dz f1=0.0 label1="Depth (km)"
n2=$nx d2=$dx f2=0.0 label2="Distance (km)"
xs=12000 zs=1005 hsz=50 vsx=1005 verbose=2
vsfile="vseis.out" ssfile="sseis.out" hsfile="hseis.out"
tmax=15.0 mt=50 fpeak=35 fmax=40

unif2 < model7.unif ninf=$ninf v00=$v00 nz=$n1 nx=$n2 method=$method > vel.out


ximage < vel.out wbox=$WIDTH hbox=$HEIGHT xbox=$WIDTHOFF2 title="Wavespeed Profile" \
 n1=$n1 n2=$n2 legend=1 lheight=150 units="wave speed" &

sufdmod2 <vel.out nz=$n1 dz=$d1 nx=$n2 dx=$d2 verbose=1 \
	fpeak=$fpeak fmax=$fmax \
	xs=$xs zs=$zs hsz=$hsz vsx=$vsx hsfile=$hsfile \
	vsfile=$vsfile ssfile=$ssfile verbose=$verbose \
	tmax=$tmax abs=1,1,1,1 mt=$mt |
suxmovie  clip=.1 \
	title="Acoustic Finite-Differencing" \
	windowtitle="Waveguide Movie" \
	label1="$label1" label2="$label2" \
	n1=$n1 d1=$d1 f1=$f1 n2=$n2 d2=$d2 f2=$f2 \
	loop=1  sleep=3

exit 0








