forked from NOAA-EMC/global-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJGFS_AWIPS_20KM_1P0DEG
executable file
·92 lines (75 loc) · 2.54 KB
/
JGFS_AWIPS_20KM_1P0DEG
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
#!/bin/sh
set -xa
export PS4='$SECONDS + '
export OMP_NUM_THREADS=${OMP_NUM_THREADS:-1}
date
###########################################
# GFS_AWIPS_20KM AWIPS PRODUCT GENERATION
###########################################
#########################################################
# obtain unique process id (pid) and make temp directory
#########################################################
export DATA=${DATA:-${DATAROOT}/${jobid:?}}
mkdir -p $DATA
cd $DATA
######################################
# Set up the cycle variable
######################################
export cycle=${cycle:-t${cyc}z}
###########################################
# Run setpdy and initialize PDY variables
###########################################
setpdy.sh
. PDY
################################
# Set up the HOME directory
################################
export HOMEgfs=${HOMEgfs:-${NWROOT}/gfs.${gfs_ver}}
export USHgfs=${USHgfs:-$HOMEgfs/ush}
export EXECgfs=${EXECgfs:-$HOMEgfs/exec}
export PARMgfs=${PARMgfs:-$HOMEgfs/parm}
export PARMwmo=${PARMwmo:-$HOMEgfs/parm/wmo}
export PARMproduct=${PARMproduct:-$HOMEgfs/parm/product}
export FIXgfs=${FIXgfs:-$HOMEgfs/fix}
###################################
# Specify NET and RUN Name and model
####################################
export NET=${NET:-gfs}
export RUN=${RUN:-gfs}
export model=${model:-gfs}
##############################################
# Define COM directories
##############################################
export COMIN=${COMIN:-$(compath.py ${NET}/${envir}/${RUN}.${PDY})/${cyc}}
export COMOUT=${COMOUT:-${COMROOT}/${NET}/${envir}/${RUN}.${PDY}/${cyc}}
export COMOUTwmo=${COMOUTwmo:-${COMOUT}/wmo}
if [ $SENDCOM = YES ] ; then
mkdir -m 775 -p $COMOUT $COMOUTwmo
fi
export pgmout=OUTPUT.$$
env
########################################################
# Execute the script.
# Forecast hours from F00 - F84 at 3-hour interval
# Forecast hours from F90 - F240 at 6-hour interval
#########################################################
########################################################
# Execute the script.
$HOMEgfs/scripts/exgfs_awips_20km_1p0deg.sh.ecf $fcsthrs
export err=$?; err_chk
########################################################
msg="JOB $job HAS COMPLETED NORMALLY!"
postmsg $jlogfile "$msg"
############################################
# print exec I/O output
############################################
if [ -e "$pgmout" ] ; then
cat $pgmout
fi
###################################
# Remove temp directories
###################################
if [ "$KEEPDATA" != "YES" ] ; then
rm -rf $DATA
fi
date