create_tarball.sh 1.86 KB
Newer Older
1
2
#!/bin/bash

3
4
#define version number
version=10.3beta 
5

6
7
8
9
10
11
12
# define tarball name
tarball_tmp=flexpart_v$version 

# clean old package
rm -r $tarball_tmp

# create basic dir structure
13
14
mkdir $tarball_tmp
mkdir $tarball_tmp/src
15
16

# copy fortran source files
17
cp src/*.f90 $tarball_tmp/src
18
19
20
cp -r src/gributils $tarball_tmp/src 

# copy makefile
21
cp src/makefile $tarball_tmp/src
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#cp src/makefile.gfs $tarball_tmp/src

# copy default options (for the distribution they work with the defult flex_ecmwf test winds)
# cp -r options $tarball_tmp
cp -r options_flex_ecmwf_EA $tarball_tmp/options

# copy default pathnames 
cp pathnames_distribution $tarball_tmp/pathnames


# add ECMWF retrieve routines
mkdir $tarball_tmp/preprocess
#mkdir $tarball_tmp/preprocess/flex_ecmwf
mkdir $tarball_tmp/preprocess/flex_extract
#cp -r flex_ecmwf_src/* $tarball_tmp/preprocess/flex_ecmwf/
cp -r flex_ecmwf_src/* $tarball_tmp/preprocess/flex_extract/

# copy default AVAILABLE
cp AVAILABLE_flex_ecmwf_EA $tarball_tmp/AVAILABLE


# directory for reading routines
mkdir $tarball_tmp/postprocess

# add fortran reading routines
mkdir $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/makefile $tarball_tmp/postprocess/flex_read_fortran

# add matlab reading routines
mkdir $tarball_tmp/postprocess/flex_read_matlab
cp postprocess/flex_read_matlab/*.m $tarball_tmp/postprocess/flex_read_matlab

# examples
cp -r examples $tarball_tmp/ 

59
60

mkdir $tarball_tmp/tests
61

62
cp -r tests/NILU/test_1 $tarball_tmp/tests/
63
cp -r tests/flex_gen_cases $tarball_tmp/tests/
64
65


66
#return
67

68
69
70
#tar -cvf flexpart$version.tar $tarball_tmp/*
echo now can run:  "tar -cvf $tarball_tmp.tar $tarball_tmp/*"
echo preliminary: scp flexpart_v10.3beta.tar njord:public_html/FLEXPART