-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathJEVS_SUBSEASONAL_STATS
executable file
·87 lines (72 loc) · 2.65 KB
/
JEVS_SUBSEASONAL_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
79
80
81
82
83
84
85
86
87
#!/bin/bash
set -x
# ###################################
# SET SHELL PROCESSING VARIABLES
# ###################################
export PS4='$SECONDS + '
date
###########################################################
# obtain unique LSF id (jobid) and make temp directories
###########################################################
export DATA=${DATA:-${DATAROOT:?}/${jobid:?}}
mkdir -p $DATA
cd $DATA
####################################
### Define NET/RUN variables
######################################
export NET=${NET:-evs}
export STEP=${STEP:-stats}
export COMPONENT=${COMPONENT:-subseasonal}
export RUN=${RUN:-atmos}
export machine=${machine:-WCOSS2}
################################################################
# Set data directives
# SENDCOM=YES--Copy files from TMPDIR to $COMOUT
# SENDECF=YES--Flag events on ecflow
# SENDDBN=YES--Issue DBNet Client Calls
################################################################
export SENDCOM=${SENDCOM:-YES}
export SENDDBN=${SENDDBN:-YES} # need to set to NO for testing
export SENDECF=${SENDECF:-YES}
export SENDDBN_NTC=${SENDDBN_NTC:-NO}
################################################################
# Set EVS directories
################################################################
export HOMEevs=${HOMEevs:-${PACKAGEROOT}/${NET}.${evs_ver}}
export EXECevs=${EXECevs:-$HOMEevs/exec}
export PARMevs=${PARMevs:-$HOMEevs/parm}
export USHevs=${USHevs:-$HOMEevs/ush}
export FIXevs=${FIXevs:-$HOMEevs/fix}
if [ $MODELNAME = gefs ] ; then
export members="30"
fi
if [ $MODELNAME = cfs ] ; then
export members="4"
fi
################################################################
# Run setpdy and initialize PDY variables
################################################################
export vhr=${vhr:-00}
export cycle=${cycle:-t${vhr}z}
setpdy.sh 40
. ./PDY
export VDATE=${VDATE:-$PDYm2}
#################################################
# Set up the INPUT and OUTPUT directories
#################################################
export COMIN=${COMIN:-$(compath.py ${envir}/com/$NET/$evs_ver/prep)/$COMPONENT/$RUN}
export EVSINclimo=${EVSINclimo:-$FIXevs/climos/atmos}
export COMOUT=${COMOUT:-$(compath.py -o $NET/$evs_ver/$STEP/$COMPONENT)}
export COMOUTsmall=$COMOUT/$RUN.$VDATE/$MODELNAME/$VERIF_CASE
export COMOUTfinal=$COMOUT/$MODELNAME.$VDATE
mkdir -p $COMOUT $COMOUTfinal
#######################################################################
# Execute the script
#######################################################################
$HOMEevs/scripts/$STEP/$COMPONENT/exevs_${COMPONENT}_${VERIF_CASE}_${STEP}.sh
export err=$?; err_chk
if [ "$KEEPDATA" != "YES" ] ; then
cd $DATAROOT
rm -rf $DATA
fi
date