.TH GRDCONTOUR 1gmt "Feb 27 2014" "GMT 4.5.13 (SVN)" "Generic Mapping Tools" .SH NAME grdcontour \- Contouring of 2-D gridded data sets .SH SYNOPSIS \fBgrdcontour\fP \fIgrdfile\fP \fB\-C\fP\fIcont_int\fP \fB\-J\fP\fIparameters\fP [ \fB\-A\fP[\fB-\fP|\fIannot_int\fP][\fIlabelinfo\fP] ] [ \fB\-B\fP[\fBp\fP|\fBs\fP]\fIparameters\fP ] [ \fB\-D\fP\fIdumpfile\fP ] [ \fB\-E\fP\fIazimuth/elevation\fP ] [ \fB\-F\fP[\fBl\fP|\fBr\fP] ] [ \fB\-G\fP[\fBd\fP|\fBf\fP|\fBn\fP|\fBl\fP|\fBL\fP|\fBx\fP|\fBX\fP]\fIparams\fP ] [ \fB\-K\fP ] [ \fB\-L\fP\fIlow/high\fP ] [ \fB\-O\fP ] [ \fB\-P\fP ] [ \fB\-Q\fP\fIcut\fP ] [ \fB\-R\fP\fIwest\fP/\fIeast\fP/\fIsouth\fP/\fInorth\fP[\fBr\fP] ] [ \fB\-S\fP\fIsmoothfactor\fP ] [ \fB\-T\fP[\fB+|-\fP][\fIgap/length\fP][\fB:\fP\fILH\fP] ] [ \fB\-U\fP[\fIjust\fP/\fIdx\fP/\fIdy\fP/][\fBc\fP|\fIlabel\fP] ] [ \fB\-V\fP ] [ \fB\-W\fP[\fB+\fP][\fItype\fP]\fIpen\fP ] [ \fB\-X\fP[\fBa\fP|\fBc\fP|\fBr\fP][\fIx-shift\fP[\fBu\fP]] ] [ \fB\-Y\fP[\fBa\fP|\fBc\fP|\fBr\fP][\fIy-shift\fP[\fBu\fP]] ] [ \fB\-Z\fP[\fIfactor\fP[/\fIshift\fP]][\fBp\fP] ] [ \fB\-c\fP\fIcopies\fP ] [ \fB\-bo\fP[\fBs\fP|\fBS\fP|\fBd\fP|\fBD\fP[\fIncol\fP]|\fBc\fP[\fIvar1\fP\fB/\fP\fI...\fP]] ] [ \fB\-m\fP[\fIflag\fP] ] .SH DESCRIPTION \fBgrdcontour\fP reads a 2-D grid file and produces a contour map by tracing each contour through the grid. As an option, the x/y/z positions of the contour lines may be dumped to a single multisegment file or many separate files. \fIPostScript\fP code is generated and sent to standard output. Various options that affect the plotting are available. .TP \fIgrdfile\fP 2-D gridded data set to be contoured. (See GRID FILE FORMATS below). .TP \fB\-C\fP The contours to be drawn may be specified in one of three possible ways: .br (1) If \fIcont_int\fP has the suffix ".cpt" and can be opened as a file, it is assumed to be a color palette table. The color boundaries are then used as contour levels. If the cpt-file has annotation flags in the last column then those contours will be annotated. By default all contours are labeled; use \fB\-A\-\fP to disable all annotations. .br (2) If \fIcont_int\fP is a file but not a cpt-file, it is expected to contain contour levels in column 1 and a C(ontour) OR A(nnotate) in col 2. The levels marked C (or c) are contoured, the levels marked A (or a) are contoured and annotated. Optionally, a third column may be present and contain the fixed annotation angle for this contour level. .br (3) If no file is found, then \fIcont_int\fP is interpreted as a constant contour interval. If \fB\-A\fP is set and \fB\-C\fP is not, then the contour interval is set equal to the specified annotation interval. .br If a file is given and \fB\-T\fP is set, then only contours marked with upper case C or A will have tickmarks. In all cases the contour values have the same units as the grid. .TP \fB\-J\fP Selects the map projection. Scale is UNIT/degree, 1:xxxxx, or width in UNIT (upper case modifier). UNIT is cm, inch, or m, depending on the \fBMEASURE_UNIT\fP setting in \.gmtdefaults4, but this can be overridden on the command line by appending \fBc\fP, \fBi\fP, or \fBm\fP to the scale/width value. When central meridian is optional, default is center of longitude range on \fB\-R\fP option. Default standard parallel is the equator. For map height, max dimension, or min dimension, append \fBh\fP, \fB+\fP, or \fB-\fP to the width, respectively. .br More details can be found in the \fBpsbasemap\fP man pages. .br .sp \fBCYLINDRICAL PROJECTIONS:\fP .br .sp \fB\-Jc\fP\fIlon0/lat0/scale\fP (Cassini) .br \fB\-Jcyl_stere\fP/[\fIlon0/\fP[\fIlat0/\fP]]\fIscale\fP (Cylindrical Stereographic) .br \fB\-Jj\fP[\fIlon0/\fP]\fIscale\fP (Miller) .br \fB\-Jm\fP[\fIlon0\fP/[\fIlat0/\fP]]\fIscale\fP (Mercator) .br \fB\-Jm\fP\fIlon0/lat0/scale\fP (Mercator - Give meridian and standard parallel) .br \fB\-Jo\fP[\fBa\fP]\fIlon0/lat0/azimuth/scale\fP (Oblique Mercator - point and azimuth) .br \fB\-Jo\fP[\fBb\fP]\fIlon0/lat0/lon1/lat1/scale\fP (Oblique Mercator - two points) .br \fB\-Joc\fP\fIlon0/lat0/lonp/latp/scale\fP (Oblique Mercator - point and pole) .br \fB\-Jq\fP[\fIlon0/\fP[\fIlat0/\fP]]\fIscale\fP (Cylindrical Equidistant) .br \fB\-Jt\fP\fIlon0/\fP[\fIlat0/\fP]\fIscale\fP (TM - Transverse Mercator) .br \fB\-Ju\fP\fIzone/scale\fP (UTM - Universal Transverse Mercator) .br \fB\-Jy\fP[\fIlon0/\fP[\fIlat0/\fP]]\fIscale\fP (Cylindrical Equal-Area) .br .sp \fBCONIC PROJECTIONS:\fP .br .sp \fB\-Jb\fP\fIlon0/lat0/lat1/lat2/scale\fP (Albers) .br \fB\-Jd\fP\fIlon0/lat0/lat1/lat2/scale\fP (Conic Equidistant) .br \fB\-Jl\fP\fIlon0/lat0/lat1/lat2/scale\fP (Lambert Conic Conformal) .br \fB\-Jpoly\fP/[\fIlon0/\fP[\fIlat0/\fP]]\fIscale\fP ((American) Polyconic) .br .sp \fBAZIMUTHAL PROJECTIONS:\fP .br .sp \fB\-Ja\fP\fIlon0/lat0\fP[\fI/horizon\fP]\fI/scale\fP (Lambert Azimuthal Equal-Area) .br \fB\-Je\fP\fIlon0/lat0\fP[\fI/horizon\fP]\fI/scale\fP (Azimuthal Equidistant) .br \fB\-Jf\fP\fIlon0/lat0\fP[\fI/horizon\fP]\fI/scale\fP (Gnomonic) .br \fB\-Jg\fP\fIlon0/lat0\fP[\fI/horizon\fP]\fI/scale\fP (Orthographic) .br \fB\-Jg\fP\fIlon0/lat0/altitude/azimuth/tilt/twist/Width/Height/scale\fP (General Perspective). .br \fB\-Js\fP\fIlon0/lat0\fP[\fI/horizon\fP]\fI/scale\fP (General Stereographic) .br .sp \fBMISCELLANEOUS PROJECTIONS:\fP .br .sp \fB\-Jh\fP[\fIlon0/\fP]\fIscale\fP (Hammer) .br \fB\-Ji\fP[\fIlon0/\fP]\fIscale\fP (Sinusoidal) .br \fB\-Jkf\fP[\fIlon0/\fP]\fIscale\fP (Eckert IV) .br \fB\-Jk\fP[\fBs\fP][\fIlon0/\fP]\fIscale\fP (Eckert VI) .br \fB\-Jn\fP[\fIlon0/\fP]\fIscale\fP (Robinson) .br \fB\-Jr\fP[\fIlon0/\fP]\fIscale\fP (Winkel Tripel) .br \fB\-Jv\fP[\fIlon0/\fP]\fIscale\fP (Van der Grinten) .br \fB\-Jw\fP[\fIlon0/\fP]\fIscale\fP (Mollweide) .br .sp \fBNON-GEOGRAPHICAL PROJECTIONS:\fP .br .sp \fB\-Jp\fP[\fBa\fP]\fIscale\fP[\fI/origin\fP][\fBr\fP|\fBz\fP] (Polar coordinates (theta,r)) .br \fB\-Jx\fP\fIx-scale\fP[\fBd\fP|\fBl\fP|\fBp\fP\fIpow\fP|\fBt\fP|\fBT\fP][\fI/y-scale\fP[\fBd\fP|\fBl\fP|\fBp\fP\fIpow\fP|\fBt\fP|\fBT\fP]] (Linear, log, and power scaling) .br .SH OPTIONS No space between the option flag and the associated arguments. .TP \fB\-A\fP \fIannot_int\fP is annotation interval in data units; it is ignored if contour levels are given in a file. [Default is no annotations]. Append \fB-\fP to disable all annotations implied by \fB\-C\fP. The optional \fIlabelinfo\fP controls the specifics of the label formatting and consists of a concatenated string made up of any of the following control arguments: .br .RS .TP \fB+a\fP\fIangle\fP For annotations at a fixed angle, \fB+an\fP for line-normal, or \fB+ap\fP for line-parallel [Default]. By appending the \fBu\fP or \fBd\fP we get annotations whose top face the next upper or lower annotation, respectively. .TP \fB+c\fP\fIdx\fP[/\fIdy\fP] Sets the clearance between label and optional text box. Append \fBc|i|m|p\fP to specify the unit or % to indicate a percentage of the label font size [15%]. .TP \fB+d\fP Turns on debug which will draw helper points and lines to illustrate the workings of the quoted line setup. .TP \fB+f\fP\fIfont\fP Sets the desired font [Default \fBANNOT_FONT_PRIMARY\fP]. .TP \fB+g\fP[\fIcolor\fP] Selects opaque text boxes [Default is transparent]; optionally specify the color [Default is \fBPAGE_COLOR\fP]. (See SPECIFYING COLOR below). .TP \fB+j\fP\fIjust\fP Sets label justification [Default is MC]. Ignored when -SqN|n+|-1 is used. .TP \fB+k\fP\fIcolor\fP Sets color of text labels [Default is \fBCOLOR_BACKGROUND\fP]. (See SPECIFYING COLOR below). .TP \fB+n\fP\fIdx\fP[/\fIdy\fP] Nudges the placement of labels by the specified amount (append \fBc|i|m|p\fP to specify the units). Increments are considered in the coordinate system defined by the orientation of the line; use \fB+N\fP to force increments in the plot x/y coordinates system [no nudging]. .TP \fB+o\fP Selects rounded rectangular text box [Default is rectangular]. Not applicable for curved text (\fB+v\fP) and only makes sense for opaque text boxes. .TP \fB+p\fP[\fIpen\fP] Draws the outline of text boxsets [Default is no outline]; optionally specify pen for outline [Default is width = 0.25p, color = black, texture = solid]. (See SPECIFYING PENS below). .TP \fB+r\fP\fImin_rad\fP Will not place labels where the line's radius of curvature is less than \fImin_rad\fP [Default is 0].\"' .TP \fB+s\fP\fIsize\fP Sets the desired font size in points [Default is 9]. .TP \fB+u\fP\fIunit\fP Appends \fIunit\fP to all line labels. If \fIunit\fP starts with a leading hyphen (-) then there will be no space between label value and the unit. If \fIz\fP is appended we use the unit specified in the grid file. [Default is no unit]. .TP \fB+v\fP Specifies curved labels following the path [Default is straight labels]. .TP \fB+w\fP Specifies how many (\fIx, y\fP) points will be used to estimate label angles [Default is 10]. .TP \fB+=\fP\fIprefix\fP Prepends \fIprefix\fP to all line labels. If \fIprefix\fP starts with a leading hyphen (-) then there will be no space between label value and the prefix. [Default is no prefix]. .RE .TP \fB\-B\fP Sets map boundary annotation and tickmark intervals; see the \fBpsbasemap\fP man page for all the details. .TP \fB\-D\fP Dump the (x,y,z) coordinates of each contour to separate files, one for each contour segment. The files will be named \fIdumpfile_cont_segment[_i]\fP.xyz (or \fI.b\fP is \fB\-b\fP is selected), where \fIcont\fP is the contour value and \fIsegment\fP is a running segment number for each contour interval (for closed contours we append _i.) If the prefix is given as '-' the file names are instead \fIC#_i\fP (interior) or \fIC#_e\fP (external) plus extension, and # is just a running number. This allows us to make short file names that will work with GNU utilities under DOS. However, when \fB\-m\fP is used in conjunction with \fB\-D\fP a single multisegment file is created instead. .TP \fB\-E\fP Sets the viewpoint's azimuth and elevation (for perspective view) [180/90].\"' For frames used for animation, you may want to append \fB+\fP to fix the center of your data domain (or specify a particular world coordinate point with \fB+w\fP\fIlon0\fP/\fIlat\fP[/\fIz\fP]) which will project to the center of your page size (or specify the coordinates of the projected view point with \fB+v\fP\fIx0\fP/\fIy0). .TP \fB\-F\fP Force dumped contours to be oriented so that higher z-values are to the left (\fB\-Fl\fP [Default]) or right (\fB-Fr\fP) as we move along the contour [Default is arbitrary orientation]. Requires \fB\-D\fP. .TP \fB\-G\fP Controls the placement of labels along the contours. Choose among five controlling algorithms: .RS .TP \fB\-G\fP\fBd\fP\fIdist\fP[\fBc\fP|\fBi\fP|\fBm\fP|\fBp\fP] or \fB\-G\fP\fBD\fP\fIdist\fP[\fBd\fP|\fBe\fP|\fBk\fP|\fBm\fP|\fBn\fP] For lower case \fBd\fP, give distances between labels on the plot in your preferred measurement unit \fBc\fP (cm), \fBi\fP (inch), \fBm\fP (meter), or \fBp\fP (points), while for upper case \fBD\fP, specify distances in map units and append the unit; choose among \fBe\fP (m), \fBk\fP (km), \fBm\fP (mile), \fBn\fP (nautical mile), or \fBd\fP (spherical degree). [Default is 10\fBc\fP or 4\fBi\fP]. .TP \fB\-G\fP\fBf\fP\fIffile.d\fP Reads the ascii file \fIffile.d\fP and places labels at locations in the file that matches locations along the contours. Inexact matches and points outside the region are skipped. .TP \fB\-G\fP\fBl|L\fP\fIline1\fP[,\fIline2\fP,...] Give \fIstart\fP and \fIstop\fP coordinates for one or more comma-separated straight line segments. Labels will be placed where these lines intersect the contours. The format of each \fIline\fP specification is \fIstart/stop\fP, where \fIstart\fP and \fIstop\fP are either a specified point \fIlon/lat\fP or a 2-character \fBXY\fP key that uses the justification format employed in \fBpstext\fP to indicate a point on the map, given as [LCR][BMT]. In addition, you may use Z+ and Z- which correspond to the locations of the global max and min locations in the grid, respectively. \fB\-G\fP\fBL\fP will interpret the point pairs as defining great circles [Default is straight line]. .TP \fB\-G\fP\fBn\fP\fIn_label\fP Specifies the number of equidistant labels for contours line [1]. Upper case \fB\-G\fP\fBN\fP starts labeling exactly at the start of the line [Default centers them along the line]. \fB\-G\fP\fBN\fP-1 places one justified label at start, while \fB\-G\fP\fBN\fP+1 places one justified label at the end of contours. Optionally, append /\fImin_dist\fP[c|i|m|p] to enforce that a minimum distance separation between successive labels is enforced. .TP \fB\-G\fP\fBx|X\fP\fIxfile.d\fP Reads the multi-segment file \fIxfile.d\fP and places labels at the intersections between the contours and the lines in\fIxfile.d\fP. \fB\-G\fP\fBX\fP will resample the lines first along great-circle arcs. .P In addition, you may optionally append \fB+r\fP\fIradius\fP[\fBc\fP|\fBi\fP|\fBm\fP|\fBp\fP] to set a minimum label separation in the x-y plane [no limitation]. .RE .TP \fB\-K\fP More \fIPostScript\fP code will be appended later [Default terminates the plot system]. .TP \fB\-L\fP Limit range: Do not draw contours for data values below \fIlow\fP or above \fIhigh\fP. .TP \fB\-O\fP Selects Overlay plot mode [Default initializes a new plot system]. .TP \fB\-P\fP Selects Portrait plotting mode [Default is Landscape, see \fBgmtdefaults\fP to change this]. .TP \fB\-Q\fP Do not draw contours with less than \fIcut\fP number of points [Draw all contours]. .TP \fB\-R\fP \fIxmin\fP, \fIxmax\fP, \fIymin\fP, and \fIymax\fP specify the Region of interest. For geographic regions, these limits correspond to \fIwest, east, south,\fP and \fInorth\fP and you may specify them in decimal degrees or in [+-]dd:mm[:ss.xxx][W|E|S|N] format. Append \fBr\fP if lower left and upper right map coordinates are given instead of w/e/s/n. The two shorthands \fB\-Rg\fP and \fB\-Rd\fP stand for global domain (0/360 and -180/+180 in longitude respectively, with -90/+90 in latitude). Alternatively, specify the name of an existing grid file and the \fB\-R\fP settings (and grid spacing, if applicable) are copied from the grid. For calendar time coordinates you may either give (a) relative time (relative to the selected \fBTIME_EPOCH\fP and in the selected \fBTIME_UNIT\fP; append \fBt\fP to \fB\-JX\fP|\fBx\fP), or (b) absolute time of the form [\fIdate\fP]\fBT\fP[\fIclock\fP] (append \fBT\fP to \fB\-JX\fP|\fBx\fP). At least one of \fIdate\fP and \fIclock\fP must be present; the \fBT\fP is always required. The \fIdate\fP string must be of the form [-]yyyy[-mm[-dd]] (Gregorian calendar) or yyyy[-Www[-d]] (ISO week calendar), while the \fIclock\fP string must be of the form hh:mm:ss[.xxx]. The use of delimiters and their type and positions must be exactly as indicated (however, input, output and plot formats are customizable; see \fBgmtdefaults\fP). [Default is region defined in the grid file]. .TP \fB\-S\fP Used to resample the contour lines at roughly every (gridbox_size/\fIsmoothfactor\fP) interval. .TP \fB\-T\fP Will draw tickmarks pointing in the downward direction every \fIgap\fP along the innermost closed contours. Append \fIgap\fP and tickmark length or use defaults [0.5\fBc\fP/0.1c or 0.2\fBi\fP/0.04i]. User may choose to tick only local highs or local lows by specifying \fB\-T+\fP or \fB\-T\-\fP, respectively. Appending \fB:LH\fP will plot the characters L and H at the center of closed innermost contours (local lows and highs). L and H can be any single character (e.g., LH, -+, etc.) If a file is given by \fB\-C\fP and \fB\-T\fP is set, then only contours marked with upper case C or A will have tickmarks [and annotation]. .TP \fB\-U\fP Draw Unix System time stamp on plot. By adding \fIjust/dx/dy/\fP, the user may specify the justification of the stamp and where the stamp should fall on the page relative to lower left corner of the plot. For example, BL/0/0 will align the lower left corner of the time stamp with the lower left corner of the plot. Optionally, append a \fIlabel\fP, or \fBc\fP (which will plot the command string.). The \fBGMT\fP parameters \fBUNIX_TIME\fP, \fBUNIX_TIME_POS\fP, and \fBUNIX_TIME_FORMAT\fP can affect the appearance; see the \fBgmtdefaults\fP man page for details. The time string will be in the locale set by the environment variable \fBTZ\fP (generally local time). .TP \fB\-V\fP Selects verbose mode, which will send progress reports to stderr [Default runs "silently"]. .TP \fB\-W\fP \fItype\fP, if present, can be \fBa\fP for annotated contours or \fBc\fP for regular contours [Default]. \fIpen\fP sets the attributes for the particular line. Default values for annotated contours: width = 0.75p, color = black, texture = solid. Regular contours have default width = 0.25p. (See SPECIFYING PENS below). If the \fB+\fP flag is specified then the color of the contour lines are taken from the cpt file (see \fB\-C\fP). .TP \fB\-X\fP \fB\-Y\fP Shift plot origin relative to the current origin by (\fIx-shift,y-shift\fP) and optionally append the length unit (\fBc\fP, \fBi\fP, \fBm\fP, \fBp\fP). You can prepend \fBa\fP to shift the origin back to the original position after plotting, or prepend \fBr\fP [Default] to reset the current origin to the new location. If \fB\-O\fP is used then the default (\fIx-shift,y-shift\fP) is (0,0), otherwise it is (r1i, r1i) or (r2.5c, r2.5c). Alternatively, give \fBc\fP to align the center coordinate (x or y) of the plot with the center of the page based on current page size. .TP \fB\-Z\fP Use to subtract \fIshift\fP from the data and multiply the results by \fIfactor\fP before contouring starts [1/0]. (Numbers in \fB\-A\fP, \fB\-C\fP, \fB\-L\fP refer to values after scaling and translation have occurred.) Append \fBp\fP to indicate that this grid file contains z-values that are periodic in 360 degrees (e.g., phase data, angular distributions) and that special precautions must be taken when determining 0-contours. .TP \fB\-bo\fP Selects binary output. Append \fBs\fP for single precision [Default is \fBd\fP (double)]. Uppercase \fBS\fP or \fBD\fP will force byte-swapping. Optionally, append \fIncol\fP, the number of desired columns in your binary output file. .TP \fB\-c\fP Specifies the number of plot copies. [Default is 1]. .TP \fB\-f\fP Special formatting of input and/or output columns (time or geographical data). Specify \fBi\fP or \fBo\fP to make this apply only to input or output [Default applies to both]. Give one or more columns (or column ranges) separated by commas. Append \fBT\fP (absolute calendar time), \fBt\fP (relative time in chosen \fBTIME_UNIT\fP since \fBTIME_EPOCH\fP), \fBx\fP (longitude), \fBy\fP (latitude), or \fBf\fP (floating point) to each column or column range item. Shorthand \fB\-f\fP[\fBi\fP|\fBo\fP]\fBg\fP means \fB\-f\fP[\fBi\fP|\fBo\fP]0\fBx\fP,1\fBy\fP (geographic coordinates). .TP \fB\-m\fP When used in conjunction with \fB\-D\fP a single multisegment file is created, and each contour section is preceded by a header record whose first column is \fIflag\fP followed by the contour level. .SS SPECIFYING PENS .TP \fIpen\fP The attributes of lines and symbol outlines as defined by \fIpen\fP is a comma delimetered list of \fIwidth\fP, \fIcolor\fP and \fItexture\fP, each of which is optional. \fIwidth\fP can be indicated as a measure (points, centimeters, inches) or as \fBfaint\fP, \fBthin\fP[\fBner\fP|\fBnest\fP], \fBthick\fP[\fBer\fP|\fBest\fP], \fBfat\fP[\fBter\fP|\fBtest\fP], or \fBobese\fP. \fIcolor\fP specifies a gray shade or color (see SPECIFYING COLOR below). \fItexture\fP is a combination of dashes `-' and dots `.'. .SS SPECIFYING COLOR .TP \fIcolor\fP The \fIcolor\fP of lines, areas and patterns can be specified by a valid color name; by a gray shade (in the range 0\-255); by a decimal color code (r/g/b, each in range 0\-255; h-s-v, ranges 0\-360, 0\-1, 0\-1; or c/m/y/k, each in range 0\-1); or by a hexadecimal color code (#rrggbb, as used in HTML). See the \fBgmtcolors\fP manpage for more information and a full list of color names. .SH ASCII FORMAT PRECISION The ASCII output formats of numerical data are controlled by parameters in your \.gmtdefaults4 file. Longitude and latitude are formatted according to \fBOUTPUT_DEGREE_FORMAT\fP, whereas other values are formatted according to \fBD_FORMAT\fP. Be aware that the format in effect can lead to loss of precision in the output, which can lead to various problems downstream. If you find the output is not written with enough precision, consider switching to binary output (\fB\-bo\fP if available) or specify more decimals using the \fBD_FORMAT\fP setting. .SH FILE FORMATS \fBGMT\fP is able to recognize many of the commonly used grid file formats, as well as the precision, scale and offset of the values contained in the grid file. When \fBGMT\fP needs a little help with that, you can add the suffix \fB=\fP\fIid\fP[\fB/\fP\fIscale\fP\fB/\fP\fIoffset\fP[\fB/\fP\fInan\fP]], where \fIid\fP is a two-letter identifier of the grid type and precision, and \fIscale\fP and \fIoffset\fP are optional scale factor and offset to be applied to all grid values, and \fInan\fP is the value used to indicate missing data. See \fBgrdreformat\fP(1) and Section 4.17 of the GMT Technical Reference and Cookbook for more information. .P When reading a netCDF file that contains multiple grids, \fBGMT\fP will read, by default, the first 2-dimensional grid that can find in that file. To coax \fBGMT\fP into reading another multi-dimensional variable in the grid file, append \fB?\fP\fIvarname\fP to the file name, where \fIvarname\fP is the name of the variable. Note that you may need to escape the special meaning of \fB?\fP in your shell program by putting a backslash in front of it, or by placing the filename and suffix between quotes or double quotes. See \fBgrdreformat\fP(1) and Section 4.18 of the GMT Technical Reference and Cookbook for more information, particularly on how to read splices of 3-, 4-, or 5-dimensional grids. .SH EXAMPLES To contour the file hawaii_grav.grd every 25 mGal on a Mercator map at 0.5 inch/degree, annotate every 50 mGal (using fontsize = 10), using 1 degree tickmarks, and draw 30 minute gridlines: .br .sp \fBgrdcontour\fP hawaii_grav.grd \fB\-Jm\fP 0.5\fBi\fP \fB\-C\fP 25 \fB\-A\fP 50\fB+s\fP10 \fB\-B\fP 1\fBg\fP30\fBm\fP > hawaii_grav.ps .br .sp To contour the file image.grd using the levels in the file cont.d on a linear projection at 0.1 cm/x-unit and 50 cm/y-unit, using 20 (x) and 0.1 (y) tickmarks, smooth the contours a bit, use "RMS Misfit" as plot-title, use a thick red pen for annotated contours, and a thin, dashed, blue pen for the rest, and send the output to the default printer: .br .sp \fBgrdcontour\fP image.grd \fB\-Jx\fP 0.1\fBc\fP/50.0\fBc\fP \fB\-C\fP cont.d \fB\-S\fP 4 \fB\-B\fP 20/0.1:."RMS Misfit": \fB\-Wa\fP thick,red \fB\-Wc\fP thinnest,blue,- | lp .sp The labeling of local highs and lows may plot outside the innermost contour since only the mean value of the contour coordinates is used to position the label. .SH "SEE ALSO" .IR GMT (1), .IR gmtdefaults (1), .IR gmtcolors (5), .IR psbasemap (1), .IR grdimage (1), .IR grdview (1), .IR pscontour (1)