# GRDINFO

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
SEE ALSO

## NAME

| grdinfo − Get information about the contents of a 2-D grd file

## SYNOPSIS

| grdinfo grdfiles [ −C ] [ −F ] [ −Idx[/dy] ][ −L[1|2] ] [ −M ] [ −Tdz ] [ −V ] [ −f[i|o]colinfo ]

## DESCRIPTION

| grdinfo reads a 2-D binary grd file and reports various statistics for the (x,y,z) data in the grdfile(s). The output information contains the minimum/maximum values for x, y, and z, where the min/max of z occur, the x- and y-increments, and the number of x and y nodes, and [optionally] the mean, standard deviation, and/or the median, L1 scale of z, and number of nodes set to NaN.

| grdfile

| The name of one or several 2-D grd files.

## OPTIONS

| No space between the option flag and the associated arguments.

| −C |  | Formats the report using tab-separated fields on a single line. The output is w e s n z0 z1 dx dy nx ny [ x0 y0 x1 y1 ] [ med scale ] [ mean std rms] [n_nan]. The data in brackets are output only if the corresponding options −M, −L1, −L2, and −M are used, respectively. If the −I option is used, the output format is instead NF w e s n z0 z1, where NF is the total number of grids read and w e s n are rounded off (see −I).
| −F |  | Report grid domain and x/y-increments in world mapping format [Default is generic]. Does not apply to the −C option.
| −I |  | Report the min/max of the region to the nearest multiple of dx and dy, and output this in the form −Rw/e/s/n (unless −C is set).
| −L1 |  | Report median and L1 scale of z (L1 scale = 1.4826 * Median Absolute Deviation (MAD)).
| −L2 |  | Report mean and standard deviation of z.
| −M |  | Find and report the location of min/max z-values, and count and report the number of nodes set to NaN, if any.
| −T |  | Determine min and max z-value, round off to multiples of dz, and report as the text string −Tzmin/zmax/dz for use by makecpt.
| −V |  | Selects verbose mode, which will send progress reports to stderr [Default runs "silently"].
| −f |  | Special formatting of input and output columns (time or geographical data). Specify i(nput) or o(utput) [Default is both input and output]. Give one or more columns (or column ranges) separated by commas. Append T (Absolute calendar time), t (time relative to chosen TIME_EPOCH), x (longitude), y (latitude), or f (floating point) to each column or column range item. Shorthand −f[i|o]g means −f[i|o]0x,1y (geographic coordinates).

## EXAMPLES

| To obtain all the information about the data set in file hawaii_topo.grd: grdinfo −L1 −L2 −M hawaii_topo.grd

## SEE ALSO

| GMT(l), grd2cpt(l), grd2xyz(l), grdedit(l)