#! /bin/sh
# Sufdmod2 --- example script for sufdmod2
# finite-difference modeling: Test of the  PML transparent boundary conditions
# Author: John Stockwell
WIDTH=450
HEIGHT=450
WIDTHOFF1=50
WIDTHOFF2=530
HEIGHTOFF1=50
HEIGHTOFF2=530

n1=200 d1=5 f1=0.0 label1="Depth (km)"
n2=200 d2=5 f2=0.0 label2="Distance (km)"
xs=500 zs=100 hsz=500 vsx=500 verbose=2
vsfile="vseis.out" ssfile="sseis.out" hsfile="hseis.out"
tmax=.5 mt=5 

makevel nx=$n2 nz=$n1 v000=3000 vlens=-1000 tlens=50 dlens=150 xlens=100 zlens=100 lambda=10 >vel.out

ximage n1=$n1 < vel.out legend=1 title="velocity model" &

sufdmod2 <vel.out nz=$n1 dz=$d1 nx=$n2 dx=$d2 verbose=1 \
	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 pml=$pml pml_thick=$pml_thick |
suxmovie  clip=1.0 \
	title="Acoustic Finite-Differencing" \
	windowtitle="Movie" \
	label1="$label1" label2="$label2" \
	n1=$n1 d1=$d1 f1=$f1 n2=$n2 d2=$d2 f2=$f2 \
	cmap=gray loop=2 interp=0 &

exit 0
