forked from NOAA-EMC/CFSv2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJCFS_CDAS_DUMP
More file actions
executable file
·103 lines (79 loc) · 2.83 KB
/
JCFS_CDAS_DUMP
File metadata and controls
executable file
·103 lines (79 loc) · 2.83 KB
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
#!/bin/ksh
set -xa
export PS4='$SECONDS + '
date
# #### 06/12/2006 ##############################################
# SETUP CDAS TROPICAL CYCLONE QC/RELOCATION PROCESSING VARIABLES
# ##############################################################
########################################################
# obtain unique process id (pid) and make temp directory
########################################################
export pid=$$
export DATA=$DATAROOT/$job.$pid
mkdir -p $DATA
cd $DATA
export cycle=t${cyc}z
export tmmark=tm00
export jlogfile=${jlogfile:-/dev/null}
##########################
# Specify NET and RUN Name
##########################
export NET=cfs
export RUN=cdas
export RUN1=cdas1
####################################
# Determine Job Output Name on System
####################################
export pgmout="OUTPUT.${pid}"
##############################
# Run setpdy and initialize PDY variables
##############################
sh setpdy.sh
. ./PDY
export CDATE=${CDATE:-${PDY}$cyc}
##########################################################
# define cfs directories/scripts/executables
##########################################################
export EXECcfs=$HOMEcfs/exec
export PARMcfs=$HOMEcfs/parm
export USHcfs=$HOMEcfs/ush
export FIXcfs=$HOMEcfs/fix
export HOMEdump=$HOMEcfs
export HOMEnst=$HOMEcfs/nstrtg.v1.1.1
export EXECnst=$HOMEnst/exec
export FIXnst=$HOMEnst/fix
##############################################
# Define COM directories
##############################################
export COMROT=$COMROOT/${NET}/${envir}
export COMIN=$COMROOT/${NET}/${envir}/${RUN}.${PDY}
export COMOUT=$COMROOT/${NET}/${envir}/${RUN}.${PDY}
mkdir -m 755 -p $COMOUT
export COMINm1=${COMINm1:-$COMROOT/${NET}/${envir}/${RUN}.${PDYm1}} # for prev day snowdepth.global.grb
##############################################
# Define some INPUT directories
##############################################
export COM_GDAS=${COM_GDAS:-$(compath.py com/gfs/prod)}
export COM_ENGICE=${COM_ENGICE:-$(compath.py com/omb/prod/sice)} ## after 20190613
export COMGDAS=${COMGDAS:-$COM_GDAS/gdas.${PDY}/$cyc/atmos}
export COMGFS=${COMGFS:-$COM_GDAS/gfs.${PDY}/$cyc/atmos}
########################################################################
# execute the script
# Set DUMP_FROM_PROD to NO if getting the dump files from /global/dump
########################################################################
export DUMP_FROM_PROD=${DUMP_FROM_PROD:-YES}
if [ "$DUMP_FROM_PROD" = NO ]
then
${DUMPDV:-$HOMEcfs/scripts/excfs_hpss_dump.sh.ecf}
else
${DUMPSH:-$HOMEcfs/scripts/excfs_cdas_dump.sh.ecf}
fi
cat $pgmout
msg="ENDED NORMALLY."
postmsg "$jlogfile" "$msg"
########################################
# Remove the Temporary working directory
########################################
cd $DATAROOT
if [ ${KEEPDATA:-NO} = NO ] ; then rm -rf $DATA ; fi
date