Provided by: gmt-common_5.4.5+dfsg-2_all

**NAME**

gpsgridder - Interpolate GPS strain vectors using Green's functions for elastic deformation

**SYNOPSIS**

gpsgridder[table]-Goutfile[-Iincrement] [-Rregion] [-C[n|r|v]value[+ffile] ] [-E[misfitfile] ] [-F[d|f]fudge] [-L] [-Nnodefile] [-Snu] [-Tmaskgrid] [-V[level] ] [-W[w]] [-bbinary ] [-dnodata ] [-eregexp ] [-fflags ] [-hheaders ] [-oflags ] [-x[[-]n] ] [-:[i|o] ]Note:No space is allowed between the option flag and the associated arguments.

**DESCRIPTION**

gpsgriddergrids 2-D vector data such as GPS velocities by using a coupled model based on 2-D elasticity. The degree of coupling can be tuned by adjusting the effective Poisson's ratio. The solution field can be tuned to extremes such as incompressible (1), typical elastic (0.5) or even an unphysical value of -1 that basically removes the elastic coupling of vector interpolation. Smoothing is offered via the optional elimination of small eigenvalues.

**REQUIRED** **ARGUMENTS**

tabletable with GPS strain rates at discrete locations. We expect the input format to bexyuv[dudv] (see-Wto specify data uncertainties or weights). Iflonlatis given you must supply-fgand we will use a flat Earth approximation in the calculation of distances.-GoutfileName of resulting output file. (1) If options-R,-I, and possibly-rare set we produce two equidistant output grids. In this case,outfilemust be a name template containing the C format specifier %s, which will be replaced with u and v, respectively. (2) If option-Tis selected then-R,-Icannot be given as themaskgriddetermines the region and increments. Again, theoutfilemust be a name template for the two output grids. (3) If-Nis selected then the output is a single ASCII (or binary; see-bo) table written tooutfile; if-Gis not given then this table is written to standard output. The-Goption is ignored if-Cor-C0 is given.

**OPTIONAL** **ARGUMENTS**

