-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompute_ensmean_fcst.sh
executable file
·41 lines (33 loc) · 1.81 KB
/
compute_ensmean_fcst.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
#!/bin/sh
export OMP_STACKSIZE=1024M
cd ${datapath2}
fh=${FHMIN}
while [ $fh -le $FHMAX ]; do
charfhr="fhr`printf %02i $fh`"
if [ $cleanup_ensmean == 'true' ] || ([ $cleanup_ensmean == 'false' ] && [ ! -s ${datapath}/${analdate}/bfg_${analdate}_${charfhr}_ensmean ]); then
echo "running ${execdir}/getsfcensmeanp.x ${datapath2}/ bfg_${analdate}_${charfhr}_ensmean bfg_${analdate}_${charfhr} ${nanals}"
/bin/rm -f ${datapath2}/bfg_${analdate}_${charfhr}_ensmean
export PGM="${execdir}/getsfcensmeanp.x ${datapath2}/ bfg_${analdate}_${charfhr}_ensmean bfg_${analdate}_${charfhr} ${nanals}"
${scriptsdir}/runmpi
if [ ! -s ${datapath}/${analdate}/bfg_${analdate}_${charfhr}_ensmean ]; then
echo "getsfcensmeanp.x failed..."
exit 1
fi
fi
if [ $cleanup_ensmean == 'true' ] || ([ $cleanup_ensmean == 'false' ] && [ ! -s ${datapath}/${analdate}/sfg_${analdate}_${charfhr}_ensmean ]); then
/bin/rm -f ${datapath2}/sfg_${analdate}_${charfhr}_ensmean
echo "running ${execdir}/getsigensmeanp_smooth.x ${datapath2}/ sfg_${analdate}_${charfhr}_ensmean sfg_${analdate}_${charfhr} ${nanals} sfg_${analdate}_${charfhr}_enssprd"
if [ $fh -eq $ANALINC ]; then # just save spread at middle of window
export PGM="${execdir}/getsigensmeanp_smooth.x ${datapath2}/ sfg_${analdate}_${charfhr}_ensmean sfg_${analdate}_${charfhr} ${nanals} sfg_${analdate}_${charfhr}_enssprd"
else
export PGM="${execdir}/getsigensmeanp_smooth.x ${datapath2}/ sfg_${analdate}_${charfhr}_ensmean sfg_${analdate}_${charfhr} ${nanals}"
fi
${scriptsdir}/runmpi
if [ ! -s ${datapath}/${analdate}/sfg_${analdate}_${charfhr}_ensmean ]; then
echo "getsigensmeanp_smooth.x failed..."
exit 1
fi
fi
fh=$((fh+FHOUT))
done
echo "all done `date`"