[gradsusr] GrADS pdef string to proj.4 string

Timothy W. Hilton thilton at ucmerced.edu
Fri Nov 15 12:22:20 EST 2013


I have a data on a 124x124 grid which I would like to show on a map of
North America using arbitrary mapping software outside of GrADS.  The
grid corresponds to latitudes and longitudes on a projected surface.

I have the latitude/longitude of each grid cell along with a GrADS PDEF
string.  I'm trying to figure out how to translate the pdef string into
a proj4 (http://trac.osgeo.org/proj/) string.

The pdef string is:
pdef 124 124 nps 118.529 113.774 -40.0000 60

As I understand it this defines a 124 by 124 native grid on a polar
stereographic projection with the North Pole at (118.529, 113.774) on
the projected grid (with (1,1) in the lower-left corner) and a reference
longitude of -40.0000 and 60km between grid points.

In the proj4 string I'm not sure what to use for +x (False Easting) and
+y (False Northing), or for +lat_ts (Latitude at natural origin) or
+lon_0 (Longitude at natural origin).  I'm using 
"+proj=stere +lat_ts=40.0 +lat_0=90.0 +lon_0=220 +k_0=1.0 +x_0=0.0
+y_0=0.0" 
but the inverse projection of my lat/lon pairs does not end up on a
rectangular grid, as it seems to me like it should.

Any advice greatly appreciated!

Thanks,
Tim

--

Timothy W. Hilton
Assistant Project Scientist
School of Engineering
University of California, Merced
thilton at ucmerced.edu


More information about the gradsusr mailing list