1GMTINFO(1)                            GMT                           GMTINFO(1)
2
3
4

NAME

6       gmtinfo - Return information about data tables
7

SYNOPSIS

9       gmtinfo [ table ] [  -Aa|f|s ] [  -C ] [  -D[dx[/dy]] ] [  -EL|l|H|hcol
10       ] [  -F[i|d|t] ] [  -I[p|f|s]dx[/dy[/dz...] ] [  -L ] [  -S[x][y]  ]  [
11       -Tdz[+ccol] ] [  -V[level] ] [ -bibinary ] [ -dinodata ] [ -eregexp ] [
12       -fflags ] [ -ggaps ] [ -hheaders ] [ -iflags ] [ -oflags ]  [  -r  ]  [
13       -:[i|o] ]
14
15       Note:  No  space  is allowed between the option flag and the associated
16       arguments.
17

DESCRIPTION

19       gmtinfo reads its standard input [or from files] and finds the  extreme
20       values  in  each  of  the  columns  reported as slash-separated min/max
21       pairs. It recognizes NaNs and will print warnings if the number of col‐
22       umns  vary from record to record. The pairs can be split into two sepa‐
23       rate columns by using the -C option.  As another  option,  gmtinfo  can
24       find the extent of data in the first two columns rounded up and down to
25       the nearest multiple of the supplied increments given by -I. Such  out‐
26       put  will  be in the text form -Rw/e/s/n, which can be used directly on
27       the command line for other modules (hence only dx and dy  are  needed).
28       If  -C  is  combined with -I then the output will be in column form and
29       rounded up/down for as many columns as there are increments provided in
30       -I.  A  similar  option  (-T)  will provide a -Tzmin/zmax/dz string for
31       makecpt.
32

REQUIRED ARGUMENTS

34       None.
35

OPTIONAL ARGUMENTS

37       table  One or more ASCII (or binary, see -bi[ncols][type])  data  table
38              file(s) holding a number of data columns. If no tables are given
39              then we read from standard input.
40
41       -Aa|f|s
42              Specify how the range should be reported.  Choose  -Aa  for  the
43              range  of  all  files combined, -Af to report the range for each
44              file separately, and -As to report the range  for  each  segment
45              (in multisegment files) separately. [Default is -Aa].
46
47       -C     Report  the  min/max  values  per  column  in  separate  columns
48              [Default uses <min/max> format]. When used, users may  also  use
49              -o to limit which output columns should be reported [all].
50
51       -D     Modifies results obtained by -I by shifting the region to better
52              align with the center of the data.  Optionally, append granular‐
53              ity for this shift [Default performs an exact shift].
54
55       -EL|l|H|hcol
56              Returns  the record whose column col contains the minimum (l) or
57              maximum (h) value. Upper case (L|H) works on absolute  value  of
58              the  data. In case of multiple matches, only the first record is
59              returned. If col is not specified we default to the last  column
60              in the data.
61
62       -F[i|d|t] ]
63              Returns  the counts of various records depending on the appended
64              mode: i returns a single record with the total number of tables,
65              segments, data records, header records, and overall records.  In
66              contrast, d returns information for each segment in the  virtual
67              data set: tbl_number, seg_number, n_rows, start_rec, stop_rec. t
68              does the same but honors the input table organization  and  thus
69              resets  seg_number, start_rec, stop_rec at the start of each new
70              table.
71
72       -I[p|f|s]dx[/dy[/dz...]
73              Report the min/max of the first n columns to the nearest  multi‐
74              ple  of  the  provided  increments (separate the n increments by
75              slashes), and output results in the form -Rw/e/s/n (unless -C is
76              set). If only one increment is given we also use it for the sec‐
77              ond column  (for  backwards  compatibility).  To  override  this
78              behavior,  use -Ipdx. If the input x- and y-coordinates all have
79              the same phase shift relative to the dx and dy  increments  then
80              we use those phase shifts in determining the region, and you may
81              use -r to switch from gridline-registration  to  pixel-registra‐
82              tion.  For irregular data both phase shifts are set to 0 and the
83              -r is ignored.  Use -Ifdx[/dy]  to  report  an  extended  region
84              optimized  to  give  grid dimensions for fastest results in pro‐
85              grams using FFTs.  Use -Isdx[/dy] to report an  extended  region
86              optimized  to  give  grid dimensions for fastest results in pro‐
87              grams like surface.  If dx is given as - then the actual min/max
88              of the input is given in the -R string.
89
90       -L     Determines  common limits across tables (-Af) or segments (-As).
91              If used with -I it will round  inwards  so  that  the  resulting
92              bounds lie within the actual data domain.
93
94       -S[x][y]
95              Add  extra  space for error bars. Useful together with -I option
96              and when later plotting with psxy -E. -Sx leaves space for hori‐
97              zontal  error  bars  using  the  values in third (2) column. -Sy
98              leaves space for vertical error bars using the values in  fourth
99              (3)  column.  -S  or -Sxy leaves space for both error bars using
100              the values in third and fourth (2 and 3) columns.
101
102       -Tdz[+ccol]
103              Report the min/max of the first (0'th)  column  to  the  nearest
104              multiple  of dz and output this as the string -Tzmin/zmax/dz. To
105              use another column, append +ccol. Cannot be used  together  with
106              -I.
107
108       -V[level] (more ...)
109              Select verbosity level [c].
110
111       -bi[ncols][t] (more ...)
112              Select native binary input. [Default is 2 input columns].
113
114       -dinodata (more ...)
115              Replace input columns that equal nodata with NaN.
116
117       -e[~]"pattern" | -e[~]/regexp/[i] (more ...)
118              Only accept data records that match the given pattern.
119
120       -f[i|o]colinfo (more ...)
121              Specify data types of input and/or output columns.
122
123       -g[a]x|y|d|X|Y|D|[col]z[+|-]gap[u] (more ...)
124              Determine data gaps and line breaks.
125
126       -h[i|o][n][+c][+d][+rremark][+rtitle] (more ...)
127              Skip or produce header record(s).
128
129       -icols[+l][+sscale][+ooffset][,...] (more ...)
130              Select input columns and transformations (0 is first column).
131
132       -ocols[,...] (more ...)
133              Select output columns (0 is first column).
134
135       -r (more ...)
136              Set pixel node registration [gridline].
137
138       -:[i|o] (more ...)
139              Swap 1st and 2nd column on input and/or output.
140
141       -^ or just -
142              Print  a  short  message  about  the syntax of the command, then
143              exits (NOTE: on Windows just use -).
144
145       -+ or just +
146              Print an extensive usage (help) message, including the  explana‐
147              tion  of  any  module-specific  option  (but  not the GMT common
148              options), then exits.
149
150       -? or no arguments
151              Print a complete usage (help) message, including the explanation
152              of all options, then exits.
153

ASCII FORMAT PRECISION

155       The ASCII output formats of numerical data are controlled by parameters
156       in your gmt.conf file. Longitude and latitude are  formatted  according
157       to   FORMAT_GEO_OUT,  absolute  time  is  under  the  control  of  FOR‐
158       MAT_DATE_OUT and FORMAT_CLOCK_OUT, whereas general floating point  val‐
159       ues are formatted according to FORMAT_FLOAT_OUT. Be aware that the for‐
160       mat in effect can lead to loss of precision in ASCII output, which  can
161       lead  to  various  problems  downstream.  If you find the output is not
162       written with enough precision, consider switching to binary output (-bo
163       if  available) or specify more decimals using the FORMAT_FLOAT_OUT set‐
164       ting.
165

EXAMPLES

167       To find the extreme values in the file ship_gravity.xygd:
168
169              gmt info ship_gravity.xygd
170
171       Output should look like
172
173              ship_gravity.xygd: N = 6992 <326.125/334.684> <-28.0711/-8.6837> <-47.7/177.6> <0.6/3544.9>
174
175       To find the extreme values in the file track.xy to the nearest 5  units
176       but shifted to within 1 unit of the data center, and use this region to
177       draw a line using psxy, run
178
179              gmt psxy `gmt info -I5 -D1 track.xy` track.xy -Jx1 -B5 -P > track.ps
180
181       To find the min and max values for each of the  first  4  columns,  but
182       rounded  to  integers, and return the result individually for each data
183       file, use
184
185              gmt info profile_*.txt -C -I1/1/1/1
186
187       Given seven profiles with different start and stop positions,  we  want
188       to  find  a range of positions, with increment of 5, that are common to
189       all the profiles.  We use
190
191              gmt info profile_[123567].txt -L -I5
192
193       The file magprofs.txt contains a number of magnetic profiles stored  as
194       separate  data  segments.   We need to know how many segments there are
195       and use
196
197              gmt info magprofs.txt -Fi
198

BUGS

200       The -I option does not yet work properly with time series  data  (e.g.,
201       -f0T). Thus, such variable intervals as months and years are not calcu‐
202       lated. Instead, specify your interval in the same units as the  current
203       setting of TIME_UNIT.
204

SEE ALSO

206       gmt, gmtconvert, psxy
207
209       2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
210
211
212
213
2145.4.5                            Feb 24, 2019                       GMTINFO(1)
Impressum