4 |
michaesp |
1 |
.TH density
|
|
|
2 |
.SH NAME
|
|
|
3 |
.B density -
|
|
|
4 |
gridding of trajectory files: either single trajectories or trajectory densities
|
|
|
5 |
.SH SYNOPSIS
|
|
|
6 |
.B density
|
|
|
7 |
.I inpfile
|
|
|
8 |
.I outfile
|
|
|
9 |
[
|
|
|
10 |
.I optional arguments
|
|
|
11 |
]
|
|
|
12 |
.SH DESCRIPTION
|
|
|
13 |
Gridding of a trajectory file "inpfile"; the output is written to a netCDF file "outfile). The trajectories can be interpolated to equal-distance intervals or to a higher time resolution; furthermore, an interpolation is provided to give a continuous line in a longitude/latitude grid. Besides densities of trajectories, possibly at different times, gridding of traced meteorological fields is accepted.
|
|
|
14 |
.SH PARAMETERS
|
|
|
15 |
.TP 15
|
|
|
16 |
.B inpfile
|
|
|
17 |
input trajectory file (in one of the accepted formats, see
|
|
|
18 |
.B reformat
|
|
|
19 |
for details)
|
|
|
20 |
.TP 15
|
|
|
21 |
.B outfile
|
|
|
22 |
output netCDF file with a regular or rotated longitude/latitude grid. The output can be either in IVE or in CF netCDF format (see switches below).
|
|
|
23 |
.SH OPTIONAL PARAMETERS
|
|
|
24 |
.TP 5
|
|
|
25 |
.B - field name
|
|
|
26 |
Field name (according to the column names of the trajectory file) which should be gridded. If no field is specified, it is assumed that the trajectory density (counts per grid point) should be gridded.
|
|
|
27 |
.TP 5
|
|
|
28 |
.B - create
|
|
|
29 |
determines the behaviour if the output file already exists: 1) if the file does NOT exist, it will be created; 2) if the file already exists, it will be overwritten, i.e. newly created. If the flag is not set and the file already exists, the output of the new gridding will appended to the existing file. As a typical scenario: density TRAJECTORY DENSITY; density TRAJECTORY DENSITY -field p; density TRAJECORY DENSITY -field PV;... -> all fields (p, PV,...) will be written to the same output file "DENSITY".
|
|
|
30 |
.TP 5
|
|
|
31 |
.B - index filename
|
|
|
32 |
perform only a gridding of the trajectories in the index list "filename"; an index list is just a list of the indices of the single trajectories - it can easily be created with
|
|
|
33 |
.B select
|
|
|
34 |
and also is used in
|
|
|
35 |
.B extract.
|
|
|
36 |
.TP 5
|
|
|
37 |
.B - boolean filename
|
|
|
38 |
perform only a gridding of the trajectories in the boolean list "filename"; a boolean list has for each trajectory an entry 1 (trajectory selected) or 0 (not selected) - it can easily be created with
|
|
|
39 |
.B select
|
|
|
40 |
and also is used in
|
|
|
41 |
.B extract.
|
|
|
42 |
.TP 5
|
|
|
43 |
.B - interp val unit
|
|
|
44 |
interpolate the trajectories to new positions before the gridding; different modes are accepted:
|
|
|
45 |
.B 1) "-interp 1 h"
|
|
|
46 |
interpolates the trajectories to a new time resolution (here 1 h);
|
|
|
47 |
.B 2) "-interp 20 km"
|
|
|
48 |
interpolates the trajectories to a new space resolution (here 20 km). Note that nearly stationary trajectories will be reduced in their influence considerably if this mode is applied;
|
|
|
49 |
.B 3) "-interp 2 deg"
|
|
|
50 |
interpolates to a new resolution, expressed in deg lon/lat. This mode is particularly helpful if a "line" should be drawn on a lon/lat grid.
|
|
|
51 |
.TP 5
|
|
|
52 |
.B - radius val unit
|
|
|
53 |
set the filtering radius for the smoothing (default is 100 km); this radius determines over which radius each trajectory point is smeared out during the gridding. It should be adapted to the grid resolution: if it is too small, and no grid point falls into the circle with this radius, an error message is written. A good choice might be
|
|
|
54 |
.B -radius <dlat|dlon [in km]>.
|
|
|
55 |
Further Examples:
|
|
|
56 |
.B "-radius 2 deg"
|
|
|
57 |
for smoothing over 2 degrees lat/lon;
|
|
|
58 |
.B "-radius 20 km"
|
|
|
59 |
for a 20 km smoothing.
|
|
|
60 |
.TP 5
|
|
|
61 |
.B - latlon [ nlon nlat lonmin latmin dlon dlat | dynamic ]
|
|
|
62 |
specification of the regular output lon/lat grid; the default output grid has parameters: nlon = 360, nlat = 180, lonmin = -180, lonmax = 180, dlon =1, dlat = 1 (global). If the option
|
|
|
63 |
.B dynamic
|
|
|
64 |
is chosen, the grid is automatically adapted to the trajectory file: the longitude and latitude boundaries are determined and the resulting ranges divided in 400 grid pixel in each direction. In a second step the grid distance is set equal in zonal and meridional direction, and the other grid parameters correspondingly adjusted.
|
|
|
65 |
.TP 5
|
|
|
66 |
.B - rotated clon clat nlonlat dlonlat
|
|
|
67 |
specification of the rotated output lon/lat grid; the centre of the rotated grid is given with the central longitude (clon) and latitude (clat) - this point corresponds to 0/0 in the new coordinate system. The horizontal resolution (dlonlat) of the new grid is equal in rotated longitude and latitude. The final domain extensions are: -(nlonlat-1)/2*dlonlat, +(nlonlat-1)/2*dlonlat and correspondingle for rotated latitude.
|
|
|
68 |
.TP 5
|
|
|
69 |
.B -time value
|
|
|
70 |
do only a gridding of the time specified; e.g. -time 18.00 would perform a gridding of the trajectory time 18 h. If the netCDF already exists, and if the "-create" flag is not set, the new time will be added to the already existing file - the grid parameters will automatically be taken from the netCDF file.
|
|
|
71 |
.SH OUTPUT FIELDS
|
|
|
72 |
.TP 5
|
|
|
73 |
.B - COUNT
|
|
|
74 |
number of trajectory points attributed to grid points; the integration of this field over the whole domain is equal to the total number of gridded trajectory points, i.e. equal to the product #trajectories x #times.
|
|
|
75 |
.TP 5
|
|
|
76 |
.B - RESIDENCE
|
|
|
77 |
residence time of trajectory points attributed to grid points; the integration of this field over the whole domain is equal to the total time of all trajectories, i.e. equal to the product #trajectories x #time x time interval.
|
|
|
78 |
.TP 5
|
|
|
79 |
.B - AREA
|
|
|
80 |
area (in square kilometers) attributed to each grid point, i.e. dlat x dlon x coslatitude). This field can be used to convert the units of COUNT and RESIDENCE to grid-independent values. For instance,
|
|
|
81 |
.B RESIDENCE/AREA
|
|
|
82 |
is the residence time per square kilometer.
|
|
|
83 |
.TP 5
|
|
|
84 |
.B - FILED
|
|
|
85 |
gridded field: e.g gridded pressure, temperature, potential vorticity.
|
|
|
86 |
.SH EXAMPLES
|
|
|
87 |
.TP 5
|
|
|
88 |
.B [1] density TRAJECTORY DENSITY
|
|
|
89 |
bring the TRAJECTORY file into a netCDF file DENSITY with gloabl coverage (longitude/latitude grid). The netCDF file is in CF format and the all trajectory points are gridded, based on a smoothing radius of 100 km.
|
|
|
90 |
.TP 5
|
|
|
91 |
.B [2] density TRAJECTORY DENSITY -latlon dynamic
|
|
|
92 |
as in example [1], but now the lon/lat grid is automatically adapted to the range of the trajectory file.
|
|
|
93 |
.TP 5
|
|
|
94 |
.B [3] density TRAJECTORY DENSITY -interp 1 h
|
|
|
95 |
as in exaxmple [1], but the trajectories are interpolated to a 1-h time interval. This gives smoother trajectories.
|
|
|
96 |
.TP 5
|
|
|
97 |
.B [4] density TRAJECTORY DENSITY -interp 20 km
|
|
|
98 |
as in exaxmple [1], but the trajectories are interpolated to a 20-km distance interval.
|
|
|
99 |
.TP 5
|
|
|
100 |
.B [5] density TRAJECTORY DENSITY -interp 1 deg
|
|
|
101 |
as in exaxmple [1], but the trajectories are interpolated to a 1 deg distance interval. If the output grid (as specified in option "-latlon" or "-rotated") has the same spacing (1 deg) as given in "-interp 1 deg", a continuous line is drawn.
|
|
|
102 |
.TP 5
|
|
|
103 |
.B [6] density TRAJECTORY DENSITY -radius 100 km
|
|
|
104 |
the trajectory points are spread out over a circle with radius 100 km; this is equivalent to a smoothing of the resulting density field. Note that in a equidistant cylindrical projection, the circles become distorted towards the pole. If this is not appropriate, the option
|
|
|
105 |
.B "-radius 2 deg"
|
|
|
106 |
can be given, which is independent of geographical latitude.
|
|
|
107 |
.TP 5
|
|
|
108 |
.B [7] density VALID DENS -time 18.00
|
|
|
109 |
only gridding of the trajectory points corresponding to time 18 h; if no time is specified or if
|
|
|
110 |
.B "-time all",
|
|
|
111 |
then all trajectory times are included. Note that interpolation with "-interp" (see above) is not allowed, if only one time step is selected, i.e. "-interp" works only with "-time all".
|
|
|
112 |
.TP 5
|
|
|
113 |
.B [8] density TRAJECTORY DENSITY -rotated 30 50 401 0.1 -interp 0.2 deg
|
|
|
114 |
all trajectory times are gridded, but this time onto a rotated lon/lat grid; for instance, an interesting feature was found at (lon=30,lat=50). The new coordinate system, a rotated lon/lat grid, is centered at this point and spreads from 20 W to 20 W and from 20 S to 20 N, comprising 401 grid points in rotated longitude and latitude direction. The new grid resolution is 0.1 degrees, which was taken into account in the interpolation to 0.2 deg intervals between trajectory points.
|
|
|
115 |
.TP 5
|
|
|
116 |
.B [9] density TRAJECTORY DENSITY -index filename
|
|
|
117 |
all trajectories in the trajecrtory file TRAJECTORY are gridded which are listed in the index file "filename".
|
|
|
118 |
.TP 5
|
|
|
119 |
.B [10] density TRAJECTORY DENSITY -field p -time 0.00 -latlon dynamic
|
|
|
120 |
in addition of positional gridding (COUNT, RESIDENCE), do also a gridding of the pressure (p). This gives the pressure at the grid points, averaged over all trajectories passing over the grid point.
|
|
|
121 |
.TP 5
|
|
|
122 |
.B [11] density TRAJECTORY DENSITY -time 0.00; density TRAJECTORY DENSITY -time 6.00
|
|
|
123 |
the trajectory density for "TRAJECTORY" is first written to "OUTPUT" for time 0; then, with the second call, the densities are written for the time 6 h and included into the already existing netCDF file "DENSITY". Similarly, additional fiels can be added to a already existing netCDF file, e.g. with the second call "density TRAJECTOR DENSITY -field p -time 0.00".
|
|
|
124 |
.SH AUTHOR
|
|
|
125 |
Written by Michael Sprenger and Heini Wernli (January 2011)
|