-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathJREFS_GEMPAK
executable file
·97 lines (78 loc) · 2.74 KB
/
JREFS_GEMPAK
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/bin/bash
set -xa
# #### 08/25/1999 ###################
# SET SHELL PROCESSING VARIABLES
# ###################################
export PS4='$SECONDS + '
date
###########################################################
# obtain unique process id (pid) and make temp directories
###########################################################
export DATA=${DATA:-${DATAROOT}/${jobid}}
mkdir $DATA
cd $DATA
# Run setpdy and initialize PDY variables
export cycle=${cycle:-t${cyc}z}
setpdy.sh
. ./PDY
##################################################
# SENDECF - Flag Events on ecFLOW
# SENDCOM - Copy Files From TMPDIR to $COMOUT
# SENDDBN - Issue DBNet Client Calls
##################################################
export SENDCOM=${SENDCOM:-YES}
export SENDECF=${SENDECF:-YES}
export SENDDBN=${SENDDBN:-YES}
export HOMErefs=${HOMErefs:-$PACKAGEROOT/refs.${refs_ver}}
export GEMPAKrefs=${GEMPAKrefs:-$HOMErefs/gempak}
export finc=1
export fend=60
export fstart=01
export DBN_ALERT_TYPE=${DBN_ALERT_TYPE:-RRFS_GEMPAK}
###############################
# Specify NET and RUN name
###############################
export NET=${NET:-refs}
export RUN=${RUN:-refs}
export COMOUT=${COMOUT:-$(compath.py -o $NET/${refs_ver})/${RUN}.${PDY}/gempak}
export COMIN=${COMIN:-$(compath.py -o $NET/${refs_ver})/${RUN}.${PDY}/ensprod}
if [ ! -f $COMOUT ] ; then
mkdir -p -m 775 $COMOUT
fi
export pgmout="OUTPUT.$$"
env
#################################################################
# Execute the script
rm -f poescript
echo "$HOMErefs/scripts/exrefs_gempak.sh.ecf mean > $DATA/${NEST}_mean.$$ " >>poescript
echo "$HOMErefs/scripts/exrefs_gempak.sh.ecf pmmn > $DATA/${NEST}_pmmn.$$ " >>poescript
echo "$HOMErefs/scripts/exrefs_gempak.sh.ecf avrg > $DATA/${NEST}_avrg.$$ " >>poescript
echo "$HOMErefs/scripts/exrefs_gempak.sh.ecf prob > $DATA/${NEST}_prob.$$ " >>poescript
echo "$HOMErefs/scripts/exrefs_gempak.sh.ecf sprd > $DATA/${NEST}_sprd.$$ " >>poescript
echo "$HOMErefs/scripts/exrefs_gempak.sh.ecf eas > $DATA/${NEST}_eas.$$ " >>poescript
echo "$HOMErefs/scripts/exrefs_gempak.sh.ecf lpmm > $DATA/${NEST}_lpmm.$$ " >>poescript
if [ ${NEST} = 'conus' ]
then
export finc=1
export fend=60
export fstart=01
echo "$HOMErefs/scripts/exrefs_gempak.sh.ecf ffri > $DATA/${NEST}_ffri.$$ " >>poescript
fi
chmod 775 ./poescript
mpiexec -n $NTASK -ppn $PTILE --cpu-bind verbose,core cfp ./poescript
export err=$?; err_chk
cat $DATA/${NEST}_mean.$$
cat $DATA/${NEST}_pmmn.$$
cat $DATA/${NEST}_avrg.$$
cat $DATA/${NEST}_prob.$$
cat $DATA/${NEST}_sprd.$$
cat $DATA/${NEST}_eas.$$
cat $DATA/${NEST}_lpmm.$$
if [ ${NEST} = 'conus' ]
then
cat $DATA/${NEST}_ffri.$$
fi
#################################################################
cd ${DATAROOT}
if [ $KEEPDATA = NO ]; then rm -rf $DATA; fi
date