Maintenance is scheduled between 16:00 and 23:59 CEST (14:00 and 21:59 UTC) on Thursday 2021-10-28. The system may be unavailable at any time during this timeframe. Please plan accordingly.

Commit e4925fb7 authored by Ignacio Pisso's avatar Ignacio Pisso
Browse files

current state for create_tarball.sh: add OH fields.bin to the tarball

cleaned the distribution and included reference runs and comparisons

flexpart 10.4 prerelease, added read and compare output .txt files and
modified the manuscript
parent 74d96de9
#!/bin/bash #!/bin/bash
# Ignacio Pisso, May 2017
echo CREATE A NEW FLEXPART DISTRIBUTION echo CREATE A NEW FLEXPART DISTRIBUTION
#define version number # get current commit hash
githash=$(git rev-parse --short --verify HEAD) githash=$(git rev-parse --short --verify HEAD)
echo githash $githash echo githash $githash
#define version number with hash
version=10.3.1_$githash version=10.4_$githash
echo version $version echo version $version
# define tarball name # define tarball name
targetdir=../flexpart_distribution/ targetdir=../flexpart_distribution/
echo targetdir $targetdir echo targetdir $targetdir
# name distribution version
distribution_name=flexpart_v$version distribution_name=flexpart_v$version
# name distribution temporary dir
tarball_tmp=${targetdir}flexpart_v$version tarball_tmp=${targetdir}flexpart_v$version
echo tarball_tmp $tarball_tmp echo tarball_tmp $tarball_tmp
# name distribution tarball file
#tarball=${targetdir}flexpart_v$version.tar #tarball=${targetdir}flexpart_v$version.tar
tarball=${tarball_tmp}.tar tarball=${tarball_tmp}.tar
echo tarball $tarball echo tarball $tarball
# clean old package # if needed clean old package
if [ -d $tarball_tmp ]; then if [ -d $tarball_tmp ]; then
echo echo
echo clean old tarball echo clean old tarball
...@@ -37,6 +41,23 @@ if [ -d $tarball_tmp ]; then ...@@ -37,6 +41,23 @@ if [ -d $tarball_tmp ]; then
echo echo
fi fi
# start packing
## needs in addition to the git repo ANCILLARY git repos
# VERIFY THESE RESOURCES EXIST BEFORE PACKING DISTRIBUTION
#1 OH file OH_variables.bin || OH_variables=../flexin/OH_FIELDS/OH_variables.bin
#2 flex_extract || flex_extract=../flex_extract_v7.0.4/
#3 flex_read_fortran from ../flex_read_matlab/export_basic TODO: add functions to ../flex_read_matlab/export/
# flex_read_matlab_src=../flex_read_matlab/export_basic
#4 tests/examples ../flex_tests_examples/examples3/*
#5
#6
# mkdir container
echo --------------------------------------------------------- echo ---------------------------------------------------------
echo ')' create basis dir $tarball_tmp echo ')' create basis dir $tarball_tmp
mkdir $tarball_tmp mkdir $tarball_tmp
...@@ -44,6 +65,7 @@ echo --------------------------------------------------------- ...@@ -44,6 +65,7 @@ echo ---------------------------------------------------------
echo echo
# patnames
echo --------------------------------------------------------- echo ---------------------------------------------------------
echo ')' copy pathnames echo ')' copy pathnames
#cp pathnames_distribution $tarball_tmp/pathnames #cp pathnames_distribution $tarball_tmp/pathnames
...@@ -52,6 +74,7 @@ echo --------------------------------------------------------- ...@@ -52,6 +74,7 @@ echo ---------------------------------------------------------
echo echo
# fortran source files
echo --------------------------------------------------------- echo ---------------------------------------------------------
echo ')' copy src/ echo ')' copy src/
mkdir $tarball_tmp/src mkdir $tarball_tmp/src
...@@ -61,35 +84,42 @@ cp -r src/gributils $tarball_tmp/src ...@@ -61,35 +84,42 @@ cp -r src/gributils $tarball_tmp/src
cp src/makefile $tarball_tmp/src cp src/makefile $tarball_tmp/src
#cp src/makefile.gfs $tarball_tmp/src #cp src/makefile.gfs $tarball_tmp/src
echo --------------------------------------------------------- echo ---------------------------------------------------------
################################################################
echo echo
# options dir
echo --------------------------------------------------------- echo ---------------------------------------------------------
echo ')' copy options/ echo ')' copy options/
echo ---------------------------------------------------------
# (for the distribution they work with the defult flex_ecmwf test winds) # (for the distribution they work with the defult flex_ecmwf test winds)
#cp -r options_flex_ecmwf_EA $tarball_tmp/options #cp -r options_flex_ecmwf_EA $tarball_tmp/options
mkdir $tarball_tmp/options mkdir $tarball_tmp/options
user_input_files="AGECLASSES COMMAND IGBP_int1.dat OUTGRID OUTGRID_NEST RECEPTORS RELEASES surfdata.t surfdepo.t" user_input_files="AGECLASSES COMMAND IGBP_int1.dat OUTGRID OUTGRID_NEST RECEPTORS RELEASES surfdata.t surfdepo.t"
for i in $user_input_files for i in $user_input_files
do do
echo $i echo $i
cp -r options/$i $tarball_tmp/options cp -r options/$i $tarball_tmp/options
#echo copy $i to $tarball_tmp/options #echo copy $i to $tarball_tmp/options
done done
mkdir $tarball_tmp/options/SPECIES mkdir $tarball_tmp/options/SPECIES
cp options/SPECIES/SPECIES* $tarball_tmp/options/SPECIES/ cp options/SPECIES/SPECIES* $tarball_tmp/options/SPECIES/
cp options/SPECIES/specoverview.f90 $tarball_tmp/options/SPECIES/ cp options/SPECIES/specoverview.f90 $tarball_tmp/options/SPECIES/
echo copy options/SPECIES/ to $tarball_tmp/options/SPECIES/ echo copy options/SPECIES/ to $tarball_tmp/options/SPECIES/
echo ---------------------------------------------------------
echo
# OH file
echo ---------------------------------------------------------
echo ')' copy OH_variables.bin to flexin
mkdir $tarball_tmp/flexin
OH_variables=../flexin/OH_FIELDS/OH_variables.bin
cp $OH_variables $tarball_tmp/flexin/
echo --------------------------------------------------------- echo ---------------------------------------------------------
echo echo
# AVAILABLE
echo --------------------------------------------------------- echo ---------------------------------------------------------
echo ')' copy AVAILABLE echo ')' copy AVAILABLE
#cp AVAILABLE_flex_ecmwf_EA $tarball_tmp/AVAILABLE #cp AVAILABLE_flex_ecmwf_EA $tarball_tmp/AVAILABLE
...@@ -98,37 +128,34 @@ echo --------------------------------------------------------- ...@@ -98,37 +128,34 @@ echo ---------------------------------------------------------
echo echo
# output
echo --------------------------------------------------------- echo ---------------------------------------------------------
echo ')' create output/ # mkdir $tarball_tmp/output echo ')' create output/ # mkdir $tarball_tmp/output
mkdir $tarball_tmp/output mkdir $tarball_tmp/output
echo --------------------------------------------------------- echo ---------------------------------------------------------
################################################################ echo output reference?
echo ---------------------------------------------------------
echo echo
# preprocess
echo --------------------------------------------------------- echo ---------------------------------------------------------
echo ')' preprocess/ echo ')' preprocess/
mkdir $tarball_tmp/preprocess mkdir $tarball_tmp/preprocess
echo
echo -----------------flex_extract------------------- echo -----------------flex_extract-------------------
#echo '6)' mkdir $tarball_tmp/flex_extract [a separate repository] #echo '6)' mkdir $tarball_tmp/flex_extract [a separate repository]
#mkdir $tarball_tmp/preprocess #mkdir $tarball_tmp/preprocess
#mkdir $tarball_tmp/preprocess/flex_ecmwf #mkdir $tarball_tmp/preprocess/flex_ecmwf
mkdir $tarball_tmp/preprocess/flex_extract mkdir $tarball_tmp/preprocess/flex_extract
#echo '7) add ECMWF retrieve routines (change EA wind files for latest source code)' #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
#mkdir $tarball_tmp/preprocess/flex_extract/work #mkdir $tarball_tmp/preprocess/flex_extract/work
#cp -r flex_ecmwf_src/* $tarball_tmp/preprocess/flex_ecmwf/ #cp -r flex_ecmwf_src/* $tarball_tmp/preprocess/flex_ecmwf/
#cp -r flex_ecmwf_src/* $tarball_tmp/preprocess/flex_extract/ #cp -r flex_ecmwf_src/* $tarball_tmp/preprocess/flex_extract/
## cp -r flex_extract/work/EA* $tarball_tmp/preprocess/flex_extract/work ## cp -r flex_extract/work/EA* $tarball_tmp/preprocess/flex_extract/work
flex_extract=../flex_extract_v7.0.4/ flex_extract=../flex_extract_v7.0.4/
echo include flex_extract v7.0.4 b7c1c04a204c91e53759ef590504bf52dfaece64 echo include flex_extract v7.0.4 b7c1c04a204c91e53759ef590504bf52dfaece64
echo from $flex_extract [use git modules?] IP 3/2018 echo from $flex_extract [use git modules?] IP 3/2018
cp $flex_extract/README.md $tarball_tmp/preprocess/flex_extract cp $flex_extract/README.md $tarball_tmp/preprocess/flex_extract
cp -r $flex_extract/docs $tarball_tmp/preprocess/flex_extract cp -r $flex_extract/docs $tarball_tmp/preprocess/flex_extract
cp -r $flex_extract/grib_templates $tarball_tmp/preprocess/flex_extract cp -r $flex_extract/grib_templates $tarball_tmp/preprocess/flex_extract
...@@ -136,35 +163,38 @@ cp -r $flex_extract/python $tarball_tmp/preprocess/flex_extract ...@@ -136,35 +163,38 @@ cp -r $flex_extract/python $tarball_tmp/preprocess/flex_extract
cp -r $flex_extract/src $tarball_tmp/preprocess/flex_extract cp -r $flex_extract/src $tarball_tmp/preprocess/flex_extract
echo flex_extract copied echo flex_extract copied
echo --------------------------------------------------------- echo ---------------------------------------------------------
echo AVAILABLE generation scripts?
echo ---------------------------------------------------------
#echo '10)' cp example generating scripts [a separate repository] #echo '10)' cp example generating scripts [a separate repository]
#echo moved below #echo moved below
#mkdir $tarball_tmp/examples #mkdir $tarball_tmp/examples
#cp -r examples/*.sh $tarball_tmp/examples/ #cp -r examples/*.sh $tarball_tmp/examples/
#cp -r examples/Makefile $tarball_tmp/examples/ #cp -r examples/Makefile $tarball_tmp/examples/
echo echo
# postprocess
echo --------------------------------------------------------- echo ---------------------------------------------------------
################################################################
echo ')' postprocess/ echo ')' postprocess/
postprocess=postprocess postprocess=postprocess
mkdir $tarball_tmp/$postprocess mkdir $tarball_tmp/$postprocess
echo -----------------flex_read_fortran------------------- echo -----------------flex_read_fortran-------------------
flex_read_fortran_src=$postprocess/flex_read_fortran/
#echo ')' directory for reading routines #echo ')' directory for reading routines
#echo '12)' add fortran reading routines [a separate repository] #echo '12)' add fortran reading routines [a separate repository]
mkdir $tarball_tmp/$postprocess/flex_read_fortran mkdir $tarball_tmp/$postprocess/flex_read_fortran
cp $postprocess/flex_read_fortran/*.f $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/*.f90 $tarball_tmp/$postprocess/flex_read_fortran
cp $postprocess/flex_read_fortran/makefile $tarball_tmp/$postprocess/flex_read_fortran cp $postprocess/flex_read_fortran/makefile $tarball_tmp/$postprocess/flex_read_fortran
echo flex_read_fortran copied echo flex_read_fortran copied from $flex_read_fortran_src
echo -----------------flex_read_matlab------------------- echo -----------------flex_read_matlab-------------------
echo flex_read_fortran NOT copied flex_read_matlab_src=../flex_read_matlab/export_basic
mkdir $tarball_tmp/$postprocess/flex_read_matlab
cp -r $flex_read_matlab_src/* $tarball_tmp/$postprocess/flex_read_matlab
echo flex_read_fortran from $flex_read_matlab_src # NOT copied
# add matlab reading routines # add matlab reading routines
#mkdir $tarball_tmp/postprocess/flex_read_matlab #mkdir $tarball_tmp/postprocess/flex_read_matlab
#cp postprocess/flex_read_matlab/*.m $tarball_tmp/postprocess/flex_read_matlab #cp postprocess/flex_read_matlab/*.m $tarball_tmp/postprocess/flex_read_matlab
...@@ -177,46 +207,62 @@ echo ')' tests/ ...@@ -177,46 +207,62 @@ echo ')' tests/
############################################################### ###############################################################
#echo '13) tests' #echo '13) tests'
mkdir $tarball_tmp/tests mkdir $tarball_tmp/tests
echo -----------------flex_read_fortran------------------- #echo -----------------flex_read_fortran-------------------
#echo 'b) ./tests/flex_read_fortran/' #echo 'b) ./tests/flex_read_fortran/'
echo fixme #echo fixme
#mkdir $tarball_tmp/tests/flex_read_fortran #mkdir $tarball_tmp/tests/flex_read_fortran
#cp tests/flex_read_fortran/test_read_default.sh $tarball_tmp/tests/flex_read_fortran #cp tests/flex_read_fortran/test_read_default.sh $tarball_tmp/tests/flex_read_fortran
############################################################### ###############################################################
echo -----------------examples------------------- echo ----------------- examples -------------------
#echo ') ./tests/examples/' #echo ') ./tests/examples/'
mkdir $tarball_tmp/tests/examples mkdir $tarball_tmp/tests/examples
echo ') scripts' #echo ') scripts'
cp -r ./tests/examples/*.sh $tarball_tmp/tests/examples/ #cp -r ./tests/examples/*.sh $tarball_tmp/tests/examples/
echo ') makefile' #echo ') makefile'
cp -r ./tests/examples/Makefile $tarball_tmp/tests/examples/ #cp -r ./tests/examples/Makefile $tarball_tmp/tests/examples/
# echo USAGE: ~/repos/flexpart/tests/examples'$' make run # echo USAGE: ~/repos/flexpart/tests/examples'$' make run
cp -r ../flex_tests_examples/examples3/* $tarball_tmp/tests/examples/
echo ----------------- examples_reference -------------------
cp -r ./tests/examples_reference $tarball_tmp/tests/
############################################################### ###############################################################
echo -----------------postprocess examples------------------- # echo -----------------postprocess examples-------------------
echo --read examples------------------- echo -----------------read examples-------------------
#echo '13 c) ./tests/read_examples/' #echo '13 c) ./tests/read_examples/'
mkdir $tarball_tmp/tests/read_examples mkdir $tarball_tmp/tests/read_examples
cp tests/read_examples/declare_examples $tarball_tmp/tests/read_examples/
cp tests/read_examples/display_examples.sh $tarball_tmp/tests/read_examples/
cp tests/read_examples/examples_output.txt $tarball_tmp/tests/read_examples/
cp tests/read_examples/read_examples.sh $tarball_tmp/tests/read_examples/
cp tests/read_examples/read_grids.sh $tarball_tmp/tests/read_examples/ cp tests/read_examples/read_grids.sh $tarball_tmp/tests/read_examples/
cp tests/read_examples/read_parts.sh $tarball_tmp/tests/read_examples/
cp tests/read_examples/set_examples_all $tarball_tmp/tests/read_examples/
cp tests/read_examples/set_examples_3.sh $tarball_tmp/tests/read_examples/
cp tests/read_examples/read_headers.sh $tarball_tmp/tests/read_examples/ cp tests/read_examples/read_headers.sh $tarball_tmp/tests/read_examples/
cp tests/read_examples/read_examples_output.txt $tarball_tmp/tests/ #read_examples/
# echo USAGE ~/repos/flexpart/tests/read_examples'$'./read_grids.sh # echo USAGE ~/repos/flexpart/tests/read_examples'$'./read_grids.sh
############################################################### ###############################################################
echo --compare examples------------------- echo ------------compare examples-------------------
#echo tests/compare_examples.sh #echo tests/compare_examples.sh
mkdir $tarball_tmp/tests/compare_examples
#mkdir $tarball_tmp/tests/compare_examples #mkdir $tarball_tmp/tests/compare_examples
#cp tests/compare_examples/compare_grids.sh $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/ #cp tests/compare_grids.sh $tarball_tmp/tests/
cp tests/compare_examples/*.sh $tarball_tmp/tests/compare_examples
cp tests/compare_examples/compare_grids_output.txt $tarball_tmp/tests/ #compare_examples
# list of examples with units # list of examples with units
cp tests/declare_examples $tarball_tmp/tests/ #cp tests/declare_examples $tarball_tmp/tests/
echo echo
...@@ -248,6 +294,29 @@ pwd ...@@ -248,6 +294,29 @@ pwd
echo tarball $tarball complete echo tarball $tarball complete
echo exported untarred files in $tarball_tmp echo exported untarred files in $tarball_tmp
echo cp -r preprocess/flex_extract/work $tarball_tmp/preprocess/flex_extract/
echo cd $tarball_tmp/src
echo $HOME/repos/flexpart/src/make_in_laptop.sh
echo cd .. ';' ./src/FLEXPART
echo cd postprocess/flex_read_fortran
echo make test
echo max: 0.115784094 mean: 4.70877676E-05
#echo cd $tarball_tmp/tests/examples ';' make run
echo cd ../../tests/examples ';' make run
#echo cd $tarball_tmp/tests/read_examples
echo cd ../read_examples
echo ./read_examples.sh
echo ./read_examples.sh '>' ../read_examples_output.txt
echo cd ../compare_examples
echo ./compare_grids.sh
echo ./compare_grids.sh '>' ../compare_grids_output.txt
echo e.g. tar --append --file=$tarball_tmp/ ../compare_grids_output.txt ../read_examples_output.txt
exit exit
#return #return
############################################################### ###############################################################
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment