GRDCUT(1)

NAME
grdcut - Extract a subregion out of a grid file

SYNOPSIS
grdcut input_file.grd -Goutput_file.grd -Rwest/east/south/north[r] [ -V ] [ -f[i|o]colinfo ]

DESCRIPTION
grdcut will produce a new output_file.grd file which is a subregion of input_file.grd. The subregion is specified with -R as in other programs; the specified range must not exceed the range of input_file.grd. If in doubt, run grdinfo to check range. Complementary to grdcut there is grdpaste, which will join together two grid files along a common edge.

input_file.grd
    this is the input .grd format file.

-Goutput_file.grd
    this is the output .grd format file.

-R  xmin, xmax, ymin, and ymax specify the Region of interest. For geographic regions, these limits correspond to west, east, south, and north and you may specify them in decimal degrees or in [+-]dd:mm[:ss.xxx][W|E|S|N] format. Append r if lower left and upper right map coordinates are given instead of w/e/s/n. The two shorthands -Rg and -Rd stand for global domain (0/360 and -180/+180 in longitude respectively, with -90/+90 in latitude). For calendar time coordinates you may either give (a) relative time (relative to the selected TIME_EPOCH and in the selected TIME_UNIT; append t to -JX|x), or (b) absolute time of the form [date]T[clock] (append T to -JX|x). At least one of date and clock must be present; the T is always required. The date string must be of the form [-]yyyy[-mm[-dd]] (Gregorian calendar) or yyyy[-Www[-d]] (ISO week calendar), while the clock 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 gmtdefaults). This defines the subregion to be cut out.

OPTIONS

-V  Selects verbose mode, which will send progress reports to stderr [Default runs "silently"].

-f  Special formatting of input and/or output columns (time or geographical data). Specify i or o 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 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
Suppose you have used surface to grid ship gravity in the region between 148E - 162E and 8N - 32N, and you do not trust the gridding near the edges, so you want to keep only the area between 150E - 160E and 10N - 30N, then:

grdcut grav_148_162_8_32.grd -Ggrav_150_160_10_30.grd -R150/160/10/30 -V

SEE ALSO
grdpaste(1), grdinfo(1), GMT(1)