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[0|1|2] ] [ -M ] [
10 -Tdz ] [ -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 -L0 Report range of z after actually scanning the data, not just
45 reporting what the header says.
46
47 -L1 Report median and L1 scale of z (L1 scale = 1.4826 * Median
48 Absolute Deviation (MAD)).
49
50 -L2 Report mean, standard deviation, and rms of z.
51
52 -M Find and report the location of min/max z-values, and count and
53 report the number of nodes set to NaN, if any.
54
55 -T Determine min and max z-value, round off to multiples of dz, and
56 report as the text string -Tzmin/zmax/dz for use by makecpt.
57
58 -V Selects verbose mode, which will send progress reports to stderr
59 [Default runs "silently"].
60
61 -f Special formatting of input and/or output columns (time or geo‐
62 graphical data). Specify i or o to make this apply only to
63 input or output [Default applies to both]. Give one or more
64 columns (or column ranges) separated by commas. Append T (abso‐
65 lute calendar time), t (relative time in chosen TIME_UNIT since
66 TIME_EPOCH), x (longitude), y (latitude), or f (floating point)
67 to each column or column range item. Shorthand -f[i|o]g means
68 -f[i|o]0x,1y (geographic coordinates).
69
71 GMT is able to recognize many of the commonly used grid file formats,
72 as well as the precision, scale and offset of the values contained in
73 the grid file. When GMT needs a little help with that, you can add the
74 suffix =id[/scale/offset[/nan]], where id is a two-letter identifier of
75 the grid type and precision, and scale and offset are optional scale
76 factor and offset to be applied to all grid values, and nan is the
77 value used to indicate missing data. See grdreformat(1) and Section
78 4.17 of the GMT Technical Reference and Cookbook for more information.
79
80 When reading a netCDF file that contains multiple grids, GMT will read,
81 by default, the first 2-dimensional grid that can find in that file. To
82 coax GMT into reading another multi-dimensional variable in the grid
83 file, append ?varname to the file name, where varname is the name of
84 the variable. Note that you may need to escape the special meaning of ?
85 in your shell program by putting a backslash in front of it, or by
86 placing the filename and suffix between quotes or double quotes. See
87 grdreformat(1) and Section 4.18 of the GMT Technical Reference and
88 Cookbook for more information, particularly on how to read splices of
89 3-, 4-, or 5-dimensional grids.
90
92 To obtain all the information about the data set in file
93 hawaii_topo.grd:
94
95 grdinfo -L1 -L2 -M hawaii_topo.grd
96
98 GMT(1), grd2cpt(1), grd2xyz(1), grdedit(1)
99
100
101
102GMT 4.5.6 10 Mar 2011 GRDINFO(1)