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