1GRDINFO(1) Generic Mapping Tools GRDINFO(1)
2
3
4
6 grdinfo - Get information about the contents of a 2-D grid file
7
9 grdinfo grdfiles [ -C ] [ -F ] [ -I[dx[/dy]] ][ -L[1|2] ] [ -M ] [ -Tdz
10 ] [ -V ] [ -f[i|o]colinfo ]
11
13 grdinfo reads a 2-D binary grid file and reports various statistics for
14 the (x,y,z) data in the grid file(s). The output information contains
15 the minimum/maximum values for x, y, and z, where the min/max of z
16 occur, the x- and y-increments, and the number of x and y nodes, and
17 [optionally] the mean, standard deviation, and/or the median, L1 scale
18 of z, and number of nodes set to NaN.
19
20 grdfile
21 The name of one or several 2-D grid files. (See GRID FILE FOR‐
22 MATS below.)
23
25 No space between the option flag and the associated arguments.
26
27 -C Formats the report using tab-separated fields on a single line.
28 The output is w e s n z0 z1 dx dy nx ny [ x0 y0 x1 y1 ] [ med
29 scale ] [ mean std rms] [n_nan]. The data in brackets are out‐
30 put only if the corresponding options -M, -L1, -L2, and -M are
31 used, respectively. If the -I option is used, the output format
32 is instead NF w e s n z0 z1, where NF is the total number of
33 grids read and w e s n are rounded off (see -I).
34
35 -F Report grid domain and x/y-increments in world mapping format
36 [Default is generic]. Does not apply to the -C option.
37
38 -I Report the min/max of the region to the nearest multiple of dx
39 and dy, and output this in the form -Rw/e/s/n (unless -C is
40 set). To report the actual grid region, select -I-. If no
41 argument is given then we report the grid increment in the form
42 -Ixinc/yinc.
43
44 -L1 Report median and L1 scale of z (L1 scale = 1.4826 * Median
45 Absolute Deviation (MAD)).
46
47 -L2 Report mean, standard deviation, and rms of z.
48
49 -M Find and report the location of min/max z-values, and count and
50 report the number of nodes set to NaN, if any.
51
52 -T Determine min and max z-value, round off to multiples of dz, and
53 report as the text string -Tzmin/zmax/dz for use by makecpt.
54
55 -V Selects verbose mode, which will send progress reports to stderr
56 [Default runs "silently"].
57
58 -f Special formatting of input and/or output columns (time or geo‐
59 graphical data). Specify i or o to make this apply only to
60 input or output [Default applies to both]. Give one or more
61 columns (or column ranges) separated by commas. Append T (abso‐
62 lute calendar time), t (relative time in chosen TIME_UNIT since
63 TIME_EPOCH), x (longitude), y (latitude), or f (floating point)
64 to each column or column range item. Shorthand -f[i|o]g means
65 -f[i|o]0x,1y (geographic coordinates).
66
68 GMT is able to recognize many of the commonly used grid file formats,
69 as well as the precision, scale and offset of the values contained in
70 the grid file. When GMT needs a little help with that, you can add the
71 suffix =id[/scale/offset[/nan]], where id is a two-letter identifier of
72 the grid type and precision, and scale and offset are optional scale
73 factor and offset to be applied to all grid values, and nan is the
74 value used to indicate missing data. See grdreformat(1) and Section
75 4.17 of the GMT Technical Reference and Cookbook for more information.
76
77 When reading a netCDF file that contains multiple grids, GMT will read,
78 by default, the first 2-dimensional grid that can find in that file. To
79 coax GMT into reading another multi-dimensional variable in the grid
80 file, append ?varname to the file name, where varname is the name of
81 the variable. Note that you may need to escape the special meaning of ?
82 in your shell program by putting a backslash in front of it, or by
83 placing the filename and suffix between quotes or double quotes. See
84 grdreformat(1) and Section 4.18 of the GMT Technical Reference and
85 Cookbook for more information, particularly on how to read splices of
86 3-, 4-, or 5-dimensional grids.
87
89 To obtain all the information about the data set in file
90 hawaii_topo.grd:
91
92 grdinfo -L1 -L2 -M hawaii_topo.grd
93
95 GMT(1), grd2cpt(1), grd2xyz(1), grdedit(1)
96
97
98
99GMT 4.3.1 15 May 2008 GRDINFO(1)