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 grid files and blend parameters and creates
16       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 three items, separated by  spa‐
25              ces  or tabs: the gridfile name, the -R-setting for the interior
26              region, and the relative weight wr.  In the  combined  weighting
27              scheme,  this grid will be given zero weight outside its domain,
28              weight = wr inside the interior region, and a 2-D cosine-tapered
29              weight  between  those  end-members in the boundary strip.  How‐
30              ever, if a negative wr is given then the sense  of  tapering  is
31              inverted  (i.e.,  zero  weight inside its domain).  If the inner
32              region should instead exactly match the grid region then specify
33              a  -  instead of the -R-setting.  If the ASCII file is not given
34              grdblend will read standard input.
35
36       -G     grdfile is the name of the binary output grid file.   (See  GRID
37              FILE FORMATS below).
38
39       -I     x_inc  [and  optionally  y_inc] is the grid spacing. Optionally,
40              append a suffix modifier.  Geographical  (degrees)  coordinates:
41              Append  m  to indicate arc minutes or c to indicate arc seconds.
42              If one of the units e, k, i,  or  n  is  appended  instead,  the
43              increment  is assumed to be given in meter, km, miles, or nauti‐
44              cal miles, respectively, and will be converted to the equivalent
45              degrees longitude at the middle latitude of the region (the con‐
46              version depends on ELLIPSOID).  If /y_inc is given but set to  0
47              it  will be reset equal to x_inc; otherwise it will be converted
48              to degrees latitude.  All coordinates: If = is appended then the
49              corresponding max x (east) or y (north) may be slightly adjusted
50              to fit exactly the given increment [by default the increment may
51              be adjusted slightly to fit the given domain].  Finally, instead
52              of giving an increment you  may  specify  the  number  of  nodes
53              desired  by  appending  +  to the supplied integer argument; the
54              increment is then recalculated from the number of nodes and  the
55              domain.   The  resulting  increment value depends on whether you
56              have selected a gridline-registered  or  pixel-registered  grid;
57              see  Appendix  B  for  details.  Note: if -Rgrdfile is used then
58              grid spacing has already been initialized; use  -I  to  override
59              the values.
60
61       -R     xmin,  xmax, ymin, and ymax specify the Region of interest.  For
62              geographic regions,  these  limits  correspond  to  west,  east,
63              south,  and north and you may specify them in decimal degrees or
64              in [+-]dd:mm[:ss.xxx][W|E|S|N] format.  Append r if  lower  left
65              and  upper  right  map coordinates are given instead of w/e/s/n.
66              The two shorthands -Rg and -Rd stand for  global  domain  (0/360
67              and  -180/+180  in longitude respectively, with -90/+90 in lati‐
68              tude).  Alternatively, specify the name of an existing grid file
69              and the -R settings (and grid spacing, if applicable) are copied
70              from the grid.  For calendar time  coordinates  you  may  either
71              give  (a) relative time (relative to the selected TIME_EPOCH and
72              in the selected TIME_UNIT; append t to -JX|x), or  (b)  absolute
73              time  of  the form [date]T[clock] (append T to -JX|x).  At least
74              one of date and clock must be present; the T is always required.
75              The date string must be of the form [-]yyyy[-mm[-dd]] (Gregorian
76              calendar) or yyyy[-Www[-d]] (ISO week calendar), while the clock
77              string  must  be  of the form hh:mm:ss[.xxx].  The use of delim‐
78              iters and their type and positions must be exactly as  indicated
79              (however,  input,  output and plot formats are customizable; see
80              gmtdefaults).
81

OPTIONS

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

GRID FILE FORMATS

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

GEOGRAPHICAL AND TIME COORDINATES

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

EXAMPLES

139       To  create  a  grid  file from the four grid files piece_?.nc, make the
140       blendfile like this
141
142       piece_1.nc     -R<subregion_1> 1
143       piece_2.nc     -R<subregion_2> 1
144       piece_3.nc     -R<subregion_3> 1
145       piece_4.nc     -R<subregion_4> 1
146
147       Then run
148
149       grdblend blend.job -Gblend.nc -R<full_region> -I<dx/dy> -V
150

RESTRICTIONS

152       Currently, all grids processed must have the exact same node  registra‐
153       tion and grid spacing as the final output grid.
154

SEE ALSO

156       GMT(1), grd2xyz(1), grdedit(1) grdraster(1)
157
158
159
160GMT 4.5.6                         10 Mar 2011                      GRDBLEND(1)
Impressum