-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_DPRK12345_regressionRelLoc.sh
51 lines (51 loc) · 1.11 KB
/
run_DPRK12345_regressionRelLoc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
# Removes DPRK6
dtol=0.0055
mxiter=10000
DSLOWM=0.025
program=regressionRelLoc
exe=./bin/${program}
if test ! -r ${exe}
then
echo "No program ${exe} found ... "
exit 1
fi
scriptname=./run_DPRK12345_regressionRelLoc.sh
if [ $# != 1 ]
then
echo
echo "USAGE: "
echo "$scriptname refevent1 "
echo "$scriptname DPRK2 "
echo
exit 1
fi
#
refevent=$1
evdir=DPRKfiles
slovecsfile=${evdir}/DPRK_ak135_slovecs.txt
locationsfile=${evdir}/DPRK_events_zero.txt
reltimesfile=${evdir}/DPRK_clean_allCC.txt
for file in \
${slovecsfile} \
${locationsfile} \
${reltimesfile}
do
if test ! -r ${file}
then
echo "No file ${file} found "
exit 1
fi
done
nsp=`wc ${slovecsfile} | awk '{print $1}'`
# nev=`wc ${locationsfile} | awk '{print $1}'`
nev=5
infile=${program}.input
if test -r ${infile}
then
mv ${infile} ${infile}.old
fi
cp ${slovecsfile} ${infile}
grep -v DPRK6 ${locationsfile} >> ${infile}
grep -v DPRK6 ${reltimesfile} >> ${infile}
${exe} ${nsp} ${nev} ${refevent} ${dtol} ${mxiter} ${DSLOWM} < ${infile} | grep -v resid_diff | grep -v dxj-dxi | grep -v dxb-dxa | grep -v Observation