-
Notifications
You must be signed in to change notification settings - Fork 7
/
drive_visc_scan
executable file
·82 lines (73 loc) · 2.17 KB
/
drive_visc_scan
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/bash
#
# compute viscosity scans using HC for single, or simple (2-4) layer structures
#
layers=${1-"-2 2 3 4"}
#smodels=${2-"smean2 lrr98d s40rts semucb-wm1 smean2_ntn st11den-1 stb00d tx2019slab"}
smodels=${2-"smean2 lrr98d stb00d st11den-1 tx2019slab tx2019nslab"}
zlm=${3-660} # depth of the upper/lower mantle boundary
zau=${4-410} # depth of the asthenosphere, from 100.... zau
dmode=${5-1} #
eta_max_exp=${6-3} # default visc range viscosity 10^{+/- emax}
if [ $dmode -eq 1 ];then
odir=visc_scan_out
dens_type="-dsf $HOME/progs/src/seatree/python/data/hc/dscale/dscale_0.dat"
elif [ $dmode -eq 2 ];then
odir=visc_scan_out_hefesto
dens_type="-dsf $HOME/progs/src/seatree/python/data/hc/dscale/hefesto.new_dmm.1600.200zero.dat"
elif [ $dmode -eq 3 ];then
odir=visc_scan_out_nlm
dens_type="-dsf $HOME/progs/src/seatree/python/data/hc/dscale/dscale_0nlm.dat"
elif [ $dmode -eq 4 ];then
odir=visc_scan_out_hefesto_nlm
dens_type="-dsf $HOME/progs/src/seatree/python/data/hc/dscale/hefesto.new_dmm.1600.200zeronlm.dat"
else
echo $0: $dmode undefined
#dens_type="-ds 0.2"
exit
fi
hc_dir=$HOME/progs/src/cig/hc
geoid_ref=$hc_dir/egm2008-hc-geoid.chambat.31.ab
prem_file=$hc_dir/prem/prem.dat
mkdir -p $odir/
for lay in $layers;do
if [ $lay -eq 2 ];then
dv=0.001
elif [ $lay -eq -2 ];then
dv=0.01
elif [ $lay -eq 3 ];then
dv=0.05
elif [ $lay -eq 4 ];then
dv=0.05
else
echo error
exit
fi
for smodel in $smodels;do
if [[ $smodel = tx2019 || $smodel = tx2019slab ]];then
#slmax=63
slmax=31
else
slmax=31
fi
while [ `ps aux | grep hc_visc_scan | lc ` -gt $NR_CPUS ];do
echo $0: waiting for jobs to terminate
sleep 30
done
if [ $zau = 410 ];then
suf=dat.gz
else
suf=a.$zau.dat.gz
fi
if [ $zlm = 660 ];then
ofile=$odir/visc_scan.$smodel.$lay.$suf
else
ofile=$odir/visc_scan.$smodel.$lay.$zlm.$suf
fi
echo $smodel $lay
hc_visc_scan -dens $datadir/tomography/models/$smodel.$slmax.m.ab -dshs \
$dens_type -prem $prem_file \
-vs_zlm $zlm -vs_zau $zau -vs_em $eta_max_exp \
-gref $geoid_ref -vs_n $lay -vs_dv $dv | gzip -c > $ofile &
done
done