forked from NOAA-EMC/EVS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJEVS_RTOFS_STATS
executable file
·78 lines (63 loc) · 2.29 KB
/
JEVS_RTOFS_STATS
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
#!/bin/bash
###############################################################################
# Job Name: JEVS_RTOFS_STATS
# Purpose: To create stat files for RTOFS forecast verification using
# MET/METplus.
# Author: L. Gwen Chen (lichuan.chen@noaa.gov)
###############################################################################
set -x
# Preliminary data setup step
########################################
export SENDCOM=${SENDCOM:-YES}
export SENDDBN=${SENDDBN:-YES}
export SENDECF=${SENDECF:-YES}
export SENDMAIL=${SENDMAIL:-NO}
# ###################################
# SET SHELL PROCESSING VARIABLES
# ###################################
export PS4='$SECONDS + '
date
###########################################################
# obtain unique LSF id (jobid) and make temp directories
###########################################################
export pid=$$
export DATA=${DATA:-${DATAROOT:?}/${jobid:?}}
mkdir -p $DATA
cd $DATA
###################################
# Set EVS directories
####################################
export HOMEevs=${HOMEevs:-${PACKAGEROOT}/${NET}.${evs_ver}}
export EXECevs=${EXECevs:-$HOMEevs/exec}
export FIXevs=${FIXevs:-$HOMEevs/fix}
export PARMevs=${PARMevs:-$HOMEevs/parm}
export SCRIPTSevs=${SCRIPTSevs:-$HOMEevs/scripts}
export CONFIGevs=${CONFIGevs:-$HOMEevs/parm/metplus_config}
export USHevs=${USHevs:-$HOMEevs/ush}
export MASKS=${MASKS:-$FIXevs/masks}
# Run setpdy and initialize PDY variables
export vhr=${vhr:-"00"}
export cycle=${cycle:-t${vhr}z}
setpdy.sh
. ./PDY
export VDATE=${VDATE:-$PDYm2}
####################################
# Define NET/RUN variables
####################################
export NET=${NET:-evs}
export STEP=${STEP:-prep}
export COMPONENT=${COMPONENT:-rtofs}
# define COMIN/COMOUT variables
export COMIN=${COMIN:-$(compath.py $envir/com/$NET/${evs_ver})}
export COMOUT=${COMOUT:-$(compath.py -o $NET/${evs_ver})}
export COMOUTsmall=${COMOUTsmall:-$COMOUT/$STEP/$COMPONENT/$RUN.$VDATE}
export COMOUTfinal=${COMOUTfinal:-$COMOUT/$STEP/$COMPONENT/$COMPONENT.$VDATE}
mkdir -p $COMOUT $COMOUTsmall $COMOUTfinal
$HOMEevs/scripts/$STEP/$COMPONENT/exevs_${COMPONENT}_${RUN}_${STEP}.sh
export err=$?; err_chk
if [ "$KEEPDATA" != "YES" ] ; then
cd $DATAROOT
rm -rf $DATA
fi
date
################################# END OF JOB ##################################