Changeset e4925fb in flexpart.git
- Timestamp:
- Sep 19, 2019, 8:14:24 AM (5 years ago)
- Branches:
- master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug
- Children:
- adead08
- Parents:
- 74d96de
- git-author:
- Ignacio Pisso <ip@…> (08/23/19 10:13:51)
- git-committer:
- Ignacio Pisso <ip@…> (09/19/19 08:14:24)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
create_tarball.sh
r941db73 re4925fb 1 1 #!/bin/bash 2 # Ignacio Pisso, May 2017 2 3 3 4 echo CREATE A NEW FLEXPART DISTRIBUTION 4 5 5 # define version number6 # get current commit hash 6 7 githash=$(git rev-parse --short --verify HEAD) 7 8 echo githash $githash 8 9 version=10. 3.1_$githash9 #define version number with hash 10 version=10.4_$githash 10 11 echo version $version 11 12 … … 14 15 echo targetdir $targetdir 15 16 17 # name distribution version 16 18 distribution_name=flexpart_v$version 17 19 20 # name distribution temporary dir 18 21 tarball_tmp=${targetdir}flexpart_v$version 19 22 echo tarball_tmp $tarball_tmp 20 23 24 # name distribution tarball file 21 25 #tarball=${targetdir}flexpart_v$version.tar 22 26 tarball=${tarball_tmp}.tar 23 27 echo tarball $tarball 24 28 25 # clean old package29 # if needed clean old package 26 30 if [ -d $tarball_tmp ]; then 27 31 echo … … 38 42 fi 39 43 44 # start packing 45 46 47 ## needs in addition to the git repo ANCILLARY git repos 48 # VERIFY THESE RESOURCES EXIST BEFORE PACKING DISTRIBUTION 49 #1 OH file OH_variables.bin || OH_variables=../flexin/OH_FIELDS/OH_variables.bin 50 #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_basic 53 #4 tests/examples ../flex_tests_examples/examples3/* 54 #5 55 #6 56 57 58 59 60 # mkdir container 40 61 echo --------------------------------------------------------- 41 62 echo ')' create basis dir $tarball_tmp … … 45 66 echo 46 67 68 # patnames 47 69 echo --------------------------------------------------------- 48 70 echo ')' copy pathnames … … 53 75 echo 54 76 77 # fortran source files 55 78 echo --------------------------------------------------------- 56 79 echo ')' copy src/ … … 62 85 #cp src/makefile.gfs $tarball_tmp/src 63 86 echo --------------------------------------------------------- 64 ################################################################ 65 66 echo 67 87 88 echo 89 90 # options dir 68 91 echo --------------------------------------------------------- 69 92 echo ')' copy options/ 93 echo --------------------------------------------------------- 70 94 # (for the distribution they work with the defult flex_ecmwf test winds) 71 95 #cp -r options_flex_ecmwf_EA $tarball_tmp/options 72 96 mkdir $tarball_tmp/options 73 74 97 user_input_files="AGECLASSES COMMAND IGBP_int1.dat OUTGRID OUTGRID_NEST RECEPTORS RELEASES surfdata.t surfdepo.t" 75 76 98 for i in $user_input_files 77 99 do … … 80 102 #echo copy $i to $tarball_tmp/options 81 103 done 82 83 84 104 mkdir $tarball_tmp/options/SPECIES 85 105 cp options/SPECIES/SPECIES* $tarball_tmp/options/SPECIES/ 86 106 cp options/SPECIES/specoverview.f90 $tarball_tmp/options/SPECIES/ 87 107 echo copy options/SPECIES/ to $tarball_tmp/options/SPECIES/ 88 89 echo --------------------------------------------------------- 90 91 echo 92 108 echo --------------------------------------------------------- 109 110 echo 111 112 # OH file 113 echo --------------------------------------------------------- 114 echo ')' copy OH_variables.bin to flexin 115 mkdir $tarball_tmp/flexin 116 OH_variables=../flexin/OH_FIELDS/OH_variables.bin 117 cp $OH_variables $tarball_tmp/flexin/ 118 echo --------------------------------------------------------- 119 120 echo 121 122 # AVAILABLE 93 123 echo --------------------------------------------------------- 94 124 echo ')' copy AVAILABLE … … 99 129 echo 100 130 131 # output 101 132 echo --------------------------------------------------------- 102 133 echo ')' create output/ # mkdir $tarball_tmp/output 103 134 mkdir $tarball_tmp/output 104 135 echo --------------------------------------------------------- 105 ################################################################ 106 107 echo 108 136 echo output reference? 137 echo --------------------------------------------------------- 138 139 echo 140 141 # preprocess 109 142 echo --------------------------------------------------------- 110 143 echo ')' preprocess/ 111 144 mkdir $tarball_tmp/preprocess 112 113 echo114 115 145 echo -----------------flex_extract------------------- 116 146 #echo '6)' mkdir $tarball_tmp/flex_extract [a separate repository] … … 118 148 #mkdir $tarball_tmp/preprocess/flex_ecmwf 119 149 mkdir $tarball_tmp/preprocess/flex_extract 120 121 150 #echo '7) add ECMWF retrieve routines (change EA wind files for latest source code)' 122 151 #mkdir $tarball_tmp/preprocess/flex_extract … … 125 154 #cp -r flex_ecmwf_src/* $tarball_tmp/preprocess/flex_extract/ 126 155 ## cp -r flex_extract/work/EA* $tarball_tmp/preprocess/flex_extract/work 127 128 156 flex_extract=../flex_extract_v7.0.4/ 129 157 echo include flex_extract v7.0.4 b7c1c04a204c91e53759ef590504bf52dfaece64 130 158 echo from $flex_extract [use git modules?] IP 3/2018 131 132 159 cp $flex_extract/README.md $tarball_tmp/preprocess/flex_extract 133 160 cp -r $flex_extract/docs $tarball_tmp/preprocess/flex_extract … … 137 164 echo flex_extract copied 138 165 echo --------------------------------------------------------- 139 166 echo AVAILABLE generation scripts? 167 echo --------------------------------------------------------- 140 168 141 169 #echo '10)' cp example generating scripts [a separate repository] 142 170 #echo moved below 143 144 171 #mkdir $tarball_tmp/examples 145 172 #cp -r examples/*.sh $tarball_tmp/examples/ … … 148 175 echo 149 176 150 echo --------------------------------------------------------- 151 ################################################################ 177 # postprocess 178 echo --------------------------------------------------------- 152 179 echo ')' postprocess/ 153 180 … … 155 182 mkdir $tarball_tmp/$postprocess 156 183 echo -----------------flex_read_fortran------------------- 184 flex_read_fortran_src=$postprocess/flex_read_fortran/ 157 185 #echo ')' directory for reading routines 158 186 #echo '12)' add fortran reading routines [a separate repository] … … 161 189 cp $postprocess/flex_read_fortran/*.f90 $tarball_tmp/$postprocess/flex_read_fortran 162 190 cp $postprocess/flex_read_fortran/makefile $tarball_tmp/$postprocess/flex_read_fortran 163 echo flex_read_fortran copied 191 echo flex_read_fortran copied from $flex_read_fortran_src 164 192 165 193 echo -----------------flex_read_matlab------------------- 166 echo flex_read_fortran NOT copied 167 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 168 198 # add matlab reading routines 169 199 #mkdir $tarball_tmp/postprocess/flex_read_matlab … … 178 208 #echo '13) tests' 179 209 mkdir $tarball_tmp/tests 180 echo -----------------flex_read_fortran-------------------210 #echo -----------------flex_read_fortran------------------- 181 211 #echo 'b) ./tests/flex_read_fortran/' 182 echo fixme212 #echo fixme 183 213 #mkdir $tarball_tmp/tests/flex_read_fortran 184 214 #cp tests/flex_read_fortran/test_read_default.sh $tarball_tmp/tests/flex_read_fortran … … 186 216 187 217 ############################################################### 188 echo ----------------- examples-------------------218 echo ----------------- examples ------------------- 189 219 190 220 #echo ') ./tests/examples/' 191 221 mkdir $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 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/ 197 226 # echo USAGE: ~/repos/flexpart/tests/examples'$' make run 198 199 200 ############################################################### 201 echo -----------------postprocess examples------------------- 202 echo --read examples------------------- 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------------------- 203 237 204 238 #echo '13 c) ./tests/read_examples/' 205 239 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/ 206 245 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/ 207 249 cp tests/read_examples/read_headers.sh $tarball_tmp/tests/read_examples/ 208 250 cp tests/read_examples/read_examples_output.txt $tarball_tmp/tests/ #read_examples/ 209 251 # echo USAGE ~/repos/flexpart/tests/read_examples'$'./read_grids.sh 210 252 211 253 ############################################################### 212 echo -- compare examples-------------------254 echo ------------compare examples------------------- 213 255 #echo tests/compare_examples.sh 256 mkdir $tarball_tmp/tests/compare_examples 257 214 258 215 259 #mkdir $tarball_tmp/tests/compare_examples 216 260 #cp tests/compare_examples/compare_grids.sh $tarball_tmp/tests/compare_examples 217 cp tests/compare_grids.sh $tarball_tmp/tests/ 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 218 264 # list of examples with units 219 cp tests/declare_examples $tarball_tmp/tests/265 #cp tests/declare_examples $tarball_tmp/tests/ 220 266 221 267 echo … … 249 295 echo tarball $tarball complete 250 296 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/src 300 echo $HOME/repos/flexpart/src/make_in_laptop.sh 301 echo cd .. ';' ./src/FLEXPART 302 echo cd postprocess/flex_read_fortran 303 echo make test 304 echo max: 0.115784094 mean: 4.70877676E-05 305 #echo cd $tarball_tmp/tests/examples ';' make run 306 echo cd ../../tests/examples ';' make run 307 #echo cd $tarball_tmp/tests/read_examples 308 echo cd ../read_examples 309 echo ./read_examples.sh 310 echo ./read_examples.sh '>' ../read_examples_output.txt 311 echo cd ../compare_examples 312 echo ./compare_grids.sh 313 echo ./compare_grids.sh '>' ../compare_grids_output.txt 314 315 echo e.g. tar --append --file=$tarball_tmp/ ../compare_grids_output.txt ../read_examples_output.txt 316 317 318 319 251 320 exit 252 321 #return
Note: See TracChangeset
for help on using the changeset viewer.