Changeset e4925fb in flexpart.git


Ignore:
Timestamp:
Sep 19, 2019, 8:14:24 AM (5 years ago)
Author:
Ignacio Pisso <ip@…>
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)
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • create_tarball.sh

    r941db73 re4925fb  
    11#!/bin/bash
     2# Ignacio Pisso, May 2017
    23
    34echo CREATE A NEW FLEXPART DISTRIBUTION
    45
    5 #define version number
     6# get current commit hash
    67githash=$(git rev-parse --short --verify HEAD)
    78echo githash $githash
    8 
    9 version=10.3.1_$githash
     9#define version number with hash
     10version=10.4_$githash
    1011echo version $version 
    1112
     
    1415echo targetdir $targetdir
    1516
     17# name distribution version
    1618distribution_name=flexpart_v$version
    1719
     20# name distribution temporary dir
    1821tarball_tmp=${targetdir}flexpart_v$version
    1922echo tarball_tmp $tarball_tmp
    2023
     24# name distribution tarball file
    2125#tarball=${targetdir}flexpart_v$version.tar
    2226tarball=${tarball_tmp}.tar
    2327echo tarball $tarball
    2428
    25 # clean old package
     29# if needed clean old package
    2630if [ -d $tarball_tmp ]; then
    2731  echo
     
    3842fi
    3943
     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
    4061echo ---------------------------------------------------------
    4162echo ')' create basis dir $tarball_tmp
     
    4566echo
    4667
     68# patnames
    4769echo ---------------------------------------------------------
    4870echo ')' copy pathnames
     
    5375echo
    5476
     77# fortran source files
    5578echo ---------------------------------------------------------
    5679echo ')' copy src/
     
    6285#cp src/makefile.gfs $tarball_tmp/src
    6386echo ---------------------------------------------------------
    64 ################################################################
    65 
    66 echo
    67 
     87
     88echo
     89
     90# options dir
    6891echo ---------------------------------------------------------
    6992echo ')' copy options/
     93echo ---------------------------------------------------------
    7094# (for the distribution they work with the defult flex_ecmwf test winds)
    7195#cp -r options_flex_ecmwf_EA $tarball_tmp/options
    7296mkdir $tarball_tmp/options
    73 
    7497user_input_files="AGECLASSES     COMMAND        IGBP_int1.dat  OUTGRID        OUTGRID_NEST   RECEPTORS      RELEASES       surfdata.t     surfdepo.t"
    75 
    7698for i in $user_input_files
    7799do
     
    80102  #echo copy $i to $tarball_tmp/options
    81103done
    82 
    83 
    84104mkdir $tarball_tmp/options/SPECIES
    85105cp options/SPECIES/SPECIES* $tarball_tmp/options/SPECIES/
    86106cp options/SPECIES/specoverview.f90 $tarball_tmp/options/SPECIES/
    87107echo copy options/SPECIES/ to $tarball_tmp/options/SPECIES/
    88 
    89 echo ---------------------------------------------------------
    90 
    91 echo
    92 
     108echo ---------------------------------------------------------
     109
     110echo
     111
     112# OH file
     113echo ---------------------------------------------------------
     114echo ')' copy OH_variables.bin to flexin
     115mkdir $tarball_tmp/flexin
     116OH_variables=../flexin/OH_FIELDS/OH_variables.bin
     117cp $OH_variables $tarball_tmp/flexin/
     118echo ---------------------------------------------------------
     119
     120echo
     121
     122# AVAILABLE
    93123echo ---------------------------------------------------------
    94124echo ')' copy AVAILABLE
     
    99129echo
    100130
     131# output
    101132echo ---------------------------------------------------------
    102133echo  ')' create output/ #  mkdir $tarball_tmp/output
    103134mkdir $tarball_tmp/output
    104135echo ---------------------------------------------------------
    105 ################################################################
    106 
    107 echo
    108 
     136echo output reference?
     137echo ---------------------------------------------------------
     138
     139echo
     140
     141# preprocess
    109142echo ---------------------------------------------------------
    110143echo ')' preprocess/
    111144mkdir $tarball_tmp/preprocess
    112 
    113 echo
    114 
    115145echo -----------------flex_extract-------------------
    116146#echo '6)'  mkdir $tarball_tmp/flex_extract [a separate repository]
     
    118148#mkdir $tarball_tmp/preprocess/flex_ecmwf
    119149mkdir $tarball_tmp/preprocess/flex_extract
    120 
    121150#echo '7)  add ECMWF retrieve routines (change EA wind files for latest source code)'
    122151#mkdir $tarball_tmp/preprocess/flex_extract
     
    125154#cp -r flex_ecmwf_src/* $tarball_tmp/preprocess/flex_extract/
    126155## cp -r flex_extract/work/EA* $tarball_tmp/preprocess/flex_extract/work   
    127 
    128156flex_extract=../flex_extract_v7.0.4/
    129157echo include flex_extract v7.0.4 b7c1c04a204c91e53759ef590504bf52dfaece64
    130158echo from $flex_extract [use git modules?] IP 3/2018
    131 
    132159cp $flex_extract/README.md $tarball_tmp/preprocess/flex_extract
    133160cp -r $flex_extract/docs $tarball_tmp/preprocess/flex_extract
     
    137164echo flex_extract copied
    138165echo ---------------------------------------------------------
    139 
     166echo AVAILABLE generation scripts?
     167echo ---------------------------------------------------------
    140168
    141169#echo '10)' cp example generating scripts [a separate repository]
    142170#echo moved below
    143 
    144171#mkdir $tarball_tmp/examples
    145172#cp -r examples/*.sh $tarball_tmp/examples/
     
    148175echo
    149176
    150 echo ---------------------------------------------------------
    151 ################################################################
     177# postprocess
     178echo ---------------------------------------------------------
    152179echo ')' postprocess/
    153180
     
    155182mkdir $tarball_tmp/$postprocess
    156183echo -----------------flex_read_fortran-------------------
     184flex_read_fortran_src=$postprocess/flex_read_fortran/
    157185#echo ')'  directory for reading routines
    158186#echo '12)'  add fortran reading routines [a separate repository]
     
    161189cp $postprocess/flex_read_fortran/*.f90 $tarball_tmp/$postprocess/flex_read_fortran
    162190cp $postprocess/flex_read_fortran/makefile $tarball_tmp/$postprocess/flex_read_fortran
    163 echo flex_read_fortran copied
     191echo flex_read_fortran copied from $flex_read_fortran_src
    164192
    165193echo -----------------flex_read_matlab-------------------
    166 echo flex_read_fortran NOT copied
    167 
     194flex_read_matlab_src=../flex_read_matlab/export_basic
     195mkdir $tarball_tmp/$postprocess/flex_read_matlab
     196cp -r $flex_read_matlab_src/* $tarball_tmp/$postprocess/flex_read_matlab
     197echo flex_read_fortran from $flex_read_matlab_src  # NOT copied
    168198# add matlab reading routines
    169199#mkdir $tarball_tmp/postprocess/flex_read_matlab
     
    178208#echo '13) tests'
    179209mkdir $tarball_tmp/tests
    180 echo -----------------flex_read_fortran-------------------
     210#echo -----------------flex_read_fortran-------------------
    181211#echo 'b) ./tests/flex_read_fortran/'
    182 echo fixme
     212#echo fixme
    183213#mkdir $tarball_tmp/tests/flex_read_fortran
    184214#cp tests/flex_read_fortran/test_read_default.sh  $tarball_tmp/tests/flex_read_fortran
     
    186216
    187217###############################################################
    188 echo -----------------examples-------------------
     218echo ----------------- examples -------------------
    189219
    190220#echo ') ./tests/examples/'
    191221mkdir $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/
    197226# echo USAGE: ~/repos/flexpart/tests/examples'$' make run
    198 
    199 
    200 ###############################################################
    201 echo -----------------postprocess examples-------------------
    202 echo --read examples-------------------
     227cp -r ../flex_tests_examples/examples3/* $tarball_tmp/tests/examples/
     228
     229echo ----------------- examples_reference -------------------
     230cp -r ./tests/examples_reference $tarball_tmp/tests/
     231
     232
     233
     234###############################################################
     235# echo -----------------postprocess examples-------------------
     236echo -----------------read examples-------------------
    203237
    204238#echo '13 c) ./tests/read_examples/'
    205239mkdir $tarball_tmp/tests/read_examples
     240
     241cp tests/read_examples/declare_examples $tarball_tmp/tests/read_examples/
     242cp tests/read_examples/display_examples.sh $tarball_tmp/tests/read_examples/
     243cp tests/read_examples/examples_output.txt $tarball_tmp/tests/read_examples/
     244cp tests/read_examples/read_examples.sh $tarball_tmp/tests/read_examples/
    206245cp tests/read_examples/read_grids.sh $tarball_tmp/tests/read_examples/
     246cp tests/read_examples/read_parts.sh $tarball_tmp/tests/read_examples/
     247cp tests/read_examples/set_examples_all $tarball_tmp/tests/read_examples/
     248cp tests/read_examples/set_examples_3.sh $tarball_tmp/tests/read_examples/
    207249cp tests/read_examples/read_headers.sh $tarball_tmp/tests/read_examples/
    208 
     250cp tests/read_examples/read_examples_output.txt $tarball_tmp/tests/ #read_examples/
    209251# echo USAGE ~/repos/flexpart/tests/read_examples'$'./read_grids.sh
    210252
    211253###############################################################
    212 echo --compare examples-------------------
     254echo ------------compare examples-------------------
    213255#echo tests/compare_examples.sh
     256mkdir $tarball_tmp/tests/compare_examples
     257
    214258
    215259#mkdir $tarball_tmp/tests/compare_examples
    216260#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/
     262cp tests/compare_examples/*.sh $tarball_tmp/tests/compare_examples
     263cp tests/compare_examples/compare_grids_output.txt $tarball_tmp/tests/ #compare_examples
    218264# list of examples with units
    219 cp tests/declare_examples $tarball_tmp/tests/
     265#cp tests/declare_examples $tarball_tmp/tests/
    220266
    221267echo
     
    249295echo  tarball $tarball complete
    250296echo exported untarred files in $tarball_tmp
     297
     298echo cp -r preprocess/flex_extract/work $tarball_tmp/preprocess/flex_extract/
     299echo cd $tarball_tmp/src
     300echo $HOME/repos/flexpart/src/make_in_laptop.sh
     301echo cd .. ';' ./src/FLEXPART
     302echo cd postprocess/flex_read_fortran
     303echo make test
     304echo  max:  0.115784094     mean:   4.70877676E-05
     305#echo cd $tarball_tmp/tests/examples ';'   make run
     306echo cd ../../tests/examples ';'   make run
     307#echo cd $tarball_tmp/tests/read_examples
     308echo cd ../read_examples
     309echo ./read_examples.sh
     310echo ./read_examples.sh '>' ../read_examples_output.txt
     311echo cd ../compare_examples
     312echo ./compare_grids.sh
     313echo ./compare_grids.sh '>' ../compare_grids_output.txt
     314
     315echo e.g. tar --append --file=$tarball_tmp/ ../compare_grids_output.txt ../read_examples_output.txt
     316 
     317 
     318
     319
    251320exit
    252321#return
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG