#! /bin/sh
# File: acq.sh
# Set messages on
##set -x
# Assign values to variables
num=1
nangle=2000 fangle=-90 langle=90
nt=1000 dt=0.004
# Name input model file
inmodel=model1.dat
# Name output seismic file
outseis=seis11.su
#=================================================
# Create the seismic traces with "triseis"
# i-loop = 100 source positions
# j-loop = 100 hydrophone positions (offset-spread)
# per shot position
# k-loop = layers 2 through 5
# (do not shoot layers 1 and 6)
echo " --Begin looping over triseis."
i=0
while [ "$i" -ne "1" ]
do
fs=`bc -l <<-END
$i * 0.075
END`
sx=`bc -l <<-END
$i * 75 + 2575
END`
fldr=`bc -l <<-END
$i + 1
END`
j=0
while [ "$j" -ne "100" ]
do
fg=`bc -l <<-END
$i * 0.075 + $j * 0.025
END`
gx=`bc -l <<-END
$i * 75 + $j * 25
END`
offset=`bc -l <<-END
$j * 25 -2575
END`
tracl=`bc -l <<-END
$i * 100 + $j + 1
END`
tracf=`bc -l <<-END
$j + 1
END`
echo " Sx=$sx Gx=$gx fldr=$fldr Offset=$offset tracl=$tracl\
fs=$fs fg=$fg"
k=2
while [ "$k" -ne "9" ]
do
triseis < $inmodel xs=2.575,10 xg=2.475,7.425 zs=0,0 zg=0,0 \
nangle=$nangle fangle=$fangle langle=$langle \
kreflect=$k krecord=1 fpeak=40 lscale=0.5 \
ns=1 fs=$fs ng=1 fg=$fg nt=$nt dt=$dt |
suaddhead nt=$nt |
sushw key=dt,tracl,tracr,fldr,tracf,trid,offset,sx,gx \
a=4000,$tracl,$tracl,$fldr,$tracf,1,$offset,$sx,$gx >> temp$k
k=`expr $k + 1`
done
j=`expr $j + 1`
done
i=`expr $i + 1`
done
echo " --End looping over triseis."
#=================================================
# Sum contents of the "temp" files
echo " --Sum files."
susum temp2 temp3 > tempa
susum tempa temp4 > tempb
susum tempb temp5 > tempc
susum tempc temp6 > tempd
susum tempd temp7 > tempe
susum tempe temp8 > $outseis
# Remove temp files
echo " --Remove temp files."
rm -f temp*
# Exit politely from shell script
echo " --Finished!"
exit