1GRDROTATER(1)                         GMT                        GRDROTATER(1)
2
3
4

NAME

6       grdrotater - Finite rotation reconstruction of geographic grid
7

SYNOPSIS

9       grdrotater ingrdfile  -Erot_file|lon/lat/angle
10        -Goutgrdfile  [  -Drotoutline ] [  -Fpolygonfile ] [  -N ] [  -Rregion
11       ] [  -S ] [  -Tages ] [  -V[level] ]  [  -bbinary  ]  [  -dnodata  ]  [
12       -hheaders ] [ -nflags ] [ -:[i|o] ]
13
14       Note:  No  space  is allowed between the option flag and the associated
15       arguments.
16

DESCRIPTION

18       grdrotater reads a geographical grid and reconstructs  it  given  total
19       reconstruction  rotations.  Optionally,  the user may supply a clipping
20       polygon in multiple-segment format; then, only the  part  of  the  grid
21       inside  the  polygon is used to determine the reconstructed region. The
22       outlines of the reconstructed region  is  also  returned  provided  the
23       rotated region is not the entire globe.
24

REQUIRED ARGUMENTS

26       ingrdfile
27              Name of a grid file in geographical (lon, lat) coordinates.
28
29       -Erotfile
30              Give  file  with rotation parameters. This file must contain one
31              record for each rotation; each record must be of  the  following
32              format:
33
34              lon lat tstart [tstop] angle [ khat a b c d e f g df ]
35
36              where  tstart  and  tstop  are  in  Myr and lon lat angle are in
37              degrees. tstart and tstop are the ages of the old and young ends
38              of  a  stage. If tstop is not present in the record then a total
39              reconstruction rotation is expected and tstop is implicitly  set
40              to  0  and should not be specified for any of the records in the
41              file. If a covariance matrix C for the rotation is available  it
42              must  be  specified  in  a  format using the nine optional terms
43              listed in brackets. Here, C = (g/khat)*[ a b d; b c e; d e  f  ]
44              which  shows  C  made up of three row vectors. If the degrees of
45              freedom (df) in fitting the rotation is 0 or not given it is set
46              to  10000. Blank lines and records whose first column contains #
47              will be ignored. You may prepend a leading + to the filename  to
48              indicate  you wish to invert the rotations.  Alternative 1: Give
49              the filename composed of two plate IDs  separated  by  a  hyphen
50              (e.g.,  PAC-MBL)  and we will instead extract that rotation from
51              the GPlates rotation database. We return an error if  the  rota‐
52              tion  cannot  be  found.   Alternative 2: Specify lon/lat/angle,
53              i.e., the longitude, latitude, and opening angle (all in degrees
54              and separated by /) for a single total reconstruction rotation.
55
56       -Goutgrdfile
57              Name  of  output  grid.  This  is  the grid with the data recon‐
58              structed according to the specified rotation. If more  than  one
59              reconstruction  time  is  implied then outgrdfile must contain a
60              C-format specifier to format a  floating  point  number  (recon‐
61              struction time) to text.
62

OPTIONAL ARGUMENTS

64       -Drotoutline
65              Name  of the grid polygon outline file. This represents the out‐
66              line of the grid reconstructed to the specified  time.  If  more
67              than  one  reconstruction  time  is implied then rotoutline must
68              contain a C-format specifier to format a floating  point  number
69              (reconstruction  time) to text.  If only one time is implied and
70              -D is not set then we write the polygon to stdout (but see -N).
71
72       -Fpolygonfile
73              Specify a multisegment closed polygon file  that  describes  the
74              inside  area  of  the  grid  that  should  be projected [Default
75              projects entire grid].
76
77       -N     Do Not output the rotated polygon outline [Default will write it
78              to stdout, or to a file via -D].
79
80       -Rwest/east/south/north[/zmin/zmax][+r][+uunit]
81              west, east, south, and north specify the region of interest, and
82              you   may   specify   them   in   decimal    degrees    or    in
83              [±]dd:mm[:ss.xxx][W|E|S|N]  format  Append  +r if lower left and
84              upper right map coordinates are given instead  of  w/e/s/n.  The
85              two  shorthands  -Rg  and -Rd stand for global domain (0/360 and
86              -180/+180 in longitude respectively, with -90/+90 in  latitude).
87              Alternatively  for grid creation, give Rcodelon/lat/nx/ny, where
88              code is a 2-character combination of L, C, R (for left,  center,
89              or  right)  and T, M, B for top, middle, or bottom. e.g., BL for
90              lower left.  This indicates which point on a rectangular  region
91              the lon/lat coordinate refers to, and the grid dimensions nx and
92              ny with grid spacings via -I is used to create the corresponding
93              region.   Alternatively,  specify  the  name of an existing grid
94              file and the -R settings (and grid spacing, if  applicable)  are
95              copied from the grid. Appending +uunit expects projected (Carte‐
96              sian) coordinates compatible with chosen  -J  and  we  inversely
97              project  to determine actual rectangular geographic region.  For
98              perspective view (-p), optionally append /zmin/zmax.  In case of
99              perspective view (-p), a z-range (zmin, zmax) can be appended to
100              indicate the third dimension. This needs to be  done  only  when
101              using  the -Jz option, not when using only the -p option. In the
102              latter case a perspective view of the plane is plotted, with  no
103              third dimension.
104
105       -S     Skip  the  rotation of the grid, just rotate the polygon outline
106              (requires -F if no grid is provided).
107
108       -Tages Sets the desired reconstruction times.  For a single time append
109              the  desired  time.   For an equidistant range of reconstruction
110              times give -Tstart/stop/inc or  -Tstart/stop/npoints+.   For  an
111              non-equidistant set of reconstruction times please pass them via
112              the first column in a file, e.g., -Tagefile.  If no -T option is
113              given  and -E specified a rotation file then we equate the rota‐
114              tion file times with the reconstruction times.
115
116       -V[level] (more ...)
117              Select verbosity level [c].
118
119       -bi[ncols][t] (more ...)
120              Select native binary input. [Default is 2 input columns].
121
122       -bo[ncols][type] (more ...)
123              Select native binary output. [Default is same as input].
124
125       -d[i|o]nodata (more ...)
126              Replace input columns that equal nodata  with  NaN  and  do  the
127              reverse on output.
128
129       -h[i|o][n][+c][+d][+rremark][+rtitle] (more ...)
130              Skip or produce header record(s).
131
132       -:[i|o] (more ...)
133              Swap 1st and 2nd column on input and/or output.
134
135       -n[b|c|l|n][+a][+bBC][+c][+tthreshold] (more ...)
136              Select interpolation mode for grids.
137
138       -^ or just -
139              Print  a  short  message  about  the syntax of the command, then
140              exits (NOTE: on Windows just use -).
141
142       -+ or just +
143              Print an extensive usage (help) message, including the  explana‐
144              tion  of  any  module-specific  option  (but  not the GMT common
145              options), then exits.
146
147       -? or no arguments
148              Print a complete usage (help) message, including the explanation
149              of all options, then exits.
150

