forked from NOAA-EMC/global-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckout.sh
executable file
·124 lines (114 loc) · 3.69 KB
/
checkout.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#!/bin/sh
#set -xue
set -x
while getopts "oc" option;
do
case $option in
o)
echo "Received -o flag for optional checkout of GTG, will check out GTG with EMC_post"
checkout_gtg="YES"
;;
c)
echo "Received -c flag, check out ufs-weather-model develop branch with CCPP physics"
run_ccpp="YES"
;;
:)
echo "option -$OPTARG needs an argument"
;;
*)
echo "invalid option -$OPTARG, exiting..."
exit
;;
esac
done
topdir=$(pwd)
echo $topdir
echo fv3gfs checkout ...
if [[ ! -d fv3gfs.fd ]] ; then
rm -f ${topdir}/checkout-fv3gfs.log
git clone https://github.com/ufs-community/ufs-weather-model fv3gfs.fd >> ${topdir}/checkout-fv3gfs.log 2>&1
cd fv3gfs.fd
if [ ${run_ccpp:-"NO"} = "NO" ]; then
git checkout GFS.v16.0.16
else
git checkout 9350745855aebe0790813e0ed2ba5ad680e3f75c
fi
git submodule update --init --recursive
cd ${topdir}
else
echo 'Skip. Directory fv3gfs.fd already exists.'
fi
echo gsi checkout ...
if [[ ! -d gsi.fd ]] ; then
rm -f ${topdir}/checkout-gsi.log
git clone --recursive https://github.com/NOAA-EMC/GSI.git gsi.fd >> ${topdir}/checkout-gsi.log 2>&1
cd gsi.fd
git checkout gfsda.v16.0.0
git submodule update
cd ${topdir}
else
echo 'Skip. Directory gsi.fd already exists.'
fi
echo gldas checkout ...
if [[ ! -d gldas.fd ]] ; then
rm -f ${topdir}/checkout-gldas.log
git clone https://github.com/NOAA-EMC/GLDAS.git gldas.fd >> ${topdir}/checkout-gldas.fd.log 2>&1
cd gldas.fd
git checkout gldas_gfsv16_release.v1.13.0
cd ${topdir}
else
echo 'Skip. Directory gldas.fd already exists.'
fi
echo ufs_utils checkout ...
if [[ ! -d ufs_utils.fd ]] ; then
rm -f ${topdir}/checkout-ufs_utils.log
git clone https://github.com/NOAA-EMC/UFS_UTILS.git ufs_utils.fd >> ${topdir}/checkout-ufs_utils.fd.log 2>&1
cd ufs_utils.fd
git checkout ops-gfsv16.0.0
cd ${topdir}
else
echo 'Skip. Directory ufs_utils.fd already exists.'
fi
echo EMC_post checkout ...
if [[ ! -d gfs_post.fd ]] ; then
rm -f ${topdir}/checkout-gfs_post.log
git clone https://github.com/NOAA-EMC/EMC_post.git gfs_post.fd >> ${topdir}/checkout-gfs_post.log 2>&1
cd gfs_post.fd
git checkout upp_gfsv16_release.v1.1.3
################################################################################
# checkout_gtg
## yes: The gtg code at NCAR private repository is available for ops. GFS only.
# Only approved persons/groups have access permission.
## no: No need to check out gtg code for general GFS users.
################################################################################
checkout_gtg=${checkout_gtg:-"NO"}
if [[ ${checkout_gtg} == "YES" ]] ; then
./manage_externals/checkout_externals
cp sorc/post_gtg.fd/*f90 sorc/ncep_post.fd/.
cp sorc/post_gtg.fd/gtg.config.gfs parm/gtg.config.gfs
fi
cd ${topdir}
else
echo 'Skip. Directory gfs_post.fd already exists.'
fi
echo EMC_gfs_wafs checkout ...
if [[ ! -d gfs_wafs.fd ]] ; then
rm -f ${topdir}/checkout-gfs_wafs.log
git clone --recursive https://github.com/NOAA-EMC/EMC_gfs_wafs.git gfs_wafs.fd >> ${topdir}/checkout-gfs_wafs.log 2>&1
cd gfs_wafs.fd
git checkout gfs_wafs.v6.0.21
cd ${topdir}
else
echo 'Skip. Directory gfs_wafs.fd already exists.'
fi
echo EMC_verif-global checkout ...
if [[ ! -d verif-global.fd ]] ; then
rm -f ${topdir}/checkout-verif-global.log
git clone --recursive https://github.com/NOAA-EMC/EMC_verif-global.git verif-global.fd >> ${topdir}/checkout-verif-global.log 2>&1
cd verif-global.fd
git checkout verif_global_v1.13.5
cd ${topdir}
else
echo 'Skip. Directory verif-global.fd already exist.'
fi
exit 0