Changeset 941db73 in flexpart.git


Ignore:
Timestamp:
Jun 13, 2019, 12:23:32 PM (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:
3d7eebf, a63c75a, e91311a
Parents:
0ca4976
Message:

update create_tarball.sh

File:
1 edited

Legend:

Unmodified
Added
Removed
  • create_tarball.sh

    ra2e9de4 r941db73  
    11#!/bin/bash
    22
     3echo CREATE A NEW FLEXPART DISTRIBUTION
     4
    35#define version number
    4 
    56githash=$(git rev-parse --short --verify HEAD)
    6 
    7 
    8 version=10.3beta5_$githash
     7echo githash $githash
     8
     9version=10.3.1_$githash
     10echo version $version 
    911
    1012# define tarball name
    1113targetdir=../flexpart_distribution/
    12 tarball_tmp=${targetdir}flexpart_v$version
     14echo targetdir $targetdir
     15
     16distribution_name=flexpart_v$version
     17
     18tarball_tmp=${targetdir}flexpart_v$version
     19echo tarball_tmp $tarball_tmp
     20
    1321#tarball=${targetdir}flexpart_v$version.tar
    1422tarball=${tarball_tmp}.tar
     23echo tarball $tarball
    1524
    1625# clean old package
    1726if [ -d $tarball_tmp ]; then
    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/
    22   exit
     27  echo
     28  echo clean old tarball
     29  hora=$(date +"%Y-%m-%d_%H%M%S")
     30  tarball_tmp_bk=$tarball_tmp$tarball_tmp_$hora
     31  echo tarball_tmp=$tarball_tmp exists: move to tarball_tmp_bk=$tarball_tmp_bk #and exit 
     32  mkdir $tarball_tmp_bk
     33  mv $tarball_tmp $tarball_tmp_bk/
     34  mv $tarball $tarball_tmp_bk/
     35  #exit
     36  echo old files moved to tarball_tmp_bk=$tarball_tmp_bk
     37  echo
    2338fi
    2439
    2540echo ---------------------------------------------------------
    26 echo ')' create basic dir structure
     41echo ')' create basis dir $tarball_tmp
    2742mkdir $tarball_tmp
    2843echo ---------------------------------------------------------
    29 echo ---------------------------------------------------------
    30 ##############################################################
    31 echo ')' pathnames
     44
     45echo
     46
     47echo ---------------------------------------------------------
     48echo ')' copy pathnames
    3249#cp pathnames_distribution $tarball_tmp/pathnames
    3350cp pathnames $tarball_tmp/pathnames
    3451echo ---------------------------------------------------------
    35 ##############################################################
    36 echo ')' src/
     52
     53echo
     54
     55echo ---------------------------------------------------------
     56echo ')' copy src/
    3757mkdir $tarball_tmp/src
    3858cp src/*.f90 $tarball_tmp/src
     
    4363echo ---------------------------------------------------------
    4464################################################################
    45 echo ')' options
     65
     66echo
     67
     68echo ---------------------------------------------------------
     69echo ')' copy options/
    4670# (for the distribution they work with the defult flex_ecmwf test winds)
    4771#cp -r options_flex_ecmwf_EA $tarball_tmp/options
     
    5478  echo $i
    5579  cp -r options/$i $tarball_tmp/options
     80  #echo copy $i to $tarball_tmp/options
    5681done
    5782
     
    6085cp options/SPECIES/SPECIES* $tarball_tmp/options/SPECIES/
    6186cp options/SPECIES/specoverview.f90 $tarball_tmp/options/SPECIES/
    62 echo ---------------------------------------------------------
    63 ################################################################
    64 echo ')' AVAILABLE
     87echo copy options/SPECIES/ to $tarball_tmp/options/SPECIES/
     88
     89echo ---------------------------------------------------------
     90
     91echo
     92
     93echo ---------------------------------------------------------
     94echo ')' copy AVAILABLE
    6595#cp AVAILABLE_flex_ecmwf_EA $tarball_tmp/AVAILABLE
    6696cp AVAILABLE $tarball_tmp/AVAILABLE
    67 
     97echo ---------------------------------------------------------
     98
     99echo
     100
     101echo ---------------------------------------------------------
     102echo  ')' create output/ #  mkdir $tarball_tmp/output
     103mkdir $tarball_tmp/output
    68104echo ---------------------------------------------------------
    69105################################################################
    70 echo  ')' output / #  mkdir $tarball_tmp/output
    71 mkdir $tarball_tmp/output
    72 echo ---------------------------------------------------------
    73 ################################################################
     106
     107echo
     108
     109echo ---------------------------------------------------------
    74110echo ')' preprocess/
    75111mkdir $tarball_tmp/preprocess
    76 #############################
     112
     113echo
     114
    77115echo -----------------flex_extract-------------------
    78116#echo '6)'  mkdir $tarball_tmp/flex_extract [a separate repository]
     
    88126## cp -r flex_extract/work/EA* $tarball_tmp/preprocess/flex_extract/work   
    89127
     128flex_extract=../flex_extract_v7.0.4/
    90129echo include flex_extract v7.0.4 b7c1c04a204c91e53759ef590504bf52dfaece64
    91 flex_extract=../flex_extract_v7.0.4/
     130echo from $flex_extract [use git modules?] IP 3/2018
     131
    92132cp $flex_extract/README.md $tarball_tmp/preprocess/flex_extract
    93133cp -r $flex_extract/docs $tarball_tmp/preprocess/flex_extract
     
    95135cp -r $flex_extract/python $tarball_tmp/preprocess/flex_extract
    96136cp -r $flex_extract/src $tarball_tmp/preprocess/flex_extract
    97 
    98 
    99 
     137echo flex_extract copied
     138echo ---------------------------------------------------------
    100139
    101140
     
    106145#cp -r examples/*.sh $tarball_tmp/examples/
    107146#cp -r examples/Makefile $tarball_tmp/examples/
     147
     148echo
     149
    108150echo ---------------------------------------------------------
    109151################################################################
    110 echo postprocess/
     152echo ')' postprocess/
    111153
    112154postprocess=postprocess
     
    119161cp $postprocess/flex_read_fortran/*.f90 $tarball_tmp/$postprocess/flex_read_fortran
    120162cp $postprocess/flex_read_fortran/makefile $tarball_tmp/$postprocess/flex_read_fortran
     163echo flex_read_fortran copied
    121164
    122165echo -----------------flex_read_matlab-------------------
     166echo flex_read_fortran NOT copied
    123167
    124168# add matlab reading routines
    125169#mkdir $tarball_tmp/postprocess/flex_read_matlab
    126170#cp postprocess/flex_read_matlab/*.m $tarball_tmp/postprocess/flex_read_matlab
    127 
    128 ###############################################################
    129 
    130 echo ---------------------------------------------------------
    131 echo tests/
    132 
     171echo ---------------------------------------------------------
     172
     173echo
     174
     175echo ---------------------------------------------------------
     176echo ')' tests/
     177###############################################################
    133178#echo '13) tests'
    134179mkdir $tarball_tmp/tests
    135 
    136 ###############################################################
    137180echo -----------------flex_read_fortran-------------------
    138 
    139181#echo 'b) ./tests/flex_read_fortran/'
    140182echo fixme
    141183#mkdir $tarball_tmp/tests/flex_read_fortran
    142184#cp tests/flex_read_fortran/test_read_default.sh  $tarball_tmp/tests/flex_read_fortran
     185
    143186
    144187###############################################################
     
    176219cp tests/declare_examples $tarball_tmp/tests/
    177220
    178 
     221echo
    179222
    180223# ~/repos/flexpart/tests$./compare_grids.sh
     
    182225#echo mkdir $tarball_tmp/tests/examples2/
    183226#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
     227# echo --repeat examples-------------------
     228# echo FIXME
     229
     230###############################################################
     231#echo -----------------ctbto-------------------
     232# mkdir $tarball_tmp/tests/ctbto
    190233
    191234# cp -r tests/NILU/test_1 $tarball_tmp/tests/
    192235# cp -r tests/default_cases $tarball_tmp/tests/
    193236
    194 tar cvf  $tarball  $tarball_tmp 
    195 
    196 echo  $tarball complete
     237echo ---------------------------------------------------------
     238echo create tarball
     239#tar cvf $tarball  $tarball_tmp 
     240#tar cf $tarball  $tarball_tmp 
     241#cd
     242
     243cd $targetdir
     244tar cf $distribution_name.tar $distribution_name
     245
     246pwd
     247
     248
     249echo  tarball $tarball complete
    197250echo exported untarred files in $tarball_tmp
    198251exit
     
    200253###############################################################
    201254
    202 
    203 
     255# obtain $FLEXHOME (and set)
     256#1 cd $FLEXHOME/src
     257
     258#2 compile
     259#
     260#[laptop] source /Users/ignacio/repos/flexpart/src/make_in_laptop.sh
     261# [njord] make
     262# ->created executable (FLEXPART)
     263
     264#3 execute in src (absolute paths)
     265#
     266#[laptop] cp  /Users/ignacio/repos/flexpart/src/pathnames .
     267#[njord] FIXME
     268#
     269# mkdir output
     270# ./FLEXPART
     271# ->created output in output/
     272
     273#4 read output
     274# cd  $FLEXHOME/postprocess/flex_read_fortran/
     275# make
     276# -> printheader* printgrid* flex_read_compare2*
     277#/postprocess/flex_read_fortran$./printheader ../../src/output/
     278#/postprocess/flex_read_fortran$./printgrid ../../src/output/ conc
     279# -> output in stdout (max:   11122924.0     sum:   90330784.0)
     280
     281#5 execute in $FLEXHOME
     282# cd $FLEXHOME
     283# get winds
     284#[laptop] cp -r ~/repos/flex_winds/work/ ./preprocess/flex_extract/
     285#[njord] curl https://folk.nilu.no/~ignacio/FLEXPART/EA120101.tar --output EA120101.tar ; tar -xvf EA120101.tar ; mv flex_extract/work preprocess/flex_extract/ ; rmdir flex_extract
     286
     287# src/FLEXPART
     288# -> output in $FLEXHOME/output/
     289
     290#6 read output
     291# postprocess/flex_read_fortran/printheader output/
     292# postprocess/flex_read_fortran/printgrid output/ conc
     293# -> output in stdout ( max:   11578738.0     sum:   104058720.)
     294
     295#7 gnererate examples
     296# cd $FLEXHOME/tests/examples
     297
     298#make run
     299
     300#make examples
     301#make batch
     302#./run_batch_cl.sh
     303
     304#make (set_default_example.sh)
     305#tests/examples$../../src/FLEXPART
     306#output
     307
     308#8 read examples:
     309#cd $FLEXHOME/tests/read_examples 
     310# ./read_headers.sh
     311# ./read_grids.sh
     312
     313#9 compare examples with reference
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG