.\" Man page generated from reStructuredText. . .TH "GRDINFO" "1gmt" "Nov 05, 2016" "5.3.1" "GMT" .SH NAME grdinfo \- Extract information from grids . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fBgrdinfo\fP \fIgrdfiles\fP [ \fB\-C\fP ] [ \fB\-F\fP ] [ \fB\-I\fP[\fIdx\fP[/\fIdy\fP]|\fBr\fP|\fBb\fP] ] [ \fB\-L\fP[\fB0\fP|\fB1\fP|\fB2\fP] ] [ \fB\-M\fP ] [ \fB\-R\fP\fIregion\fP ] [ \fB\-T\fP[\fIdz\fP][\fB+a\fP[\fIalpha\fP]] [\fB+s\fP] ] [ \fB\-V\fP[\fIlevel\fP] ] [ \fB\-f\fPflags ] .sp \fBNote:\fP No space is allowed between the option flag and the associated arguments. .SH DESCRIPTION .sp \fBgrdinfo\fP reads a 2\-D binary grid file and reports metadata and various statistics for the (\fIx\fP,\fIy\fP,\fIz\fP) data in the grid file(s). The output information contains the minimum/maximum values for \fIx\fP, \fIy\fP, and \fIz\fP, where the min/max of \fIz\fP occur, the \fIx\fP\- and \fIy\fP\-increments, and the number of \fIx\fP and \fIy\fP nodes, and [optionally] the mean, standard deviation, and/or the median, L1 scale of \fIz\fP, and number of nodes set to NaN. We also report if the grid is pixel\- or gridline\-registered and if it is a Cartesian or Geographic data set (based on metadata in the file). .SH REQUIRED ARGUMENTS .INDENT 0.0 .TP .B \fIgrdfile\fP The name of one or several 2\-D grid files. (See GRID FILE FORMATS below.) .UNINDENT .SH OPTIONAL ARGUMENTS .INDENT 0.0 .TP \fB\-C\fP Formats the report using tab\-separated fields on a single line. The output is \fIw e s n z0 z1 dx dy nx ny\fP[ \fIx0 y0 x1 y1\fP ] [ \fImed scale\fP ] [\fImean std rms\fP] [\fIn_nan\fP]. The data in brackets are output only if the corresponding options \fB\-M\fP, \fB\-L1\fP, \fB\-L2\fP, and \fB\-M\fP are used, respectively. If the \fB\-I\fP option is used, the output format is instead \fINF w e s n z0 z1\fP, where \fINF\fP is the total number of grids read and \fIw e s n\fP are rounded off (see \fB\-I\fP). .UNINDENT .INDENT 0.0 .TP \fB\-F\fP Report grid domain and x/y\-increments in world mapping format [Default is generic]. Does not apply to the \fB\-C\fP option. .UNINDENT .INDENT 0.0 .TP \fB\-I\fP[\fIdx\fP[/\fIdy\fP]|\fBr\fP|\fBb\fP] Report the min/max of the region to the nearest multiple of \fIdx\fP and \fIdy\fP, and output this in the form \fB\-R\fP\fIw/e/s/n\fP (unless \fB\-C\fP is set). To report the actual grid region, select \fB\-Ir\fP\&. If no argument is given then we report the grid increment in the form \fB\-I\fP\fIxinc/yinc\fP\&. If \fB\-Ib\fP is given we write each grid\(aqs bounding box polygon instead. .UNINDENT .INDENT 0.0 .TP \fB\-L\fP[\fB0\fP|\fB1\fP|\fB2\fP] .INDENT 7.0 .TP \fB\-L0\fP Report range of z after actually scanning the data, not just reporting what the header says. .TP \fB\-L1\fP Report median and L1 scale of z (L1 scale = 1.4826 * Median Absolute Deviation (MAD)). .TP \fB\-L2\fP Report mean, standard deviation, and root\-mean\-square (rms) of z. .UNINDENT .UNINDENT .INDENT 0.0 .TP \fB\-M\fP Find and report the location of min/max z\-values, and count and report the number of nodes set to NaN, if any. .UNINDENT .INDENT 0.0 .TP \fB\-R\fP[\fIunit\fP]\fIxmin\fP/\fIxmax\fP/\fIymin\fP/\fIymax\fP[\fBr\fP] (more ...) Specify the region of interest. Using the \fB\-R\fP option will select a subsection of the input grid(s). If this subsection exceeds the boundaries of the grid, only the common region will be extracted. .UNINDENT .INDENT 0.0 .TP \fB\-T\fP[\fIdz\fP][\fB+a\fP[\fIalpha\fP]] [\fB+s\fP] Determine min and max z\-value. If \fIdz\fP is provided then we first round these values off to multiples of \fIdz\fP\&. To exclude the two tails of the distribution when determining the min and max you can add \fB+a\fP to set the \fIalpha\fP value (in percent [2]): We then sort the grid, exclude the data in the 0.5*\fIalpha\fP and 100 \- 0.5*\fIalpha\fP tails, and revise the min and max. To force a symmetrical range about zero, using minus/plus the max absolute value of the two extremes, append \fB+s\fP\&. We report the result via the text string \fB\-T\fP\fIzmin/zmax\fP or \fB\-T\fP\fIzmin/zmax/dz\fP (if \fIdz\fP was given) as expected by makecpt\&. .UNINDENT .INDENT 0.0 .TP \fB\-V\fP[\fIlevel\fP] (more ...) Select verbosity level [c]. .UNINDENT .INDENT 0.0 .TP \fB\-f\fP[\fBi\fP|\fBo\fP]\fIcolinfo\fP (more ...) Specify data types of input and/or output columns. .UNINDENT .INDENT 0.0 .TP \fB\-^\fP or just \fB\-\fP Print a short message about the syntax of the command, then exits (NOTE: on Windows use just \fB\-\fP). .TP \fB\-+\fP or just \fB+\fP Print an extensive usage (help) message, including the explanation of any module\-specific option (but not the GMT common options), then exits. .TP \fB\-?\fP or no arguments Print a complete usage (help) message, including the explanation of options, then exits. .UNINDENT .SH GRID FILE FORMATS .sp By default GMT writes out grid as single precision floats in a COARDS\-complaint netCDF file format. However, GMT is able to produce grid files in many other commonly used grid file formats and also facilitates so called "packing" of grids, writing out floating point data as 1\- or 2\-byte integers. (more ...) .SH EXAMPLES .sp To obtain all the information about the data set in file hawaii_topo.nc: .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C gmt grdinfo \-L1 \-L2 \-M hawaii_topo.nc .ft P .fi .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SH SEE ALSO .sp gmt, grd2cpt, grd2xyz, grdedit .SH COPYRIGHT 2016, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe .\" Generated by docutils manpage writer. .