1GRDBLEND(1)                  Generic Mapping Tools                 GRDBLEND(1)
2
3
4

NAME

6       grdblend  -  Blend  several partially over-lapping grids into one large
7       grid
8

SYNOPSIS

10       grdblend   blendfile   -Ggrdfile    -Ixinc[unit][=|+][/yinc[unit][=|+]]
11       -Rwest/east/south/north[r]  [ -Nnodata ] [ -Q ] [ -Zscale ] [ -V ] [ -W
12       ] [ -fcolinfo ]
13

DESCRIPTION

15       grdblend reads a listing of gridded files and blend parameters and cre‐
16       ates  a binary grid file by blending the other grids using cosine-taper
17       weights.  grdblend will report if some of the nodes are not  filled  in
18       with  data.   Such  unconstrained nodes are set to a value specified by
19       the user [Default is NaN].  Nodes with more than one value will be  set
20       to the weighted average value.
21
22       blendfile
23              ASCII  file  with  one  record  per  grid file to include in the
24              blend.  Each record must contain the gridfile name, the  -R-set‐
25              ting  for the interior region, and the relative weight wr, sepa‐
26              rated by spaces or tabs.  In the combined weighting scheme, this
27              grid will be given weight = zero outside its domain, weight = wr
28              inside the interior region,  and  a  2-D  cosine-tapered  weight
29              between  those end-members in the boundary strip.  However, if a
30              negative wr is given then the  sense  of  tapering  is  inverted
31              (i.e., zero weight inside its domain).  If the ASCII file is not
32              given grdblend will read standard input.
33
34       -G     grdfile is the name of the binary output grid file.   (See  GRID
35              FILE FORMATS below).
36
37       -I     x_inc  [and  optionally  y_inc] is the grid spacing. Optionally,
38              append a suffix modifier.  Geographical  (degrees)  coordinates:
39              Append  m  to indicate arc minutes or c to indicate arc seconds.
40              If one of the units e, k, i,  or  n  is  appended  instead,  the
41              increment  is assumed to be given in meter, km, miles, or nauti‐
42              cal miles, respectively, and will be converted to the equivalent
43              degrees longitude at the middle latitude of the region (the con‐
44              version depends on ELLIPSOID).  If /y_inc is given but set to  0
45              it  will be reset equal to x_inc; otherwise it will be converted
46              to degrees latitude.  All coordinates: If = is appended then the
47              corresponding max x (east) or y (north) may be slightly adjusted
48              to fit exactly the given increment [by default the increment may
49              be adjusted slightly to fit the given domain].  Finally, instead
50              of giving an increment you  may  specify  the  number  of  nodes
51              desired  by  appending  +  to the supplied integer argument; the
52              increment is then recalculated from the number of nodes and  the
53              domain.   The  resulting  increment value depends on whether you
54              have selected a gridline-registered  or  pixel-registered  grid;
55              see Appendix B for details.
56
57       -R     xmin,  xmax, ymin, and ymax specify the Region of interest.  For
58              geographic regions,  these  limits  correspond  to  west,  east,
59              south,  and north and you may specify them in decimal degrees or
60              in [+-]dd:mm[:ss.xxx][W|E|S|N] format.  Append r if  lower  left
61              and  upper  right  map coordinates are given instead of w/e/s/n.
62              The two shorthands -Rg and -Rd stand for  global  domain  (0/360
63              and  -180/+180  in longitude respectively, with -90/+90 in lati‐
64              tude).  For calendar time coordinates you may  either  give  (a)
65              relative  time  (relative  to the selected TIME_EPOCH and in the
66              selected TIME_UNIT; append t to -JX|x), or (b) absolute time  of
67              the  form  [date]T[clock]  (append T to -JX|x).  At least one of
68              date and clock must be present; the T is always  required.   The
69              date  string  must  be  of the form [-]yyyy[-mm[-dd]] (Gregorian
70              calendar) or yyyy[-Www[-d]] (ISO week calendar), while the clock
71              string  must  be  of the form hh:mm:ss[.xxx].  The use of delim‐
72              iters and their type and positions must be exactly as  indicated
73              (however,  input,  output and plot formats are customizable; see
74              gmtdefaults).
75

