create_tarball.sh 6.22 KB
Newer Older
1 2
#!/bin/bash

3
#define version number
Ignacio Pisso's avatar
Ignacio Pisso committed
4
version=10.3beta5
5

6
# define tarball name
Ignacio Pisso's avatar
Ignacio Pisso committed
7 8
targetdir=../flexpart_distribution/
tarball_tmp=${targetdir}flexpart_v$version 
9 10

# clean old package
Ignacio Pisso's avatar
Ignacio Pisso committed
11 12 13 14 15 16 17 18
if [ -d $tarball_tmp ]; then
  echo $tarball_tmp exists: move to $tarball_tmp.bk   
  mv $tarball_tmp ${tarball_tmp}.bk 
  exit 
fi

echo ---------------------------------------------------------
echo ')' create basic dir structure
19
mkdir $tarball_tmp
Ignacio Pisso's avatar
Ignacio Pisso committed
20 21 22 23 24 25 26 27 28
echo ---------------------------------------------------------
echo ---------------------------------------------------------
##############################################################
echo ')' pathnames 
#cp pathnames_distribution $tarball_tmp/pathnames
cp pathnames $tarball_tmp/pathnames
echo ---------------------------------------------------------
##############################################################
echo ')' src/
29 30
mkdir $tarball_tmp/src
cp src/*.f90 $tarball_tmp/src
31
cp -r src/gributils $tarball_tmp/src 
Ignacio Pisso's avatar
Ignacio Pisso committed
32
# echo '3)' copy makefile
33
cp src/makefile $tarball_tmp/src
34
#cp src/makefile.gfs $tarball_tmp/src
Ignacio Pisso's avatar
Ignacio Pisso committed
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
echo ---------------------------------------------------------
################################################################
echo ')' options 
# (for the distribution they work with the defult flex_ecmwf test winds)
#cp -r options_flex_ecmwf_EA $tarball_tmp/options
mkdir $tarball_tmp/options

user_input_files="AGECLASSES     COMMAND        IGBP_int1.dat  OUTGRID        OUTGRID_NEST   RECEPTORS      RELEASES       surfdata.t     surfdepo.t"

for i in $user_input_files
do
  echo $i
  cp -r options/$i $tarball_tmp/options
done


mkdir $tarball_tmp/options/SPECIES
cp options/SPECIES/SPECIES* $tarball_tmp/options/SPECIES/
cp options/SPECIES/specoverview.f90 $tarball_tmp/options/SPECIES/
echo ---------------------------------------------------------
################################################################
echo ')' AVAILABLE
#cp AVAILABLE_flex_ecmwf_EA $tarball_tmp/AVAILABLE
cp AVAILABLE $tarball_tmp/AVAILABLE

echo ---------------------------------------------------------
################################################################
echo  ')' output / #  mkdir $tarball_tmp/output
mkdir $tarball_tmp/output
echo ---------------------------------------------------------
################################################################
echo ')' preprocess/
67
mkdir $tarball_tmp/preprocess
Ignacio Pisso's avatar
Ignacio Pisso committed
68 69 70 71
#############################
echo -----------------flex_extract-------------------
#echo '6)'  mkdir $tarball_tmp/flex_extract [a separate repository]
#mkdir $tarball_tmp/preprocess
72 73
#mkdir $tarball_tmp/preprocess/flex_ecmwf
mkdir $tarball_tmp/preprocess/flex_extract
Ignacio Pisso's avatar
Ignacio Pisso committed
74 75 76 77

#echo '7)  add ECMWF retrieve routines (change EA wind files for latest source code)'
#mkdir $tarball_tmp/preprocess/flex_extract
#mkdir $tarball_tmp/preprocess/flex_extract/work
78
#cp -r flex_ecmwf_src/* $tarball_tmp/preprocess/flex_ecmwf/
Ignacio Pisso's avatar
Ignacio Pisso committed
79 80
#cp -r flex_ecmwf_src/* $tarball_tmp/preprocess/flex_extract/
## cp -r flex_extract/work/EA* $tarball_tmp/preprocess/flex_extract/work   
81 82 83 84




Ignacio Pisso's avatar
Ignacio Pisso committed
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
#echo '10)' cp example generating scripts [a separate repository]
#echo moved below

#mkdir $tarball_tmp/examples
#cp -r examples/*.sh $tarball_tmp/examples/ 
#cp -r examples/Makefile $tarball_tmp/examples/ 
echo ---------------------------------------------------------
################################################################
echo postprocess/

postprocess=postprocess
mkdir $tarball_tmp/$postprocess
echo -----------------flex_read_fortran-------------------
#echo ')'  directory for reading routines
#echo '12)'  add fortran reading routines [a separate repository]
mkdir $tarball_tmp/$postprocess/flex_read_fortran
cp $postprocess/flex_read_fortran/*.f $tarball_tmp/$postprocess/flex_read_fortran
cp $postprocess/flex_read_fortran/*.f90 $tarball_tmp/$postprocess/flex_read_fortran
cp $postprocess/flex_read_fortran/makefile $tarball_tmp/$postprocess/flex_read_fortran

echo -----------------flex_read_matlab-------------------
106 107

# add matlab reading routines
Ignacio Pisso's avatar
Ignacio Pisso committed
108 109
#mkdir $tarball_tmp/postprocess/flex_read_matlab
#cp postprocess/flex_read_matlab/*.m $tarball_tmp/postprocess/flex_read_matlab
110

Ignacio Pisso's avatar
Ignacio Pisso committed
111
###############################################################
112

Ignacio Pisso's avatar
Ignacio Pisso committed
113 114
echo ---------------------------------------------------------
echo tests/
115

Ignacio Pisso's avatar
Ignacio Pisso committed
116
#echo '13) tests' 
117
mkdir $tarball_tmp/tests
118

Ignacio Pisso's avatar
Ignacio Pisso committed
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
###############################################################
echo -----------------flex_read_fortran-------------------

#echo 'b) ./tests/flex_read_fortran/' 
echo fixme
#mkdir $tarball_tmp/tests/flex_read_fortran
#cp tests/flex_read_fortran/test_read_default.sh  $tarball_tmp/tests/flex_read_fortran

###############################################################
echo -----------------examples-------------------

#echo ') ./tests/examples/' 
mkdir $tarball_tmp/tests/examples
echo ') scripts' 
cp -r ./tests/examples/*.sh $tarball_tmp/tests/examples/ 
echo ') makefile' 
cp -r ./tests/examples/Makefile $tarball_tmp/tests/examples/ 

# echo USAGE: ~/repos/flexpart/tests/examples'$' make run
138 139


Ignacio Pisso's avatar
Ignacio Pisso committed
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
###############################################################
echo -----------------postprocess examples-------------------
echo --read examples-------------------

#echo '13 c) ./tests/read_examples/' 
mkdir $tarball_tmp/tests/read_examples
cp tests/read_examples/read_grids.sh $tarball_tmp/tests/read_examples/
cp tests/read_examples/read_headers.sh $tarball_tmp/tests/read_examples/

# echo USAGE ~/repos/flexpart/tests/read_examples'$'./read_grids.sh

###############################################################
echo --compare examples-------------------
#echo tests/compare_examples.sh

#mkdir $tarball_tmp/tests/compare_examples
#cp tests/compare_examples/compare_grids.sh $tarball_tmp/tests/compare_examples
cp tests/compare_grids.sh $tarball_tmp/tests/
# list of examples with units
cp tests/declare_examples $tarball_tmp/tests/



# ~/repos/flexpart/tests$./compare_grids.sh 

#echo mkdir $tarball_tmp/tests/examples2/
#echo cp tests/examples2/setup.sh $tarball_tmp/tests/examples2/
echo --repeat examples-------------------
#echo FIXME 

###############################################################
echo -----------------ctbto-------------------
mkdir $tarball_tmp/tests/ctbto

# cp -r tests/NILU/test_1 $tarball_tmp/tests/
# cp -r tests/default_cases $tarball_tmp/tests/


exit
179
#return
Ignacio Pisso's avatar
Ignacio Pisso committed
180 181 182
###############################################################


183