CONSEQUENCES OF GRID RESAMPLING

152       Resample or sampling of grids will use various algorithms (see -n) that
153       may lead to possible distortions or unexpected results in the resampled
154       values.  One expected effect of resampling with splines is the tendency
155       for the new resampled values to slightly exceed the global min/max lim‐
156       its  of  the  original  grid.   If this is unacceptable, you can impose
157       clipping of the resampled values values so they do not exceed the input
158       min/max values by adding +c to your -n option.
159

GEODETIC VERSUS GEOCENTRIC COORDIINATES

161       All  spherical  rotations  are applied to geocentric coordinates.  This
162       means that incoming data points and grids are considered  to  represent
163       geodetic  coordinates and must first be converted to geocentric coordi‐
164       nates. Rotations are then applied, and the final  reconstructed  points
165       are  converted back to geodetic coordinates.  This default behavior can
166       be bypassed if the  ellipsoid  setting  PROJ_ELLIPSOID  is  changed  to
167       Sphere.
168

EXAMPLES

170       To  rotate  the  data  defined  by grid topo.nc and the polygon outline
171       clip_path.d, using a total reconstruction rotation with pole at (135.5,
172       -33.0)  and a rotation angle of 37.3 degrees and bicubic interpolation,
173       try
174
175              gmt grdrotater topo.nc -E135.5/-33/37.3 -V -Fclip_path.d -Grot_topo.nc > rot_clip_path.d
176
177       To rotate the entire grid faa.nc back to 32 Ma using the rotation  file
178       rotations.txt and a bilinear interpolation, try
179
180              gmt grdrotater faa.nc -Erotations.txt -T32 -V -Grot_faa.nc -nl > rot_faa_path.d
181
182       To  just  see  how the outline of the grid large.nc will plot after the
183       same rotation, try
184
185              gmt grdrotater large.nc -Erotations.txt -T32 -V -S \| psxy -Rg -JH180/6i -B30 -W0.5p \| gv -
186
187       To rotate the grid topo.nc back to 100 Ma using the rotation file rota‐
188       tions.txt  and request a reconstruction every 10 Myr, saving both grids
189       and outlines to filenames that derive from templates, try
190
191              gmt grdrotater topo.nc -Erotations.txt -T10/100/10 -V -Grot_topo_%g.nc -Drot_topo_path_%g.d
192
193       Let say you have rotated gridA.nc and gridB.nc, restricting each  rota‐
194       tion  to nodes inside polygons polyA.d and polyB.d, respectively, using
195       rotation A = (123W,22S,16,4) and  rotation  B  =  (108W,  16S,  -14.5),
196       yielding  rotated grids rot_gridA.nc and rot_gridB.nc. To determine the
197       region of overlap between the rotated grids, we use grdmath:
198
199              gmt grdmath 1 rot_gridA.nc ISNAN SUB 1 rot_gridB.nc ISNAN SUB 2 EQ = overlap.nc
200
201       The grid overlap.nc now has 1s in the regions of overlap  and  0  else‐
202       where. You can use it as a mask or use grdcontour -D to extract a poly‐
203       gon (i.e., a contour).
204

NOTES

206       GMT   distributes   the   EarthByte   rotation   model    Global_Earth‐
207       Byte_230-0Ma_GK07_AREPS.rot.  To use an alternate rotation file, create
208       an environmental parameters named GPLATES_ROTATIONS that points  to  an
209       alternate rotation file.
210

SEE ALSO

212       backtracker, grdcontour, gmtpmodeler, grdmath, grdpmodeler, grdspotter,
213       hotspotter, originator, rotconverter
214
216       2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
217
218
219
220
2215.4.5                            Feb 24, 2019                    GRDROTATER(1)
Impressum