forked from global-hydrodynamics/CaMa-Flood_v4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive_pkg.sh
executable file
·192 lines (158 loc) · 3.58 KB
/
archive_pkg.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
#!/bin/sh
TAG=`date '+%Y%m%d'`
VER="v400"
BASE=`pwd`
DIR="CaMa-Flood_${VER}_${TAG}"
mkdir $DIR
cd $DIR
PKGBASE=`pwd`
cd $PKGBASE
#export COPYFILE_DISABLE=1
#tar czvf ${DIR}.tar.gz --exclude='.DS_Store' ${DIR}
#exit
##### Adm #####
cp -r ${BASE}/adm .
cd adm
pwd
rm -f ./.* 2> /dev/null
cd $PKGBASE
##### Util #####
cp -r ${BASE}/util .
cd util
pwd
rm -f ./.* 2> /dev/null
cd $PKGBASE
##### Src #####
mkdir -p src
cd src
pwd
cp ${BASE}/src/Makefile .
cp ${BASE}/src/*.F90 .
rm -f ./.* 2> /dev/null
cp -r ${BASE}/src/MOJ .
rm -f ./MOJ/.* 2> /dev/null
cd $PKGBASE
##### Map #####
mkdir -p map
cd map
pwd
cp -r ${BASE}/map/data .
rm -f ./data/.* 2> /dev/null
mkdir -p src
cd src
mkdir src_param
cd src_param
pwd
cp ${BASE}/map/src/src_param/Makefile .
cp ${BASE}/map/src/src_param/*.F90 .
cp ${BASE}/map/src/src_param/*.sh .
rm -f ./.* 2> /dev/null
cd ..
mkdir src_region
cd src_region
pwd
cp ${BASE}/map/src/src_region/Makefile .
cp ${BASE}/map/src/src_region/*.F90 .
cp ${BASE}/map/src/src_region/*.sh .
cp ${BASE}/map/src/src_region/*.txt .
rm -f ./.* 2> /dev/null
cd ..
cd ..
MAPDIR='glb_15min'
echo map/$MAPDIR
cp -r ${BASE}/map/$MAPDIR .
rm -f ./${MAPDIR}/.* 2> /dev/null
rm -f ./${MAPDIR}/*/.* 2> /dev/null
MAPDIR='conus_06min'
echo map/$MAPDIR
cp -r ${BASE}/map/$MAPDIR .
rm -f ./${MAPDIR}/.* 2> /dev/null
rm -f ./${MAPDIR}/*/.* 2> /dev/null
MAPDIR='tej_01min'
echo map/$MAPDIR
cp -r ${BASE}/map/$MAPDIR .
rm -f ./${MAPDIR}/.* 2> /dev/null
rm -f ./${MAPDIR}/*/.* 2> /dev/null
cd $PKGBASE
##### gosh #####
mkdir -p gosh
cd gosh
pwd
cp ${BASE}/gosh/compile.sh .
cp ${BASE}/gosh/test*.sh .
rm -f ./.* 2> /dev/null
cd $PKGBASE
##### Input #####
mkdir -p inp
cd inp
pwd
ROFF="test_1deg"
echo inp/$ROFF
cp -r ${BASE}/inp/$ROFF .
rm -f ./${ROFF}/.* 2> /dev/null
ROFF="test_15min_nc"
echo inp/$ROFF
cp -r ${BASE}/inp/$ROFF .
rm -f ./${ROFF}/.* 2> /dev/null
ROFF="test_jpn_1hr"
echo inp/$ROFF
cp -r ${BASE}/inp/$ROFF .
rm -f ./${ROFF}/.* 2> /dev/null
cd $PKGBASE
##### Output #####
mkdir -p out
cd out
pwd
# cp -r ${BASE}/out/src .
# rm -f .*
cd $PKGBASE
##### etc #####
mkdir -p etc
cd etc
pwd
PROJ="downscale_flddph"
mkdir $PROJ
cd $PROJ
cp ${BASE}/etc/$PROJ/*.sh .
cp ${BASE}/etc/$PROJ/*.py .
cp -r ${BASE}/etc/$PROJ/src .
cd src
make clean
cd ..
rm -f ./.* 2> /dev/null
rm -f ./src/.* 2> /dev/null
cd ..
PROJ="flood_duration"
mkdir $PROJ
cd $PROJ
cp ${BASE}/etc/$PROJ/*.sh .
cp ${BASE}/etc/$PROJ/*.py .
cp -r ${BASE}/etc/$PROJ/src .
cd src
make clean
cd ..
rm -f ./.* 2> /dev/null
rm -f ./src/.* 2> /dev/null
cd ..
PROJ="runoff_preset"
mkdir $PROJ
cd $PROJ
cp ${BASE}/etc/$PROJ/*.sh .
cp ${BASE}/etc/$PROJ/*.py .
cp -r ${BASE}/etc/$PROJ/src .
cd src
make clean
cd ..
rm -f ./.* 2> /dev/null
rm -f ./src/.* 2> /dev/null
cd ..
cd $PKGBASE
###
cp -r ${BASE}/doc .
rm -f ./doc/.* 2> /dev/null
cp ${BASE}/archive_pkg.sh .
cp ${BASE}/archive_src.sh .
#===========
cd ${BASE}
export COPYFILE_DISABLE=1
tar czvf ${DIR}.tar.gz --exclude='.DS_Store' ${DIR}