forked from NOAA-EMC/global-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal_savefits.sh
executable file
·105 lines (103 loc) · 2.82 KB
/
global_savefits.sh
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
104
105
#! /usr/bin/env bash
########################################################
# save fit and horiz files for all analysis cycles
########################################################
source "${USHgfs}/preamble.sh"
export FIT_DIR=${FIT_DIR:-$COMOUT/fits}
export HORZ_DIR=${HORZ_DIR:-$COMOUT/horiz}
export fh1=06
export fh2=00
#
#dir=$FIT_DIR/$EXP
dir=$FIT_DIR
if [ ! -d $dir ] ; then
mkdir -p $dir
fi
cd $dir
/bin/cp $COMOUT/f$fh1.raob.$CDATE .
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/f$fh2.raob.$CDATE .
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/f$fh1.sfc.$CDATE .
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/f$fh2.sfc.$CDATE .
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/f$fh1.acar.$CDATE .
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/f$fh2.acar.$CDATE .
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/f$fh1.acft.$CDATE .
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/f$fh2.acft.$CDATE .
[ $? -ne 0 ] && exit 8
export typ=anl
#dir=$HORZ_DIR/$EXP/$typ
dir=$HORZ_DIR/$typ
if [ ! -d $dir ] ; then
mkdir -p $dir
fi
cd $dir
/bin/cp $COMOUT/adpupa.mand.$typ.$CDATE adpupa.mand.$CDATE
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/adpsfc.$typ.$CDATE adpsfc.$CDATE
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/sfcshp.$typ.$CDATE sfcshp.$CDATE
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/aircar.$typ.$CDATE aircar.$CDATE
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/aircft.$typ.$CDATE aircft.$CDATE
[ $? -ne 0 ] && exit 8
#########################################################################
# save fit and horiz files for forecasts verifying at 00Z and 12Z cycles
#########################################################################
hh=$(echo $CDATE | cut -c9-10)
if [[ $hh = "00" || $hh = "12" ]] ; then
if [[ $hh = "00" ]] ; then
export fh1=24
export fh2=48
fi
if [[ $hh = "12" ]] ; then
export fh1=12
export fh2=36
fi
#dir=$FIT_DIR/$EXP
dir=$FIT_DIR
if [ ! -d $dir ] ; then
mkdir -p $dir
fi
cd $dir
/bin/cp $COMOUT/f$fh1.raob.$CDATE .
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/f$fh2.raob.$CDATE .
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/f$fh1.sfc.$CDATE .
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/f$fh2.sfc.$CDATE .
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/f$fh1.acar.$CDATE .
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/f$fh2.acar.$CDATE .
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/f$fh1.acft.$CDATE .
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/f$fh2.acft.$CDATE .
[ $? -ne 0 ] && exit 8
export typ=fcs
#dir=$HORZ_DIR/$EXP/$typ
dir=$HORZ_DIR/$typ
if [ ! -d $dir ] ; then
mkdir -p $dir
fi
cd $dir
/bin/cp $COMOUT/adpupa.mand.$typ.$CDATE adpupa.mand.$CDATE
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/adpsfc.$typ.$CDATE adpsfc.$CDATE
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/sfcshp.$typ.$CDATE sfcshp.$CDATE
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/aircar.$typ.$CDATE aircar.$CDATE
[ $? -ne 0 ] && exit 8
/bin/cp $COMOUT/aircft.$typ.$CDATE aircft.$CDATE
[ $? -ne 0 ] && exit 8
fi
#########################################################################