source: flexpart.git/create_tarball.sh @ 348abf6

10.4.1_peseiGFS_025bugfixes+enhancementsdevrelease-10release-10.4.1scaling-bug
Last change on this file since 348abf6 was 348abf6, checked in by Ignacio Pisso <ip@…>, 5 years ago

changes to create_tarball.sh

  • Property mode set to 100755
File size: 6.5 KB
Line 
1#!/bin/bash
2
3#define version number
4
5githash=$(git rev-parse --short --verify HEAD)
6
7
8version=10.3beta5_$githash
9
10# define tarball name
11targetdir=../flexpart_distribution/
12tarball_tmp=${targetdir}flexpart_v$version 
13#tarball=${targetdir}flexpart_v$version.tar
14tarball=${tarball_tmp}.tar
15
16# clean old package
17if [ -d $tarball_tmp ]; then
18  echo $tarball_tmp exists: move to $tarball_tmp.bk and exit 
19  mkdir $tarball_tmp.bk
20  mv $tarball_tmp ${tarball_tmp}.bk/
21  mv $tarball ${tarball_tmp}.bk/
22  exit
23fi
24
25echo ---------------------------------------------------------
26echo ')' create basic dir structure
27mkdir $tarball_tmp
28echo ---------------------------------------------------------
29echo ---------------------------------------------------------
30##############################################################
31echo ')' pathnames
32#cp pathnames_distribution $tarball_tmp/pathnames
33cp pathnames $tarball_tmp/pathnames
34echo ---------------------------------------------------------
35##############################################################
36echo ')' src/
37mkdir $tarball_tmp/src
38cp src/*.f90 $tarball_tmp/src
39cp -r src/gributils $tarball_tmp/src
40# echo '3)' copy makefile
41cp src/makefile $tarball_tmp/src
42#cp src/makefile.gfs $tarball_tmp/src
43echo ---------------------------------------------------------
44################################################################
45echo ')' options
46# (for the distribution they work with the defult flex_ecmwf test winds)
47#cp -r options_flex_ecmwf_EA $tarball_tmp/options
48mkdir $tarball_tmp/options
49
50user_input_files="AGECLASSES     COMMAND        IGBP_int1.dat  OUTGRID        OUTGRID_NEST   RECEPTORS      RELEASES       surfdata.t     surfdepo.t"
51
52for i in $user_input_files
53do
54  echo $i
55  cp -r options/$i $tarball_tmp/options
56done
57
58
59mkdir $tarball_tmp/options/SPECIES
60cp options/SPECIES/SPECIES* $tarball_tmp/options/SPECIES/
61cp options/SPECIES/specoverview.f90 $tarball_tmp/options/SPECIES/
62echo ---------------------------------------------------------
63################################################################
64echo ')' AVAILABLE
65#cp AVAILABLE_flex_ecmwf_EA $tarball_tmp/AVAILABLE
66cp AVAILABLE $tarball_tmp/AVAILABLE
67
68echo ---------------------------------------------------------
69################################################################
70echo  ')' output / #  mkdir $tarball_tmp/output
71mkdir $tarball_tmp/output
72echo ---------------------------------------------------------
73################################################################
74echo ')' preprocess/
75mkdir $tarball_tmp/preprocess
76#############################
77echo -----------------flex_extract-------------------
78#echo '6)'  mkdir $tarball_tmp/flex_extract [a separate repository]
79#mkdir $tarball_tmp/preprocess
80#mkdir $tarball_tmp/preprocess/flex_ecmwf
81mkdir $tarball_tmp/preprocess/flex_extract
82
83#echo '7)  add ECMWF retrieve routines (change EA wind files for latest source code)'
84#mkdir $tarball_tmp/preprocess/flex_extract
85#mkdir $tarball_tmp/preprocess/flex_extract/work
86#cp -r flex_ecmwf_src/* $tarball_tmp/preprocess/flex_ecmwf/
87#cp -r flex_ecmwf_src/* $tarball_tmp/preprocess/flex_extract/
88## cp -r flex_extract/work/EA* $tarball_tmp/preprocess/flex_extract/work   
89
90
91
92
93#echo '10)' cp example generating scripts [a separate repository]
94#echo moved below
95
96#mkdir $tarball_tmp/examples
97#cp -r examples/*.sh $tarball_tmp/examples/
98#cp -r examples/Makefile $tarball_tmp/examples/
99echo ---------------------------------------------------------
100################################################################
101echo postprocess/
102
103postprocess=postprocess
104mkdir $tarball_tmp/$postprocess
105echo -----------------flex_read_fortran-------------------
106#echo ')'  directory for reading routines
107#echo '12)'  add fortran reading routines [a separate repository]
108mkdir $tarball_tmp/$postprocess/flex_read_fortran
109cp $postprocess/flex_read_fortran/*.f $tarball_tmp/$postprocess/flex_read_fortran
110cp $postprocess/flex_read_fortran/*.f90 $tarball_tmp/$postprocess/flex_read_fortran
111cp $postprocess/flex_read_fortran/makefile $tarball_tmp/$postprocess/flex_read_fortran
112
113echo -----------------flex_read_matlab-------------------
114
115# add matlab reading routines
116#mkdir $tarball_tmp/postprocess/flex_read_matlab
117#cp postprocess/flex_read_matlab/*.m $tarball_tmp/postprocess/flex_read_matlab
118
119###############################################################
120
121echo ---------------------------------------------------------
122echo tests/
123
124#echo '13) tests'
125mkdir $tarball_tmp/tests
126
127###############################################################
128echo -----------------flex_read_fortran-------------------
129
130#echo 'b) ./tests/flex_read_fortran/'
131echo fixme
132#mkdir $tarball_tmp/tests/flex_read_fortran
133#cp tests/flex_read_fortran/test_read_default.sh  $tarball_tmp/tests/flex_read_fortran
134
135###############################################################
136echo -----------------examples-------------------
137
138#echo ') ./tests/examples/'
139mkdir $tarball_tmp/tests/examples
140echo ') scripts' 
141cp -r ./tests/examples/*.sh $tarball_tmp/tests/examples/
142echo ') makefile' 
143cp -r ./tests/examples/Makefile $tarball_tmp/tests/examples/
144
145# echo USAGE: ~/repos/flexpart/tests/examples'$' make run
146
147
148###############################################################
149echo -----------------postprocess examples-------------------
150echo --read examples-------------------
151
152#echo '13 c) ./tests/read_examples/'
153mkdir $tarball_tmp/tests/read_examples
154cp tests/read_examples/read_grids.sh $tarball_tmp/tests/read_examples/
155cp tests/read_examples/read_headers.sh $tarball_tmp/tests/read_examples/
156
157# echo USAGE ~/repos/flexpart/tests/read_examples'$'./read_grids.sh
158
159###############################################################
160echo --compare examples-------------------
161#echo tests/compare_examples.sh
162
163#mkdir $tarball_tmp/tests/compare_examples
164#cp tests/compare_examples/compare_grids.sh $tarball_tmp/tests/compare_examples
165cp tests/compare_grids.sh $tarball_tmp/tests/
166# list of examples with units
167cp tests/declare_examples $tarball_tmp/tests/
168
169
170
171# ~/repos/flexpart/tests$./compare_grids.sh
172
173#echo mkdir $tarball_tmp/tests/examples2/
174#echo cp tests/examples2/setup.sh $tarball_tmp/tests/examples2/
175echo --repeat examples-------------------
176#echo FIXME
177
178###############################################################
179echo -----------------ctbto-------------------
180mkdir $tarball_tmp/tests/ctbto
181
182# cp -r tests/NILU/test_1 $tarball_tmp/tests/
183# cp -r tests/default_cases $tarball_tmp/tests/
184
185tar cvf  $tarball  $tarball_tmp 
186
187echo  $tarball complete
188echo exported untarred files in $tarball_tmp 
189exit
190#return
191###############################################################
192
193
194
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG