forked from NOAA-EMC/global-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJGFS_FBWIND
executable file
·86 lines (70 loc) · 2.27 KB
/
JGFS_FBWIND
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
#!/bin/sh
set -xa
export PS4='$SECONDS + '
date
############################################
# GFS FBWIND 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}
export UTILgfs=${UTILgfs:-$HOMEgfs/util}
###################################
# 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.
$HOMEgfs/scripts/exgfs_fbwind.sh.ecf
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