Changes in create_tarball.sh [e4925fb:941db73] in flexpart.git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
create_tarball.sh
re4925fb r941db73 1 1 #!/bin/bash 2 # Ignacio Pisso, May 20173 2 4 3 echo CREATE A NEW FLEXPART DISTRIBUTION 5 4 6 # get current commit hash5 #define version number 7 6 githash=$(git rev-parse --short --verify HEAD) 8 7 echo githash $githash 9 #define version number with hash 10 version=10. 4_$githash8 9 version=10.3.1_$githash 11 10 echo version $version 12 11 … … 15 14 echo targetdir $targetdir 16 15 17 # name distribution version18 16 distribution_name=flexpart_v$version 19 17 20 # name distribution temporary dir21 18 tarball_tmp=${targetdir}flexpart_v$version 22 19 echo tarball_tmp $tarball_tmp 23 20 24 # name distribution tarball file25 21 #tarball=${targetdir}flexpart_v$version.tar 26 22 tarball=${tarball_tmp}.tar 27 23 echo tarball $tarball 28 24 29 # if neededclean old package25 # clean old package 30 26 if [ -d $tarball_tmp ]; then 31 27 echo … … 42 38 fi 43 39 44 # start packing45 46 47 ## needs in addition to the git repo ANCILLARY git repos48 # VERIFY THESE RESOURCES EXIST BEFORE PACKING DISTRIBUTION49 #1 OH file OH_variables.bin || OH_variables=../flexin/OH_FIELDS/OH_variables.bin50 #2 flex_extract || flex_extract=../flex_extract_v7.0.4/51 #3 flex_read_fortran from ../flex_read_matlab/export_basic TODO: add functions to ../flex_read_matlab/export/52 # flex_read_matlab_src=../flex_read_matlab/export_basic53 #4 tests/examples ../flex_tests_examples/examples3/*54 #555 #656 57 58 59 60 # mkdir container61 40 echo --------------------------------------------------------- 62 41 echo ')' create basis dir $tarball_tmp … … 66 45 echo 67 46 68 # patnames69 47 echo --------------------------------------------------------- 70 48 echo ')' copy pathnames … … 75 53 echo 76 54 77 # fortran source files78 55 echo --------------------------------------------------------- 79 56 echo ')' copy src/ … … 85 62 #cp src/makefile.gfs $tarball_tmp/src 86 63 echo --------------------------------------------------------- 64 ################################################################ 87 65 88 66 echo 89 67 90 # options dir91 68 echo --------------------------------------------------------- 92 69 echo ')' copy options/ 93 echo ---------------------------------------------------------94 70 # (for the distribution they work with the defult flex_ecmwf test winds) 95 71 #cp -r options_flex_ecmwf_EA $tarball_tmp/options 96 72 mkdir $tarball_tmp/options 73 97 74 user_input_files="AGECLASSES COMMAND IGBP_int1.dat OUTGRID OUTGRID_NEST RECEPTORS RELEASES surfdata.t surfdepo.t" 75 98 76 for i in $user_input_files 99 77 do … … 102 80 #echo copy $i to $tarball_tmp/options 103 81 done 82 83 104 84 mkdir $tarball_tmp/options/SPECIES 105 85 cp options/SPECIES/SPECIES* $tarball_tmp/options/SPECIES/ 106 86 cp options/SPECIES/specoverview.f90 $tarball_tmp/options/SPECIES/ 107 87 echo copy options/SPECIES/ to $tarball_tmp/options/SPECIES/ 88 108 89 echo --------------------------------------------------------- 109 90 110 91 echo 111 92 112 # OH file113 echo ---------------------------------------------------------114 echo ')' copy OH_variables.bin to flexin115 mkdir $tarball_tmp/flexin116 OH_variables=../flexin/OH_FIELDS/OH_variables.bin117 cp $OH_variables $tarball_tmp/flexin/118 echo ---------------------------------------------------------119 120 echo121 122 # AVAILABLE123 93 echo --------------------------------------------------------- 124 94 echo ')' copy AVAILABLE … … 129 99 echo 130 100 131 # output132 101 echo --------------------------------------------------------- 133 102 echo ')' create output/ # mkdir $tarball_tmp/output 134 103 mkdir $tarball_tmp/output 135 104 echo --------------------------------------------------------- 136 echo output reference? 137 echo --------------------------------------------------------- 138 139 echo 140 141 # preprocess 105 ################################################################ 106 107 echo 108 142 109 echo --------------------------------------------------------- 143 110 echo ')' preprocess/ 144 111 mkdir $tarball_tmp/preprocess 112 113 echo 114 145 115 echo -----------------flex_extract------------------- 146 116 #echo '6)' mkdir $tarball_tmp/flex_extract [a separate repository] … … 148 118 #mkdir $tarball_tmp/preprocess/flex_ecmwf 149 119 mkdir $tarball_tmp/preprocess/flex_extract 120 150 121 #echo '7) add ECMWF retrieve routines (change EA wind files for latest source code)' 151 122 #mkdir $tarball_tmp/preprocess/flex_extract … … 154 125 #cp -r flex_ecmwf_src/* $tarball_tmp/preprocess/flex_extract/ 155 126 ## cp -r flex_extract/work/EA* $tarball_tmp/preprocess/flex_extract/work 127 156 128 flex_extract=../flex_extract_v7.0.4/ 157 129 echo include flex_extract v7.0.4 b7c1c04a204c91e53759ef590504bf52dfaece64 158 130 echo from $flex_extract [use git modules?] IP 3/2018 131 159 132 cp $flex_extract/README.md $tarball_tmp/preprocess/flex_extract 160 133 cp -r $flex_extract/docs $tarball_tmp/preprocess/flex_extract … … 164 137 echo flex_extract copied 165 138 echo --------------------------------------------------------- 166 echo AVAILABLE generation scripts? 167 echo --------------------------------------------------------- 139 168 140 169 141 #echo '10)' cp example generating scripts [a separate repository] 170 142 #echo moved below 143 171 144 #mkdir $tarball_tmp/examples 172 145 #cp -r examples/*.sh $tarball_tmp/examples/ … … 175 148 echo 176 149 177 # postprocess 178 echo --------------------------------------------------------- 150 echo --------------------------------------------------------- 151 ################################################################ 179 152 echo ')' postprocess/ 180 153 … … 182 155 mkdir $tarball_tmp/$postprocess 183 156 echo -----------------flex_read_fortran------------------- 184 flex_read_fortran_src=$postprocess/flex_read_fortran/185 157 #echo ')' directory for reading routines 186 158 #echo '12)' add fortran reading routines [a separate repository] … … 189 161 cp $postprocess/flex_read_fortran/*.f90 $tarball_tmp/$postprocess/flex_read_fortran 190 162 cp $postprocess/flex_read_fortran/makefile $tarball_tmp/$postprocess/flex_read_fortran 191 echo flex_read_fortran copied from $flex_read_fortran_src163 echo flex_read_fortran copied 192 164 193 165 echo -----------------flex_read_matlab------------------- 194 flex_read_matlab_src=../flex_read_matlab/export_basic 195 mkdir $tarball_tmp/$postprocess/flex_read_matlab 196 cp -r $flex_read_matlab_src/* $tarball_tmp/$postprocess/flex_read_matlab 197 echo flex_read_fortran from $flex_read_matlab_src # NOT copied 166 echo flex_read_fortran NOT copied 167 198 168 # add matlab reading routines 199 169 #mkdir $tarball_tmp/postprocess/flex_read_matlab … … 208 178 #echo '13) tests' 209 179 mkdir $tarball_tmp/tests 210 #echo -----------------flex_read_fortran-------------------180 echo -----------------flex_read_fortran------------------- 211 181 #echo 'b) ./tests/flex_read_fortran/' 212 #echo fixme182 echo fixme 213 183 #mkdir $tarball_tmp/tests/flex_read_fortran 214 184 #cp tests/flex_read_fortran/test_read_default.sh $tarball_tmp/tests/flex_read_fortran … … 216 186 217 187 ############################################################### 218 echo ----------------- examples-------------------188 echo -----------------examples------------------- 219 189 220 190 #echo ') ./tests/examples/' 221 191 mkdir $tarball_tmp/tests/examples 222 #echo ') scripts' 223 #cp -r ./tests/examples/*.sh $tarball_tmp/tests/examples/ 224 #echo ') makefile' 225 #cp -r ./tests/examples/Makefile $tarball_tmp/tests/examples/ 192 echo ') scripts' 193 cp -r ./tests/examples/*.sh $tarball_tmp/tests/examples/ 194 echo ') makefile' 195 cp -r ./tests/examples/Makefile $tarball_tmp/tests/examples/ 196 226 197 # echo USAGE: ~/repos/flexpart/tests/examples'$' make run 227 cp -r ../flex_tests_examples/examples3/* $tarball_tmp/tests/examples/ 228 229 echo ----------------- examples_reference ------------------- 230 cp -r ./tests/examples_reference $tarball_tmp/tests/ 231 232 233 234 ############################################################### 235 # echo -----------------postprocess examples------------------- 236 echo -----------------read examples------------------- 198 199 200 ############################################################### 201 echo -----------------postprocess examples------------------- 202 echo --read examples------------------- 237 203 238 204 #echo '13 c) ./tests/read_examples/' 239 205 mkdir $tarball_tmp/tests/read_examples 240 241 cp tests/read_examples/declare_examples $tarball_tmp/tests/read_examples/242 cp tests/read_examples/display_examples.sh $tarball_tmp/tests/read_examples/243 cp tests/read_examples/examples_output.txt $tarball_tmp/tests/read_examples/244 cp tests/read_examples/read_examples.sh $tarball_tmp/tests/read_examples/245 206 cp tests/read_examples/read_grids.sh $tarball_tmp/tests/read_examples/ 246 cp tests/read_examples/read_parts.sh $tarball_tmp/tests/read_examples/247 cp tests/read_examples/set_examples_all $tarball_tmp/tests/read_examples/248 cp tests/read_examples/set_examples_3.sh $tarball_tmp/tests/read_examples/249 207 cp tests/read_examples/read_headers.sh $tarball_tmp/tests/read_examples/ 250 cp tests/read_examples/read_examples_output.txt $tarball_tmp/tests/ #read_examples/ 208 251 209 # echo USAGE ~/repos/flexpart/tests/read_examples'$'./read_grids.sh 252 210 253 211 ############################################################### 254 echo -- ----------compare examples-------------------212 echo --compare examples------------------- 255 213 #echo tests/compare_examples.sh 256 mkdir $tarball_tmp/tests/compare_examples257 258 214 259 215 #mkdir $tarball_tmp/tests/compare_examples 260 216 #cp tests/compare_examples/compare_grids.sh $tarball_tmp/tests/compare_examples 261 #cp tests/compare_grids.sh $tarball_tmp/tests/ 262 cp tests/compare_examples/*.sh $tarball_tmp/tests/compare_examples 263 cp tests/compare_examples/compare_grids_output.txt $tarball_tmp/tests/ #compare_examples 217 cp tests/compare_grids.sh $tarball_tmp/tests/ 264 218 # list of examples with units 265 #cp tests/declare_examples $tarball_tmp/tests/219 cp tests/declare_examples $tarball_tmp/tests/ 266 220 267 221 echo … … 295 249 echo tarball $tarball complete 296 250 echo exported untarred files in $tarball_tmp 297 298 echo cp -r preprocess/flex_extract/work $tarball_tmp/preprocess/flex_extract/299 echo cd $tarball_tmp/src300 echo $HOME/repos/flexpart/src/make_in_laptop.sh301 echo cd .. ';' ./src/FLEXPART302 echo cd postprocess/flex_read_fortran303 echo make test304 echo max: 0.115784094 mean: 4.70877676E-05305 #echo cd $tarball_tmp/tests/examples ';' make run306 echo cd ../../tests/examples ';' make run307 #echo cd $tarball_tmp/tests/read_examples308 echo cd ../read_examples309 echo ./read_examples.sh310 echo ./read_examples.sh '>' ../read_examples_output.txt311 echo cd ../compare_examples312 echo ./compare_grids.sh313 echo ./compare_grids.sh '>' ../compare_grids_output.txt314 315 echo e.g. tar --append --file=$tarball_tmp/ ../compare_grids_output.txt ../read_examples_output.txt316 317 318 319 320 251 exit 321 252 #return
Note: See TracChangeset
for help on using the changeset viewer.