Subversion Repositories lagranto.ocean

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 michaesp 1
1. Code retrieval
2
------------------
3
 
4
Download the latest Lagranto version from SVN repository <https://svn.iac.ethz.ch/websvn/pub/wsvn/>.
5
 
6
Then create a directory where you want Lagranto to be installed; place the whole source code in this
7
directory and set an environment variable {LAGRANTO} pointing to this directory.
8
 
9
> setenv LAGRANTO {PATH TO YOUR LAGRANTO INSTALLATION}
10
 
11
 
12
2. Compiling the Lagranto code
13
-------------------------------
14
 
15
Choose the correct Fortran compiler in <install.csh>. At the moment, PGI is set. I have sucessfully 
16
compiled the code with <ifort> and <gfortran>, so you might want to use one of these two compilers.
17
You additonally have to set in <install.csh> the environment variable <NETCDF> which point to the
18
installstion of the netCDF libraries.
19
 
20
> setenv NETCDF  {PATH TO YOUR NETCDF LIBRARY}
21
 
22
> cd ${LAGRANTO}/
23
> ./install.csh clean
24
> ./install.csh lib
25
> ./install.csh create_startf
26
> ./install.csh caltra
27
> ./install.csh trace
28
> ./install.csh select
29
> ./install.csh density
30
> ./install.csh lidar
31
> ./install.csh goodies
32
> ./install.csh docu
33
> ./install.csh links
34
 
35
Add the end of the installation, it's best to add the following directory to your PATH variable. In <bash> 
36
this should look like
37
 
38
>  export PATH=${LAGRANTO}/bin/:$PATH
39
 
40
If the <LAGRANTO/bin> directory is in your PATH, then you will be able to run Lagranto from any directory. 
41
Otherwise, you will always to give the full path to your Lagranto commands, e.g.
42
 
43
> ${LAGRANTO}/bin/caltra
44
 
45
 
46
 
47
3. Compiling the Grib-netCDF converter
48
--------------------------------------
49
 
50
In the subdirectory <convert/fgrb2cdf> you find the program you find the Fortran program which we use to
51
convert the Grib files from ECMWF into netCDF. Note that we use a somewhat 'strange' netCDF format; therefore
52
you have to use this converter. In the near future, I will make available a conversion tool based on the CDO
53
tools...
54
 
55
You will have to set some paths to compile the program; in particular, a reference must be made to the
56
GRIB_API.
57
 
58
 
59
4. Lagranto documentation
60
-------------------------
61
 
62
Lagranto comes with a detailed documentation; you can start it with one of the following calls:
63
 
64
> lagrantohelp
65
> lagrantohelp tutorial
66
> lagrantohelp reference
67
 
68
The most important program for you will be <caltra> which calculates the trajectories...
69
 
70
> lagrantohelp caltra
71
 
72
 
73
5. Test data set
74
-----------------
75
 
76
On our FTP server you find a sample data set which allows you to run Lagranto without bothering about the
77
Grib-netCDF conversion.
78
 
79
ftp://iacftp.ethz.ch/pub_read/sprenger/lagranto.ecmwf.test/
80
 
81
 
82
6. Minimal test run
83
--------------------
84
 
85
a) Define a starting position in a file <startf>; the format is <longitude latitude pressure>.
86
 
87
> more startf
88
  8.0 46.0 500.
89
-10.0 30.0 850.
90
 
91
Each line corresponds to a single starting position. Note that longitudes must be within -180 ... +180 deg.
92
 
93
 
94
b) Start the trajectory
95
 
96
It is a forward trajectory starting at 00 UTC 1 Jan 2012. The time span is 18 UTC. Starting positions are
97
taken from <startf>, the output is written to <trajectory>. For details about the optional flag <-j> and
98
<-notimecheck>, please consult the Lagranto help <lagrantohelp caltra>.
99
 
100
> caltra 20120101_00 20120101_18 startf trajectory -j
101
> more trajectory
102
Reference date 20120101_0000 / Time range    1080 min
103
 
104
  time      lon     lat     p
105
-----------------------------
106
 
107
    .00     8.00   46.00   500
108
   6.00    10.02   44.07   480
109
  12.00    11.64   42.13   504
110
  18.00    12.66   40.17   514
111
 
112
    .00   -10.00   30.00   850
113
   6.00   -10.42   30.14   866
114
  12.00   -10.40   30.25   885
115
  18.00   -10.46   29.93   906
116
 
117
================================.