-C[n|r|v]value[+ffile] Find an approximate surface fit: Solve the linear system for the spline coefficients by SVD and eliminate the contribution from all eigenvalues whose ratio to the largest eigenvalue is less thanvalue[Default uses Gauss-Jordan elimination to solve the linear system and fit the data exactly]. Optionally, append+ffileto save the eigenvalue ratios to the specified file for further analysis. Finally, if a negativevalueis given then+ffileis required and execution will stop after saving the eigenvalues, i.e., no surface output is produced. Specify-Cvvalueto use the largest eigenvalues needed to explainvalue% of the data variance. Specify-Crvalueto use the largest eigenvalues needed to leave approximatelyvalueas the model misfit. Ifvalueis not given then-Wis required and we computevalueas the rms of the given data uncertainties. Alternatively, use-Cnvalueto select thevaluelargest eigenvalues. If afileis given with-Cvthen we save the eigenvalues instead of the ratios. Note: 1/4 of the total number of data constraints is a good starting point for further experiments.E[misfitfile] Evaluate the spline exactly at the input data locations and report statistics of the misfit (mean, standard deviation, and rms) foruandvseparately and combined. Optionally, append a filename and we will write the data table, augmented by two extra columns after each of theuandvcolumns holding the spline estimates and misfits.-F[d|f]fudgeThe Green's functions are proportional to terms like 1/r^2 and log(r) and thus blow up for r == 0. To prevent that we offer two fudging schemes:-Fddel_radiuslets you add a constant offset to all radii and must be specified in the user units. Alternatively, use-Fffactorwhich will computedel_radiusfrom the product of the shortest inter-point distance andfactor[0.01].-Ixinc[unit][+e|n][/yinc[unit][+e|n]]x_inc[and optionallyy_inc] is the grid spacing. Optionally, append a suffix modifier.Geographical(degrees)coordinates: Appendmto indicate arc minutes orsto indicate arc seconds. If one of the unitse,f,k,M,noruis appended instead, the increment is assumed to be given in meter, foot, km, Mile, nautical mile or US survey foot, respectively, and will be converted to the equivalent degrees longitude at the middle latitude of the region (the conversion depends on PROJ_ELLIPSOID). Ify_incis given but set to 0 it will be reset equal tox_inc; otherwise it will be converted to degrees latitude.Allcoordinates: If+eis appended then the corresponding maxx(east) ory(north) may be slightly adjusted to fit exactly the given increment [by default the increment may be adjusted slightly to fit the given domain]. Finally, instead of giving an increment you may specify thenumberofnodesdesired by appending+nto the supplied integer argument; the increment is then recalculated from the number of nodes and the domain. The resulting increment value depends on whether you have selected a gridline-registered or pixel-registered grid; see App-file-formats for details. Note: if-Rgrdfileis used then the grid spacing has already been initialized; use-Ito override the values.-LLeave trend alone. Donotremove a planer (2-D) trend from the data before fitting the spline. [Default removes least squares plane, fits normalized residuals, and restores plane].-NnodefileASCII file with coordinates of desired output locationsxin the first column(s). The resultingwvalues are appended to each record and written to the file given in-G[or stdout if not specified]; see-bofor binary output instead. This option eliminates the need to specify options-R,-I, and-r.-Rxmin/xmax/ymin/ymax[+r][+uunit] (more ...) Specify the region of interest.-SnuSpecify Poisson's ratio to use for this 2-D elastic sheet [0.5]. Note: 1.0 is incompressible in a 2-D formulation while -1 removes all coupling between the two directions.-TmaskgridOnly evaluate the solutions at the nodes in themaskgridthat are not set to NaN. This option eliminates the need to specify options-R,-I(and-r).-W[w] One-sigma data uncertainties foruandvare provided in the last two columns. We then compute weights that are inversely proportional to the uncertainties. Appendwif weights are given instead of uncertainties. This results in a weighted least squares fit. Note that-Wonly has an effect if-Cis used. [Default uses no weights or uncertainties]. Note: At present the-Woption isunstable. We do not yet know if it reflects a coding bug or a theoretical limitation. Users beware, and make sure you compare the results with non-weighted output for basic sanity checking.-V[level] (more ...) Select verbosity level [c].-d[i|o]nodata(more ...) Replace input columns that equalnodatawith NaN and do the reverse on output.-e[~]"pattern"|-e[~]/regexp/[i] (more ...) Only accept data records that match the given pattern.-fgGeographic grids (dimensions of longitude, latitude) will be converted to meters via a "Flat Earth" approximation using the current ellipsoid parameters.-h[i|o][n][+c][+d][+rremark][+rtitle] (more ...) Skip or produce header record(s). Not used with binary data.-icols[+l][+sscale][+ooffset][,...] (more ...) Select input columns and transformations (0 is first column).-r(more ...) Set pixel node registration [gridline].-:[i|o] (more ...) Swap 1st and 2nd column on input and/or output.-^or just-Print a short message about the syntax of the command, then exits (NOTE: on Windows just use-).-+or just+Print an extensive usage (help) message, including the explanation of any module-specific option (but not the GMT common options), then exits.-?or no arguments Print a complete usage (help) message, including the explanation of all options, then exits.

**UNITS**

For map distance unit, appendunitdfor arc degree,mfor arc minute, andsfor arc second, orefor meter [Default],ffor foot,kfor km,Mfor statute mile,nfor nautical mile, andufor US survey foot. By default we compute such distances using a spherical approximation with great circles. Prepend-to a distance (or the unit is no distance is given) to perform "Flat Earth" calculations (quicker but less accurate) or prepend+to perform exact geodesic calculations (slower but more accurate).

**EXAMPLES**

To compute theuandvstrain rate grids from the GPS data setgps.txt, containingxyuvdudv, on a 2x2 arc minute grid for California, try gmt gpsgridder gps.txt -R-125/-114/31/41 -I2m -fg -W -r -Ggps_strain_%s.nc -V

**REFERENCES**

Haines, A. J. et al., 2015,EnhancedSurfaceImagingofCrustalDeformation, SpringerBriefs in Earth Sciences, doi:10.1007/978-3-319-21578-5_2. Sandwell, D. T. and P. Wessel, 2016, Interpolation of 2-D Vector Data Using Constraints from Elasticity,Geophys.Res.Lett.,43, 10,703-10,709,http://dx.doi.org/10.1002/2016GL070340

**SEE** **ALSO**

gmt, greenspline nearneighbor, surface

**COPYRIGHT**

2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe