-
Notifications
You must be signed in to change notification settings - Fork 176
/
Copy pathJGLOBAL_WAVE_POST_PNT
executable file
·103 lines (78 loc) · 2.51 KB
/
JGLOBAL_WAVE_POST_PNT
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
98
99
100
101
102
103
#! /usr/bin/env bash
source "$HOMEgfs/ush/preamble.sh"
export RUN_ENVIR=${RUN_ENVIR:-"nco"}
#############################
# Source relevant config files
#############################
configs="base wave wavepostsbs wavepostpnt"
export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config}
config_path=${EXPDIR:-${NWROOT:-}/gfs.${gfs_ver}/parm/config}
for config in $configs; do
. $config_path/config.$config
status=$?
[[ $status -ne 0 ]] && exit $status
done
##########################################
# Source machine runtime environment
##########################################
. $HOMEgfs/env/${machine}.env wavepostpnt
status=$?
[[ $status -ne 0 ]] && exit $status
# PATH for working directory
export NET=${NET:-gfs}
export RUN=${RUN:-gfs}
export COMPONENT=${COMPONENT:-wave}
export HOMEgefs=${HOMEgefs:-${NWROOT:-}/$NET.${gefs_ver:-}}
export HOMEgfs=${HOMEgfs:-${NWROOT:-}/$NET.${gfs_ver}}
# Add default errchk = err_chk
export errchk=${errchk:-err_chk}
# Create and go to DATA directory
export DATA=${DATA:-${DATAROOT:?}/${jobid}}
mkdir -p $DATA
cd $DATA
export cyc=${cyc:-00}
export cycle=${cycle:-t${cyc}z}
# Set PDY
setpdy.sh
. ./PDY
export CDATE=$PDY$cyc
export pgmout=OUTPUT.$$
export MP_PULSE=0
# Path to HOME Directory
export FIXwave=${FIXwave:-$HOMEgfs/fix/fix_wave_${NET}}
export PARMwave=${PARMwave:-$HOMEgfs/parm/wave}
export USHwave=${USHwave:-$HOMEgfs/ush}
export EXECwave=${EXECwave:-$HOMEgfs/exec}
# Set COM Paths and GETGES environment
if [ $RUN_ENVIR = "nco" ]; then
export ROTDIR=${COMROOT:?}/$NET/$envir
fi
export COMIN=${COMIN:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/$COMPONENT}
export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/$COMPONENT}
mkdir -p $COMOUT/station
# Set wave model ID tag to include member number
# if ensemble; waveMEMB var empty in deterministic
# Set wave model ID tag to include member number
# if ensemble; waveMEMB var empty in deterministic
membTAG='p'
if [ "${waveMEMB}" == "00" ]; then membTAG='c'; fi
export membTAG
export WAV_MOD_TAG=${CDUMP}wave${waveMEMB}
export CFP_VERBOSE=1
export FHMAX_WAV_PNT=${FHMAX_WAV}
export DOSPC_WAV='YES' # Spectral post
export DOBLL_WAV='YES' # Bulletin post
export DOBNDPNT_WAV='NO' #not boundary points
# Execute the Script
$HOMEgfs/scripts/exgfs_wave_post_pnt.sh
err=$?
if [ $err -ne 0 ]; then
echo "FATAL ERROR: ex-script of GWES_POST failed!"
exir ${err}
fi
##########################################
# Remove the Temporary working directory
##########################################
cd $DATAROOT
[[ $KEEPDATA = "NO" ]] && rm -rf $DATA
exit 0