1GRDPASTE(1) Generic Mapping Tools GRDPASTE(1)
2
3
4
6 grdpaste - Paste together two .grd files along a common edge.
7
9 grdpaste file_a.grd file_b.grd -Goutfile.grd [ -V ] [ -f[i|o]colinfo ]
10
12 grdpaste will combine file_a.grd and file_b.grd into outfile.grd by
13 pasting them together along their common edge. Files file_a.grd and
14 file_b.grd must have the same dx, dy and have one edge in common. If
15 in doubt, check with grdinfo and use grdcut and/or grdsample if neces‐
16 sary to prepare the edge joint. For geographical grids, use -f to han‐
17 dle periodic longitudes.
18
19 file_a.grd
20 One of two files to be pasted together.
21
22 file_b.grd
23 The other of two files to be pasted together.
24
25 -Goutfile.grd
26 The name for the combined output.
27
29 -V Selects verbose mode, which will send progress reports to stderr
30 [Default runs "silently"].
31
32 -f Special formatting of input and/or output columns (time or geo‐
33 graphical data). Specify i or o to make this apply only to
34 input or output [Default applies to both]. Give one or more
35 columns (or column ranges) separated by commas. Append T (abso‐
36 lute calendar time), t (relative time in chosen TIME_UNIT since
37 TIME_EPOCH), x (longitude), y (latitude), or f (floating point)
38 to each column or column range item. Shorthand -f[i|o]g means
39 -f[i|o]0x,1y (geographic coordinates).
40
42 By default GMT writes out grid as single precision floats in a COARDS-
43 complaint netCDF file format. However, GMT is able to produce grid
44 files in many other commonly used grid file formats and also facili‐
45 tates so called "packing" of grids, writing out floating point data as
46 2- or 4-byte integers. To specify the precision, scale and offset, the
47 user should add the suffix =id[/scale/offset[/nan]], where id is a two-
48 letter identifier of the grid type and precision, and scale and offset
49 are optional scale factor and offset to be applied to all grid values,
50 and nan is the value used to indicate missing data. When reading
51 grids, the format is generally automatically recognized. If not, the
52 same suffix can be added to input grid file names. See grdreformat(1)
53 and Section 4.17 of the GMT Technical Reference and Cookbook for more
54 information.
55
56 When reading a netCDF file that contains multiple grids, GMT will read,
57 by default, the first 2-dimensional grid that can find in that file. To
58 coax GMT into reading another multi-dimensional variable in the grid
59 file, append ?varname to the file name, where varname is the name of
60 the variable. Note that you may need to escape the special meaning of ?
61 in your shell program by putting a backslash in front of it, or by
62 placing the filename and suffix between quotes or double quotes. The
63 ?varname suffix can also be used for output grids to specify a variable
64 name different from the default: "z". See grdreformat(1) and Section
65 4.18 of the GMT Technical Reference and Cookbook for more information,
66 particularly on how to read splices of 3-, 4-, or 5-dimensional grids.
67
69 Suppose file_a.grd is 150E - 180E and 0 - 30N, and file_b.grd is 150E -
70 180E, -30S - 0, then you can make outfile.grd which will be 150 - 180
71 and -30S - 30N by:
72
73 grdpaste file_a.grd file_b.grd -Goutfile.grd -V -f
74
76 GMT(1), grdcut(1), grdinfo(1), grdsample(1)
77
78
79
80GMT 4.5.6 10 Mar 2011 GRDPASTE(1)