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

NAME

6       grdrotater - Rotate a grid using a finite rotation
7

SYNOPSIS

9       grdrotate  ingrdfile -Goutgrdfile -Tplon/plat/omega [ -Fpolygonfile ] [
10       -H[i][nrec] ] [ -M[flag] ] [  -N  ]  [  -Q[b|c|l|n][[/]threshold]  ]  [
11       -Rwest/east/south/north[r]   ]   [   -S   ]  [  -V  ]  [  -:[i|o]  ]  [
12       -b[i|o][s|S|d|D[ncol]|c[var1/...]] ]
13

DESCRIPTION

15       grdrotater reads a geographical grid and reconstructs it given a  total
16       reconstruction  rotation.   Optionally,  the user may supply a clipping
17       polygon in multiple-segment format; then, only the  part  of  the  grid
18       inside  the  polygon  is used to determine the return grid region.  The
19       outline of the projected region is returned on stdout.
20            No space between the option flag  and  the  associated  arguments.
21       Use upper case for the option flags and lower case for modifiers.
22
23       ingrdfile
24              Name of a grid file in geographical (lon, lat) coordinates.
25
26       -G     Name  of  output  grid.   This  is the grid with the data recon‐
27              structed according to the specified rotation.
28
29       -T     Finite rotation.  Specify the  longitude  and  latitude  of  the
30              rotation pole and the opening angle, all in degrees.
31

OPTIONS

33       -F     Specify  a  multi-segment closed polygon file that describes the
34              inside area of  the  grid  that  should  be  projected  [Default
35              projects entire grid].
36
37       -H     Input  file(s)  has  Header record(s).  Number of header records
38              can be changed by editing your .gmtdefaults4 file.  If used, GMT
39              default  is  1  header record. Use -Hi if only input data should
40              have header records [Default will write out  header  records  if
41              the input data have them]. Blank lines and lines starting with #
42              are always skipped.
43
44       -M     Multiple segment file.  Segment separator is a record  beginning
45              with flag.  [Default is '>'].
46
47       -N     Do Not output the rotated polygon outline [Default will write it
48              to stdout].
49
50       -Q     Quick mode,  use  bilinear  rather  than  bicubic  interpolation
51              [Default].   Alternatively,  select  the  interpolation  mode by
52              adding b for B-spline smooting, c for bicubic  interpolation,  l
53              for  bilinear  interpolation  or  n  for nearest-neighbor value.
54              Optionally, append threshold in the range [0,1].  This parameter
55              controls  how  close  to nodes with NaN values the interpolation
56              will go.  E.g., a threshold of 0.5 will interpolate  about  half
57              way  from a non-NaN to a NaN node, whereas 0.1 will go about 90%
58              of the way, etc. [Default is 1, which means none of  the  (4  or
59              16) nearby nodes may be NaN].  -Q0 will just return the value of
60              the nearest node instead of interpolating.  This is the same  as
61              using -Qn.
62
63       -R     west, east, south, and north specify the Region of interest, and
64              you   may   specify   them   in   decimal    degrees    or    in
65              [+-]dd:mm[:ss.xxx][W|E|S|N]  format.  Append r if lower left and
66              upper right map coordinates are given instead of  w/e/s/n.   The
67              two  shorthands  -Rg  and -Rd stand for global domain (0/360 and
68              -180/+180 in longitude respectively, with -90/+90 in latitude).
69
70       -S     Skip the rotation of the grid, just rotate the  polygon  outline
71              (requires -F).
72
73       -V     Selects verbose mode, which will send progress reports to stderr
74              [Default runs "silently"].
75
76       -:     Toggles between  (longitude,latitude)  and  (latitude,longitude)
77              input/output.  [Default is (longitude,latitude)].
78
79       -bi    Selects binary input.  Append s for single precision [Default is
80              d  (double)].   Uppercase  S  or  D  will  force  byte-swapping.
81              Optionally,  append  ncol,  the number of columns in your binary
82              input file if it exceeds the columns needed by the program.   Or
83              append  c  if  the  input  file  is  netCDF.  Optionally, append
84              var1/var2/... to specify the variables to be read.  [Default  is
85              2 input columns].
86
87       -bo    Selects  binary  output.  Append s for single precision [Default
88              is d (double)].  Uppercase S  or  D  will  force  byte-swapping.
89              Optionally,  append  ncol, the number of desired columns in your
90              binary output file.  [Default is same as input].
91

EXAMPLES

93       To rotate the data defined by grid topo.grd  and  the  polygon  outline
94       clip_path.d,  using a finite rotation with pole at (135.5, -33.0) and a
95       rotation angle of 37.3 degrees and bicubic interpolation, try
96
97       grdrotater topo.grd -T135.5/-33/37.3 -V -Fclip_path.d -Grot_topo.grd  >
98       rot_clip_path.d
99
100       To  rotate  the  entire  grid  faa.grd  using a finite rotation pole at
101       (67:45W, 22:35S) and a rotation angle of 19.6 degrees using a  bilinear
102       interpolation, try
103
104       grdrotater   faa.grd   -T67:45W/22:35S/19.6   -V   -Q  -Grot_faa.grd  >
105       rot_faa_path.d
106
107       To just see how the outline of the grid large.grd will plot  after  the
108       same rotation, try
109
110       grdrotater  large.grd  -T67:45W/22:35S/19.6  -V -S | psxy -Rg -JH180/6i
111       -B30 -M -W0.5p | gv -
112
113       Let say you have rotated  gridA.grd  and  gridB.grd,  restricting  each
114       rotation  to  nodes  inside polygons polyA.d and polyB.d, respectively,
115       using rotation A = (123W,22S,16,4) and rotation B = (108W, 16S, -14.5),
116       yielding  rotated  grids rot_gridA.grd and rot_gridB.grd.  To determine
117       the region of overlap between the rotated grids, we use grdmath:
118
119       grdmath 1 rot_gridA.grd ISNAN SUB 1 rot_gridB.grd  ISNAN  SUB  2  EQ  =
120       overlap.grd
121
122       The  grid  overlap.grd now has 1s in the regions of overlap and 0 else‐
123       where.  You can use it as a mask or use grdcontour to extract a polygon
124       (contour).
125

SEE ALSO

127       backtracker(1), hotspotter(1), originator(1) rotconverter(1)
128
129
130
131GMT 4.3.1                         15 May 2008                    GRDROTATER(1)
Impressum