OPTIONS

77       -N     No data.  Set nodes with no input grid to this value [Default is
78              NaN].
79
80       -Q     Create  a header-less grid file suitable for use with grdraster.
81              Requires that the output grid file is a native format (i.e., not
82              netCDF).
83
84       -V     Selects verbose mode, which will send progress reports to stderr
85              [Default runs "silently"].
86
87       -W     Do not blend, just output the weights used for each node.   This
88              option  is  valid  when only one input grid is provided [Default
89              makes the blend].
90
91       -Z     Scale output values by scale before writing to file. [1].
92
93       -f     Special formatting of input and/or output columns (time or  geo‐
94              graphical  data).   Specify  i  or  o to make this apply only to
95              input or output [Default applies to both].   Give  one  or  more
96              columns (or column ranges) separated by commas.  Append T (abso‐
97              lute calendar time), t (relative time in chosen TIME_UNIT  since
98              TIME_EPOCH),  x (longitude), y (latitude), or f (floating point)
99              to each column or column range item.  Shorthand  -f[i|o]g  means
100              -f[i|o]0x,1y (geographic coordinates).
101

GRID FILE FORMATS

103       By  default GMT writes out grid as single precision floats in a COARDS-
104       complaint netCDF file format.  However, GMT is  able  to  produce  grid
105       files  in  many  other commonly used grid file formats and also facili‐
106       tates so called "packing" of grids, writing out floating point data  as
107       2-  or 4-byte integers. To specify the precision, scale and offset, the
108       user should add the suffix =id[/scale/offset[/nan]], where id is a two-
109       letter  identifier of the grid type and precision, and scale and offset
110       are optional scale factor and offset to be applied to all grid  values,
111       and nan is the value used to indicate missing data.  See grdreformat(1)
112       and Section 4.17 of the GMT Technical Reference and Cookbook  for  more
113       information.
114
115       When  writing  a  netCDF  file,  the grid is stored by default with the
116       variable name "z". To specify another  variable  name  varname,  append
117       ?varname  to  the file name.  Note that you may need to escape the spe‐
118       cial meaning of ? in your shell program by putting a backslash in front
119       of  it,  or by placing the filename and suffix between quotes or double
120       quotes.
121

GEOGRAPHICAL AND TIME COORDINATES

123       When the output grid type is netCDF, the coordinates  will  be  labeled
124       "longitude", "latitude", or "time" based on the attributes of the input
125       data or grid (if any) or on the -f or -R  options.  For  example,  both
126       -f0x  -f1t  and  -R90w/90e/0t/3t  will result in a longitude/time grid.
127       When the x, y, or z coordinate is time, it will be stored in  the  grid
128       as  relative  time since epoch as specified by TIME_UNIT and TIME_EPOCH
129       in the .gmtdefaults file or on the command line.  In addition, the unit
130       attribute of the time variable will indicate both this unit and epoch.
131

EXAMPLES

133       To create a grid file from the four gridded files piece_?.grd, make the
134       blendfile like this
135
136       piece_1.grd    -R<subregion_1> 1
137       piece_2.grd    -R<subregion_2> 1
138       piece_3.grd    -R<subregion_3> 1
139       piece_4.grd    -R<subregion_4> 1
140
141       Then run
142
143       grdblend blend.job -Gblend.grd -R<full_region> -I<dx/dy> -V
144

RESTRICTIONS

146       Currently, all grids processed must have the exact same node  registra‐
147       tion as well as grid spacing as the final output grid.
148

SEE ALSO

150       GMT(1), grd2xyz(1), grdedit(1)
151
152
153
154GMT 4.3.1                         15 May 2008                      GRDBLEND(1)
Impressum