forked from jswhit/da_scripts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcalcanl.sh
44 lines (37 loc) · 883 Bytes
/
calcanl.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
export LEVSp1=`expr $LEVS \+ 1`
SIGLEVEL=${SIGLEVEL:-${FIXGLOBAL}/global_hyblev.l${LEVSp1}.txt}
export CALCANLEXEC=${CALCANLEXEC:-${execdir}/calc_analysis.x}
DATA=$datapath2/calcanltmp$$
mkdir -p $DATA
pushd $DATA
# namelist /setup/ datapath, analysis_filename, firstguess_filename, increment_filename, fhr, use_nemsio_anl
/bin/rm -f calc_analysis.nml
/bin/rm -f $3
cat > calc_analysis.nml << EOF
&setup
datapath="${datapath2}"
firstguess_filename="${1}"
increment_filename="${2}"
analysis_filename="${3}"
fhr=0
/
EOF
cat calc_analysis.nml
export OMP_NUM_THREADS=$corespernode
export OMP_STACKSIZE=256M
#$CALCANLEXEC
export PGM="$CALCANLEXEC"
export nprocs=1
export mpitaskspernode=1
${enkfscripts}/runmpi
ls -l
if [ $? -ne 0 ]; then
exit 1
fi
if [ ! -s "${datapath2}/${3}" ]; then
echo "output file ${3} not created"
exit 1
fi
popd
/bin/rm -rf $DATA
exit 0