1X2SYS_DATALIST(1) Generic Mapping Tools X2SYS_DATALIST(1)
2
3
4
6 x2sys_datalist - A generic data-extractor for ASCII or binary files
7
9 x2sys_datalist track(s) -TTAG [ -A ] [ -Fname1,name2,... ] [
10 -H[i][nrec] ] [ -L[corrtable] ] [ -Rwest/east/south/north[r] ] [ -S ]
11 [ -V ] [ -bo[s|S|d|D[ncol]|c[var1/...]] ] [ -m[flag] ]
12
14 x2sys_datalist reads one or more files and produces a single ASCII [or
15 binary] table. The files can be of any format, which must be described
16 and passed with the -T option. You may limit the output to a geo‐
17 graphic region, and insist that the output from several files be sepa‐
18 rated by a multiple segment header. Only the named data fields will be
19 output [Default selects all columns].
20
21 tracks Can be one or more ASCII, native binary, or COARDS netCDF 1-D
22 data files. To supply the data files via a text file with a
23 list of tracks (one per record), specify the name of the track
24 list after a leading equal-sign (e.g., =tracks.lis). If the
25 names are missing their file extension we will append the suffix
26 specified for this TAG. Track files will be searched for first
27 in the current directory and second in all directories listed in
28 $X2SYS_HOME/TAG/TAG_paths.txt (if it exists). [If $X2SYS_HOME is
29 not set it will default to $GMT_SHAREDIR/x2sys]. (Note: MGD77
30 files will also be looked for via MGD77_HOME/mgd77_paths.txt and
31 *.gmt files will be searched for via $GMT_SHAREDIR/mgg/gmt‐
32 file_paths).
33
34 -T Specify the x2sys TAG which tracks the attributes of this data
35 type.
36
38 No space between the option flag and the associated arguments.
39
40 -A Eliminate COEs by distributing the COE between the two tracks in
41 proportion to track weight. These (dist, adjustment) spline
42 knots files for each track and data column are called track.col‐
43 umn.adj and are expected to be in the $X2SYS_HOME/TAG directory.
44 The adjustments are only applied if the corresponding adjust
45 file can be found [No residual adjustments]
46
47 -F Give a comma-separated sub-set list of column names defined in
48 the definition file. [Default selects all data columns].
49
50 -H Input file(s) has header record(s). If used, the default number
51 of header records is N_HEADER_RECS. Use -Hi if only input data
52 should have header records [Default will write out header
53 records if the input data have them]. Blank lines and lines
54 starting with # are always skipped.
55
56 -L Apply optimal corrections to columns where such corrections are
57 available. Append the correction table to use [Default uses the
58 correction table TAG_corrections.txt which is expected to reside
59 in the $X2SYS_HOME/TAG directory]. For the format of this file,
60 see CORRECTIONS below.
61
62 -R west, east, south, and north specify the Region of interest, and
63 you may specify them in decimal degrees or in
64 [+-]dd:mm[:ss.xxx][W|E|S|N] format. Append r if lower left and
65 upper right map coordinates are given instead of w/e/s/n. The
66 two shorthands -Rg and -Rd stand for global domain (0/360 and
67 -180/+180 in longitude respectively, with -90/+90 in latitude).
68 Alternatively, specify the name of an existing grid file and the
69 -R settings (and grid spacing, if applicable) are copied from
70 the grid. For Cartesian data just give xmin/xmax/ymin/ymax.
71 This option limits the COEs to those that fall inside the speci‐
72 fied domain.
73
74 -S Suppress output records where all the data columns are NaN
75 [Default will output all records].
76
77 -V Selects verbose mode, which will send progress reports to stderr
78 [Default runs "silently"].
79
80 -bo Selects binary output. Append s for single precision [Default
81 is d (double)]. Uppercase S or D will force byte-swapping.
82 Optionally, append ncol, the number of desired columns in your
83 binary output file.
84
85 -m Output a multisegment header between data from each track. Note
86 this option does not imply anything about the input file; that
87 information is conveyed via the system tag (-T).
88
90 To extract all data from the old-style MGG supplement file c2104.gmt,
91 recognized by the tag GMT:
92
93 x2sys_datalist c2104.gmt -TGMT > myfile
94
95 To make lon,lat, and depth input for blockmean and surface using all
96 the files listed in the file tracks.lis and define by the tag TRK, but
97 only the data that are inside the specified area, and make output
98 binary, run
99
100 x2sys_datalist =tracks.lis -TTRK -Flon,lat,depth -R-40/-30/25/35 -bo >
101 alltopo_bin.xyz
102
104 The correction table is an ASCII file with coefficients and parameters
105 needed to carry out corrections. This table is usually produced by
106 x2sys_solve. Comment records beginning with # are allowed. All cor‐
107 rection records are of the form
108
109 trackID observation correction
110
111 where trackID is the track name, observation is one of the abbrevia‐
112 tions for an observed field contained in files under this TAG, and cor‐
113 rection consists of one or more white-space-separated terms that will
114 be subtracted from the observation before output. Each term must have
115 this exact syntax:
116
117 factor[*[function]([scale](abbrev[-origin]))[^power]]
118
119 where terms in brackets are optional (the brackets themselves are not
120 used but regular parentheses must be used exactly as indicated). No
121 spaces are allowed except between terms. The factor is the amplitude of
122 the basis function, while the optional function can be one of sin, cos,
123 or exp. The optional scale and origin can be used to translate the
124 argument (before giving it to the optional function). The argument
125 abbrev is one of the abbreviations for columns known to this TAG. How‐
126 ever, it can also be one of the three auxiliary terms dist (for along-
127 track distances), azim for along-track azimuths, and vel (for along-
128 track speed); these are all sensitive to the -C and -N settings used
129 when defining the TAB; futhermore, vel requires time to be present in
130 the data. If origin is given as T it means that we should replace it
131 with the value of abbrev for the very first record in the file (this is
132 usually only done for time). If the first data record entry is NaN we
133 revert origin to zero. Optionally, raise the entire expression to the
134 given power, before multiplying by factor. The following is an example
135 of fictitious corrections to the track ABC, implying the z column
136 should have a linear trend removed, the field obs should be corrected
137 by a strange dependency on latitude, weight needs to have 1 added
138 (hence correction is given as -1), and fuel should be reduced by a lin‐
139 ear distance term:
140
141 ABC z 7.1 1e-4*((time-T))
142 ABC obs 0.5*exp(-1e-3(lat))^1.5
143 ABC weight -1
144 ABC fuel 0.02*((dist))
145
147 blockmean(1), GMT(1), surface(1), x2sys_init(1), x2sys_datalist(1),
148 x2sys_get(1), x2sys_list(1), x2sys_put(1), x2sys_report(1),
149 x2sys_solve(1)
150
151
152
153GMT 4.5.6 10 Mar 2011 X2SYS_DATALIST(1)