Quick Navigator

 Search Site Miscellaneous Server Agreement Year 2038 Credits

# Manual Reference Pages  -  GRDROTATER (1)

### NAME

grdrotater - Rotate a grid using a finite rotation

Synopsis
Description
Options
Examples
Coordinates

### SYNOPSIS

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

### DESCRIPTION

grdrotater reads a geographical grid and reconstructs it given a total reconstruction rotation. Optionally, the user may supply a clipping polygon in multiple-segment format; then, only the part of the grid inside the polygon is used to determine the return grid region. The outline of the projected region is returned on stdout provided the rotated region is not the entire globe.
No space between the option flag and the associated arguments. Use upper case for the option flags and lower case for modifiers.
ingrdfile
Name of a grid file in geographical (lon, lat) coordinates.
-G Name of output grid. This is the grid with the data reconstructed according to the specified rotation.
-T Finite rotation. Specify the longitude and latitude of the rotation pole and the opening angle, all in degrees.

### EXAMPLES

To rotate the data defined by grid topo.grd and the polygon outline clip_path.d, using a finite rotation with pole at (135.5, -33.0) and a rotation angle of 37.3 degrees and bicubic interpolation, try

grdrotater topo.grd -T 135.5/-33/37.3 -V -F clip_path.d -G rot_topo.grd > rot_clip_path.d

To rotate the entire grid faa.grd using a finite rotation pole at (67:45W, 22:35S) and a rotation angle of 19.6 degrees using a bilinear interpolation, try

grdrotater faa.grd -T 67:45W/22:35S/19.6 -V -Q -G rot_faa.grd > rot_faa_path.d

To just see how the outline of the grid large.grd will plot after the same rotation, try

grdrotater large.grd -T 67:45W/22:35S/19.6 -V -S | psxy -Rg -JH 180/6i -B 30 -m -W 0.5p | gv -

Let say you have rotated gridA.grd and gridB.grd, restricting each rotation to nodes inside polygons polyA.d and polyB.d, respectively, using rotation A = (123W,22S,16,4) and rotation B = (108W, 16S, -14.5), yielding rotated grids rot_gridA.grd and rot_gridB.grd. To determine the region of overlap between the rotated grids, we use grdmath:

grdmath 1 rot_gridA.grd ISNAN SUB 1 rot_gridB.grd ISNAN SUB 2 EQ = overlap.grd

The grid overlap.grd now has 1s in the regions of overlap and 0 elsewhere. You can use it as a mask or use grdcontour to extract a polygon (contour).

### COORDINATES

Data coordinates are assumed to be geodetic and will automatically be converted to geocentric before spherical rotations are performed. We convert back to geodetic coordinates for output. Note: If your data already are geocentric, you can avoid the conversion by using --ELLIPSOID=sphere.