1

I am attempting to convert the NAM wind data coordinate system using data from the thredds server:

Catalog = TDSCatalog('http://thredds.ucar.edu/thredds/catalog/grib/NCEP/GFS/'
                        'Global_0p25deg/catalog.xml?dataset=grib/NCEP/GFS/Global_0p25deg/Best')

using Siphon. I have extracted the lat/long values and have the pyproj string:

Proj('+proj=lcc +lat_1=12.190, +lon_0 = -133.459 +datum=NAD83 +no_defs')

but I am not sure if this is correct. Using the right string, how might I convert to the NAD 1983 UTM Zone 11N coordinate system and is an intermediate projection conversion needed?

Vince
  • 20,017
  • 15
  • 45
  • 64
  • 1
    Is the lat/lon data in 1-dimensional arrays or in 2-dimensional arrays? If the lat/lon data is in 2-dimensional arrays, are they equally spaced? – snowman2 Dec 03 '19 at 02:24

1 Answers1

0

I would think that what is needed is a transformation.


From the command:

C:\>cs2cs  "+proj=lcc +lat_1=12.190 +lon_0=-133.459 +datum=NAD83 +no_defs"  "+proj=utm +zone=11 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"
0 0
-1357376.19     0.00 0.00

From the console:

>>> import pyproj
>>> p1 = pyproj.Proj("+proj=lcc +lat_1=12.190 +lon_0=-133.459 +datum=NAD83 +no_defs")
>>> p2 = pyproj.Proj("+proj=utm +zone=11 +ellps=GRS80 +datum=NAD83 +units=m +no_defs")
>>> x = 0
>>> y = 0
>>> pyproj.transform(p1,p2,x,y)
(-1357376.1901256968, 0.0) 
Gabriel De Luca
  • 14,289
  • 3
  • 20
  • 51
  • Thank you, Gabriel. I am wondering why these coordinates are negative when I am used to positive values. Should I take the output and add to it some value to correct for a reference point? – Justin Dhooghe Dec 04 '19 at 18:30
  • You are welcome. Since the +lon_0 value is -133.459, the x = 0 coordinte belongs in that longitude, and return a negative value for UTM 11 (which longitude of origin is -117). In fact, the center of that Lambert Comformal Conic projection is out of the scope of the UTM 11 zone. – Gabriel De Luca Dec 04 '19 at 20:11