NAME

     grdproject - Forward and Inverse map transformation  of  2-D
     grd files


SYNOPSIS

     grdproject       in_grdfile       -      Jparameters       -
     Rwest/east/south/north[r]  [ -Ddx[m|c][/dy[m|c]] ] [ -Edpi ]
     [ -F ] [ -Gout_grdfile ] [ -I ] [ -M ]  [  - Nnx/ny  ]  [  -
     Ssearch_radius ] [ -V ]


DESCRIPTION

     grdproject will do one of two things depending  whether  - I
     has  been set.  If set, it will transform a gridded data set
     from a rectangular coordinate  system  onto  a  geographical
     system  by  resampling the surface at the new nodes.  If not
     set, it will project a geographical gridded data set onto  a
     rectangular  grid.  The new nodes are filled based on a sim-
     ple weighted average of nearby points.  Aliasing is  avoided
     by  using  sensible  values  for the search_radius.  The new
     node spacing may be determined in one  of  several  ways  by
     specifying the grid spacing, number of nodes, or resolution.
     Nodes not constrained by input data are set to NaN.
          No space between the option  flag  and  the  associated
     arguments.   Use  upper  case for the option flags and lower
     case for modifiers.

     in_grdfile
          2-D binary grd file to be transformed.

     -J    Selects the  map  projection.  Scale  is  inch/degree,
          1:xxxxx. or width in inch (upper case modifier).

          CYLINDRICAL PROJECTIONS:

          -Jclon0/lat0/scale (Cassini)
          -Jmscale (Mercator - Greenwich and Equator as origin)
          -Jmlon0/lat0/scale (Mercator - Give meridian and  stan-
          dard parallel)
          -Joalon0/lat0/azimuth/scale (Oblique Mercator  -  point
          and azimuth)
          -Joblon0/lat0/lon1/lat1/scale (Oblique Mercator  -  two
          points)
          -Joclon0/lat0/lonp/latp/scale (Oblique Mercator - point
          and pole)
          - Jqlon0/scale  (Equidistant   Cylindrical   Projection
          (Plate Carree))
          -Jtlon0/scale (TM - Transverse Mercator)
          -Juzone/scale (UTM - Universal Transverse Mercator)
          -Jylon0/lats/scale (Basic Cylindrical Projection)

          AZIMUTHAL PROJECTIONS:

          -Jalon0/lat0/scale (Lambert).
          -Jelon0/lat0/scale (Equidistant).
          -Jglon0/lat0/scale (Orthographic).
          -Jslon0/lat0/scale (General Stereographic)

          CONIC PROJECTIONS:

          -Jblon0/lat0/lat1/lat2/scale (Albers)
          -Jllon0/lat0/lat1/lat2/scale (Lambert)

          MISCELLANEOUS PROJECTIONS:

          -Jhlon0/scale (Hammer)
          -Jilon0/scale (Sinusoidal)
          -Jklon0/scale (Eckert VI)
          -Jnlon0/scale (Robinson)
          -Jrlon0/scale (Winkel Tripel)
          -Jwlon0/scale (Mollweide)

          NON-GEOGRAPHICAL PROJECTIONS:

          -Jpscale (Linear projection for polar (theta,r) coordi-
          nates)
          -Jxx-scale[l|ppow][/y-scale[l|ppow]] (Linear, log,  and
          power scaling)
          More details can be found in the psbasemap manpages.

     -R    west, east, south, and north  specify  the  Region  of
          interest.  To specify boundaries in degrees and minutes
          [and seconds], use the dd:mm[:ss] format.  Append r  if
          lower  left  and  upper right map coordinates are given
          instead of wesn.


OPTIONS

     -D    Set the grid spacing for the new grid.  Append  m  for
          minutes, c for seconds.

     -E    Set the resolution for the new grid in dots pr inch.

     -F    Force pixel registration [Default  is  grid  registra-
          tion].

     -G    Specify the name of the output netCDF grd file.

     -I    Do the Inverse  transformation,  from  rectangular  to
          geographical.

     -M    Let transformed coordinates be relative to  projection
          center [Default is relative to lower left corner].

     -N    Set the number of grid nodes in the new grid.

     -S    Set the search  radius  for  the  averaging  procedure
          [Default avoids aliasing].

     -V    Selects verbose mode, which will send progress reports
          to stderr [Default runs "silently"].


EXAMPLES

     To transform the geographical grid dbdb5.grd  onto  a  pixel
     Mercator grid at 300 dpi, run

     grdproject dbdb5.grd -R20/50/12/25  - Jm0.25  - E300  - F  -
     Gdbdb5_merc.grd

     To inversely transform the file topo_tm.grd back onto a geo-
     graphical grid try

     grdproject topo_tm.grd -R-80/-70/20/40 -Jt-75/1:500000 -I  -
     D5m -V -Gtopo.grd


RESTRICTIONS

     The boundaries of a projected (rectangular)  data  set  will
     not  necessarily  give  rectangular  geographical boundaries
     (Mercator is one exception).  In those cases some nodes  may
     be  unconstrained  (set  to  NaN).  To get a full grid back,
     your input grid may have to cover a larger area than you are
     interrested in.


SEE ALSO

     gmt, gmtdefaults, mapproject


REFERENCES

     Wessel, P., and W. H. F. Smith, 1995,  The  Generic  Mapping
     Tools  (GMT)  version  3.0  Technical  Reference & Cookbook,
     SOEST/NOAA.
     Wessel, P., and W. H. F. Smith, 1995,  New  Version  of  the
     Generic Mapping Tools Released, EOS Trans. AGU, 76, p. 329.
     Wessel, P., and W. H. F. Smith, 1995,  New  Version  of  the
     Generic           Mapping           Tools          Released,
     http://www.agu.org/eos_elec/95154e.html, Copyright  1995  by
     the American Geophysical Union.
     Wessel, P., and W. H. F. Smith, 1991,  Free  Software  Helps
     Map and Display Data, EOS Trans. AGU, 72, p. 441.