1SPHINTERPOLATE(1)                     GMT                    SPHINTERPOLATE(1)
2
3
4

NAME

6       sphinterpolate - Spherical gridding in tension of data on a sphere
7

SYNOPSIS

9       sphinterpolate    [   table   ]    -Ggrdfile   [    -Iincrement   ]   [
10       -Qmode[/options] ] [  -Rregion ] [  -V[level] ] [  -Z ] [ -bibinary ] [
11       -dinodata ] [ -eregexp ] [ -hheaders ] [ -iflags ] [ -r ] [ -:[i|o] ]
12
13       Note:  No  space  is allowed between the option flag and the associated
14       arguments.
15

DESCRIPTION

17       sphinterpolate reads one or more ASCII [or binary] files  (or  standard
18       input)  containing lon, lat, z and performs a Delaunay triangulation to
19       set up a spherical interpolation in tension. The final grid is saved to
20       the  specified file. Several options may be used to affect the outcome,
21       such as choosing local versus global gradient  estimation  or  optimize
22       the tension selection to satisfy one of four criteria.
23

REQUIRED ARGUMENTS

25       -Ggrdfile
26              Name of the output grid to hold the interpolation.
27

OPTIONAL ARGUMENTS

29       table  One  or  more ASCII (or binary, see -bi[ncols][type]) data table
30              file(s) holding a number of data columns. If no tables are given
31              then we read from standard input.
32
33       -Ixinc[unit][+e|n][/yinc[unit][+e|n]]
34              x_inc  [and  optionally  y_inc] is the grid spacing. Optionally,
35              append a suffix modifier.  Geographical  (degrees)  coordinates:
36              Append  m  to indicate arc minutes or s to indicate arc seconds.
37              If one of the units e, f, k, M, n or u is appended instead,  the
38              increment  is assumed to be given in meter, foot, km, Mile, nau‐
39              tical mile or US survey foot, respectively,  and  will  be  con‐
40              verted  to  the equivalent degrees longitude at the middle lati‐
41              tude of the region (the conversion depends  on  PROJ_ELLIPSOID).
42              If  y_inc is given but set to 0 it will be reset equal to x_inc;
43              otherwise it will be converted to degrees latitude. All  coordi‐
44              nates:  If +e is appended then the corresponding max x (east) or
45              y (north) may be slightly adjusted  to  fit  exactly  the  given
46              increment  [by default the increment may be adjusted slightly to
47              fit the given domain]. Finally, instead of giving  an  increment
48              you  may  specify the number of nodes desired by appending +n to
49              the supplied integer argument; the increment  is  then  recalcu‐
50              lated  from  the  number  of nodes and the domain. The resulting
51              increment value depends on whether you  have  selected  a  grid‐
52              line-registered  or  pixel-registered grid; see App-file-formats
53              for details. Note: if -Rgrdfile is used then  the  grid  spacing
54              has already been initialized; use -I to override the values.
55
56       -Qmode[/options]
57              Specify  one  of  four ways to calculate tension factors to pre‐
58              serve local shape properties or satisfy arc constraints [Default
59              is no tension].
60
61       -Q0    Piecewise linear interpolation; no tension is applied.
62
63       -Q1    Smooth interpolation with local gradient estimates.
64
65       -Q2    Smooth  interpolation  with  global  gradient estimates. You may
66              optionally append /N/M/U, where N is the  number  of  iterations
67              used  to  converge at solutions for gradients when variable ten‐
68              sions are selected (e.g., -T only)  [3],  M  is  the  number  of
69              Gauss-Seidel  iterations used when determining the global gradi‐
70              ents [10], and U is the maximum change in a gradient at the last
71              iteration [0.01].
72
73       -Q3    Smoothing.  Optionally  append  /E/U [/0/0], where E is Expected
74              squared error in a typical (scaled) data value, and U  is  Upper
75              bound on weighted sum of squares of deviations from data.
76
77       -Rwest/east/south/north[/zmin/zmax][+r][+uunit]
78              west, east, south, and north specify the region of interest, and
79              you   may   specify   them   in   decimal    degrees    or    in
80              [±]dd:mm[:ss.xxx][W|E|S|N]  format  Append  +r if lower left and
81              upper right map coordinates are given instead  of  w/e/s/n.  The
82              two  shorthands  -Rg  and -Rd stand for global domain (0/360 and
83              -180/+180 in longitude respectively, with -90/+90 in  latitude).
84              Alternatively  for grid creation, give Rcodelon/lat/nx/ny, where
85              code is a 2-character combination of L, C, R (for left,  center,
86              or  right)  and T, M, B for top, middle, or bottom. e.g., BL for
87              lower left.  This indicates which point on a rectangular  region
88              the lon/lat coordinate refers to, and the grid dimensions nx and
89              ny with grid spacings via -I is used to create the corresponding
90              region.   Alternatively,  specify  the  name of an existing grid
91              file and the -R settings (and grid spacing, if  applicable)  are
92              copied from the grid. Appending +uunit expects projected (Carte‐
93              sian) coordinates compatible with chosen  -J  and  we  inversely
94              project  to determine actual rectangular geographic region.  For
95              perspective view (-p), optionally append /zmin/zmax.  In case of
96              perspective view (-p), a z-range (zmin, zmax) can be appended to
97              indicate the third dimension. This needs to be  done  only  when
98              using  the -Jz option, not when using only the -p option. In the
99              latter case a perspective view of the plane is plotted, with  no
100              third dimension.
101
102       -T     Use variable tension (ignored with -Q0 [constant]
103
104       -V[level] (more ...)
105              Select verbosity level [c].
106
107       -Z     Before  interpolation,  scale data by the maximum data range [no
108              scaling].
109
110       -bi[ncols][t] (more ...)
111              Select native binary input. [Default is 3 input columns].
112
113       -dinodata (more ...)
114              Replace input columns that equal nodata with NaN.
115
116       -e[~]"pattern" | -e[~]/regexp/[i] (more ...)
117              Only accept data records that match the given pattern.
118
119       -h[i|o][n][+c][+d][+rremark][+rtitle] (more ...)
120              Skip or produce header record(s).
121
122       -:[i|o] (more ...)
123              Swap 1st and 2nd column on input and/or output.
124
125       -r (more ...)
126              Set pixel node registration [gridline].
127
128       -^ or just -
129              Print a short message about the  syntax  of  the  command,  then
130              exits (NOTE: on Windows just use -).
131
132       -+ or just +
133              Print  an extensive usage (help) message, including the explana‐
134              tion of any module-specific  option  (but  not  the  GMT  common
135              options), then exits.
136
137       -? or no arguments
138              Print a complete usage (help) message, including the explanation
139              of all options, then exits.
140

ASCII FORMAT PRECISION

142       The ASCII output formats of numerical data are controlled by parameters
143       in  your  gmt.conf file. Longitude and latitude are formatted according
144       to  FORMAT_GEO_OUT,  absolute  time  is  under  the  control  of   FOR‐
145       MAT_DATE_OUT  and FORMAT_CLOCK_OUT, whereas general floating point val‐
146       ues are formatted according to FORMAT_FLOAT_OUT. Be aware that the for‐
147       mat  in effect can lead to loss of precision in ASCII output, which can
148       lead to various problems downstream. If you  find  the  output  is  not
149       written with enough precision, consider switching to binary output (-bo
150       if available) or specify more decimals using the FORMAT_FLOAT_OUT  set‐
151       ting.
152

EXAMPLES

154       To  interpolate  the  points  in  the file testdata.txt on a global 1x1
155       degree grid with no tension, use
156          sphinterpolate testdata.txt -Rg -I1 -Gsolution.nc
157

SEE ALSO

159       gmt, greenspline, nearneighbor, sphdistance,  sphtriangulate,  surface,
160       triangulate
161

REFERENCES

163       Renka, R, J., 1997, Algorithm 772: STRIPACK: Delaunay Triangulation and
164       Voronoi Diagram on the Surface of a Sphere, AMC Trans. Math.  Software,
165       23(3), 416-434.
166
167       Renka, R, J,, 1997, Algorithm 773: SSRFPACK: Interpolation of scattered
168       data on the Surface of a Sphere  with  a  surface  under  tension,  AMC
169       Trans. Math. Software, 23(3), 435-442.
170
172       2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
173
174
175
176
1775.4.5                            Feb 24, 2019                SPHINTERPOLATE(1)
Impressum