<font face="courier new,monospace">James,<br>I added polar stereographic support to the trunk in r18931.  I believe I added all the coordinate systems to be cf=1.4 compliant.  I did not have a dataset to test it.  I did not backport these changes to 1.7 because I was a new commiter.  I will test your file tomorrow on my 1.8dev machine.<br>

<br>kss<br clear="all"></font><br># ============================<br>Kyle Shannon<br>Physical Science Technician<br>RMRS Fire Sciences Lab<br>Fire, Fuels &amp; Smoke - RWU 4405<br>5775 Highway 10 W.<br>Missoula, MT 59808<br>

(406)829-6954<br><a href="mailto:kshannon@fs.fed.us">kshannon@fs.fed.us</a><br># ============================<br>
<br><br><div class="gmail_quote">On Mon, Aug 9, 2010 at 5:50 PM, James Hiebert <span dir="ltr">&lt;<a href="mailto:hiebert@uvic.ca">hiebert@uvic.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Sure.  The ticket can be found here:<br>
<a href="https://trac.osgeo.org/gdal/ticket/3715" target="_blank">https://trac.osgeo.org/gdal/ticket/3715</a><br>
<font color="#888888"><br>
~James<br>
</font><div><div></div><div class="h5"><br>
On Mon, Aug 09, 2010 at 03:13:59PM -0400, Lucena, Ivan wrote:<br>
&gt; James,<br>
&gt;<br>
&gt; Could do file a ticked and upload a sample file on <a href="http://trac.osgeo.org/gdal/" target="_blank">http://trac.osgeo.org/gdal/</a> ?<br>
&gt;<br>
&gt; Regards,<br>
&gt;<br>
&gt; Ivan<br>
&gt;<br>
&gt; James Hiebert wrote:<br>
&gt; &gt; Hi All,<br>
&gt; &gt;<br>
&gt; &gt; I&#39;m trying to use GDAL (version 1.7.2 on Gentoo built with hdf5 and netcdf<br>
&gt; &gt; support) to read NetCDF files, but I&#39;m a little unclear on how the NetCDF<br>
&gt; &gt; driver attempts to determine the georeferencing.<br>
&gt; &gt;<br>
&gt; &gt; The driver page here:<br>
&gt; &gt; <a href="http://www.gdal.org/frmt_netcdf.html" target="_blank">http://www.gdal.org/frmt_netcdf.html</a><br>
&gt; &gt; states that it will attempt to read the metadata &quot;spatial_ref&quot; for a Well<br>
&gt; &gt; Know Text definition of the spatial reference (I assume that it means that<br>
&gt; &gt; it will try to use a global attribute of the NetCDF file named spatial_ref).<br>
&gt; &gt;<br>
&gt; &gt; Since this would be convenient for my application, I attempted to use GDAL<br>
&gt; &gt; this way without success.<br>
&gt; &gt;<br>
&gt; &gt; + I added a global attribute named &quot;spatial_ref&quot; with the WKT definition of<br>
&gt; &gt; the spatial reference system.<br>
&gt; &gt; + gdalinfo on the file still reports &quot;Coordinate System is `&#39;&quot;<br>
&gt; &gt; + opening the file with the python bindings and calling dst.GetProjection()<br>
&gt; &gt;   returns a blank string (i.e. no projection information)<br>
&gt; &gt;<br>
&gt; &gt; The full listings of my spatial reference definition, the output of ncdump<br>
&gt; &gt; and gdalinfo and the output from the python session are listed below.  Can<br>
&gt; &gt; anyone tell me whether I&#39;m doing something wrong, or should I not count on<br>
&gt; &gt; georeferencing being supported by the NetCDF driver?<br>
&gt; &gt;<br>
&gt; &gt; ~James<br>
&gt; &gt;<br>
&gt; &gt; james@basalt ~ $ ncatted -a spatial_ref,global,a,c,&#39;PROJCS[&quot;unnamed&quot;,GEOGCS[&quot;Normal Sphere<br>
&gt; &gt; (r=6370997)&quot;,DATUM[&quot;unknown&quot;,SPHEROID[&quot;sphere&quot;,6370997,0]],PRIMEM[&quot;Greenwich&quot;,0],UNIT[&quot;degree&quot;,0.0174532925199433]],PROJECTION[&quot;Polar_Stereographic&quot;],PARAMETER[&quot;latitude_of_origin&quot;,60],PARAMETER[&quot;central_meridian&quot;,263],PARAMETER[&quot;scale_factor&quot;,1],PARAMETER[&quot;false_easting&quot;,3925000],PARAMETER[&quot;false_northing&quot;,8325000]]&#39;<br>


&gt; &gt; <a href="http://narccap_ecpc-20c3m-tasmin-ncep.nc" target="_blank">narccap_ecpc-20c3m-tasmin-ncep.nc</a> <a href="http://narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc" target="_blank">narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc</a><br>


&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; james@basalt ~ $ ncdump -h <a href="http://narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc" target="_blank">narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc</a><br>
&gt; &gt; netcdf narccap_ecpc-20c3m-tasmin-ncep-with-srs {<br>
&gt; &gt; dimensions:<br>
&gt; &gt;     xc = 123 ;<br>
&gt; &gt;     yc = 104 ;<br>
&gt; &gt;     time = UNLIMITED ; // (9496 currently)<br>
&gt; &gt;     bnds = 2 ;<br>
&gt; &gt; variables:<br>
&gt; &gt;     char polar_stereographic ;<br>
&gt; &gt;             polar_stereographic:grid_mapping_name =<br>
&gt; &gt; &quot;polar_stereographic&quot; ;<br>
&gt; &gt;             polar_stereographic:longitude_of_central_meridian = 263. ;<br>
&gt; &gt;             polar_stereographic:straight_vertical_longitude_from_pole =<br>
&gt; &gt; 263. ;<br>
&gt; &gt;             polar_stereographic:standard_parallel = 60. ;<br>
&gt; &gt;             polar_stereographic:TrueGridLength_Latitude = 60. ;<br>
&gt; &gt;             polar_stereographic:XGridLength_M = 50000. ;<br>
&gt; &gt;             polar_stereographic:YGridLength_M = 50000. ;<br>
&gt; &gt;             polar_stereographic:PoleOnPlane = &quot;north&quot; ;<br>
&gt; &gt;             polar_stereographic:false_easting = 3925000. ;<br>
&gt; &gt;             polar_stereographic:false_northing = 8325000. ;<br>
&gt; &gt;             polar_stereographic:latitude_of_projection_origin = 90. ;<br>
&gt; &gt;     double yc(yc) ;<br>
&gt; &gt;             yc:long_name = &quot;y-coordinate of Cartesian system&quot; ;<br>
&gt; &gt;             yc:standard_name = &quot;projection_y_coordinate&quot; ;<br>
&gt; &gt;             yc:axis = &quot;Y&quot; ;<br>
&gt; &gt;             yc:units = &quot;m&quot; ;<br>
&gt; &gt;     double xc(xc) ;<br>
&gt; &gt;             xc:long_name = &quot;x-coordinate of Cartesian system&quot; ;<br>
&gt; &gt;             xc:standard_name = &quot;projection_x_coordinate&quot; ;<br>
&gt; &gt;             xc:axis = &quot;X&quot; ;<br>
&gt; &gt;             xc:units = &quot;m&quot; ;<br>
&gt; &gt;     double lon(yc, xc) ;<br>
&gt; &gt;             lon:units = &quot;degrees_east&quot; ;<br>
&gt; &gt;             lon:long_name = &quot;longitude&quot; ;<br>
&gt; &gt;             lon:standard_name = &quot;longitude&quot; ;<br>
&gt; &gt;             lon:axis = &quot;X&quot; ;<br>
&gt; &gt;             lon:NX_NumPntsOnParallel = 123 ;<br>
&gt; &gt;             lon:NY_NumPntsOnMeridian = 104 ;<br>
&gt; &gt;             lon:actual_range = 211.5412f, 316.2759f ;<br>
&gt; &gt;             lon:XGridLength_M = 50000. ;<br>
&gt; &gt;             lon:YGridLength_M = 50000. ;<br>
&gt; &gt;             lon:PoleOnPlane = &quot;north&quot; ;<br>
&gt; &gt;     double lat(yc, xc) ;<br>
&gt; &gt;             lat:units = &quot;degrees_north&quot; ;<br>
&gt; &gt;             lat:long_name = &quot;latitude&quot; ;<br>
&gt; &gt;             lat:standard_name = &quot;latitude&quot; ;<br>
&gt; &gt;             lat:axis = &quot;Y&quot; ;<br>
&gt; &gt;             lat:NX_NumPntsOnParallel = 123 ;<br>
&gt; &gt;             lat:NY_NumPntsOnMeridian = 104 ;<br>
&gt; &gt;             lat:actual_range = 21.23807f, 67.63758f ;<br>
&gt; &gt;             lat:XGridLength_M = 50000. ;<br>
&gt; &gt;             lat:YGridLength_M = 50000. ;<br>
&gt; &gt;             lat:PoleOnPlane = &quot;north&quot; ;<br>
&gt; &gt; ...<br>
&gt; &gt;<br>
&gt; &gt; // global attributes:<br>
&gt; &gt; ...<br>
&gt; &gt;             :history = &quot;Mon Aug  9 13:44:50 2010: ncatted -a<br>
&gt; &gt;             spatial_ref,global,a,c,PROJCS[\&quot;unnamed\&quot;,GEOGCS[\&quot;Normal<br>
&gt; &gt;             Sphere<br>
&gt; &gt;             (r=6370997)\&quot;,DATUM[\&quot;unknown\&quot;,SPHEROID[\&quot;sphere\&quot;,6370997,0]],PRIMEM[\&quot;Greenwich\&quot;,0],UNIT[\&quot;degree\&quot;,0.0174532925199433]],PROJECTION[\&quot;Polar_Stereographic\&quot;],PARAMETER[\&quot;latitude_of_origin\&quot;,60],PARAMETER[\&quot;central_meridian\&quot;,263],PARAMETER[\&quot;scale_factor\&quot;,1],PARAMETER[\&quot;false_easting\&quot;,3925000],PARAMETER[\&quot;false_northing\&quot;,8325000]]<br>


&gt; &gt;             <a href="http://narccap_ecpc-20c3m-tasmin-ncep.nc" target="_blank">narccap_ecpc-20c3m-tasmin-ncep.nc</a><br>
&gt; &gt;             <a href="http://narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc" target="_blank">narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc</a>\n&quot;,<br>
&gt; &gt;                     &quot;Fri May  8 09:34:14 2009: ncrcat<br>
&gt; &gt; tasmin_ECPC_1979010106.nc tasmin_ECPC_1981010106.nc<br>
&gt; &gt; tasmin_ECPC_1986010106.nc tasmin_ECPC_1991010106.nc<br>
&gt; &gt; tasmin_ECPC_1996010106.nc tasmin_ECPC_2001010106.nc<br>
&gt; &gt; <a href="http://narccap_ecpc-20c3m-tasmin-ncep.nc" target="_blank">narccap_ecpc-20c3m-tasmin-ncep.nc</a>&quot; ;<br>
&gt; &gt;             :nco_openmp_thread_number = 1 ;<br>
&gt; &gt;             :spatial_ref = &quot;PROJCS[\&quot;unnamed\&quot;,GEOGCS[\&quot;Normal Sphere<br>
&gt; &gt; (r=6370997)\&quot;,DATUM[\&quot;unknown\&quot;,SPHEROID[\&quot;sphere\&quot;,6370997,0]],PRIMEM[\&quot;Greenwich\&quot;,0],UNIT[\&quot;degree\&quot;,0.0174532925199433]],PROJECTION[\&quot;Polar_Stereographic\&quot;],PARAMETER[\&quot;latitude_of_origin\&quot;,60],PARAMETER[\&quot;central_meridian\&quot;,263],PARAMETER[\&quot;scale_factor\&quot;,1],PARAMETER[\&quot;false_easting\&quot;,3925000],PARAMETER[\&quot;false_northing\&quot;,8325000]]&quot;<br>


&gt; &gt; ;<br>
&gt; &gt; }<br>
&gt; &gt;<br>
&gt; &gt; james@basalt ~ $ gdalinfo <a href="http://narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc" target="_blank">narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc</a><br>
&gt; &gt; Driver: netCDF/Network Common Data Format<br>
&gt; &gt; Files: <a href="http://narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc" target="_blank">narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc</a><br>
&gt; &gt;        narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc.aux.xml<br>
&gt; &gt; Size is 512, 512<br>
&gt; &gt; Coordinate System is `&#39;<br>
&gt; &gt; Metadata:<br>
&gt; &gt; ...<br>
&gt; &gt;   NC_GLOBAL#history1=Original output in GRIB 1<br>
&gt; &gt;   NC_GLOBAL#history2=Contains modifications made to original data<br>
&gt; &gt;   NC_GLOBAL#history=Mon Aug  9 13:44:50 2010: ncatted -a<br>
&gt; &gt;   spatial_ref,global,a,c,PROJCS[&quot;unnamed&quot;,GEOGCS[&quot;Normal Sphere<br>
&gt; &gt;   (r=6370997)&quot;,DATUM[&quot;unknown&quot;,SPHEROID[&quot;sphere&quot;,6370997,0]],PRIMEM[&quot;Greenwich&quot;,0],UNIT[&quot;degree&quot;,0.0174532925199433]],PROJECTION[&quot;Polar_Stereographic&quot;],PARAMETER[&quot;latitude_of_origin&quot;,60],PARAMETER[&quot;central_meridian&quot;,263],PARAMETER[&quot;scale_factor&quot;,1],PARAMETER[&quot;false_easting&quot;,3925000],PARAMETER[&quot;false_northing&quot;,8325000]]<br>


&gt; &gt;   <a href="http://narccap_ecpc-20c3m-tasmin-ncep.nc" target="_blank">narccap_ecpc-20c3m-tasmin-ncep.nc</a><br>
&gt; &gt;   <a href="http://narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc" target="_blank">narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc</a><br>
&gt; &gt; Fri May  8 09:34:14 2009: ncrcat tasmin_ECPC_1979010106.nc<br>
&gt; &gt; tasmin_ECPC_1981010106.nc tasmin_ECPC_1986010106.nc<br>
&gt; &gt; tasmin_ECPC_1991010106.nc tasmin_ECPC_1996010106.nc<br>
&gt; &gt; tasmin_ECPC_2001010106.nc <a href="http://narccap_ecpc-20c3m-tasmin-ncep.nc" target="_blank">narccap_ecpc-20c3m-tasmin-ncep.nc</a><br>
&gt; &gt;   NC_GLOBAL#nco_openmp_thread_number=1<br>
&gt; &gt;   NC_GLOBAL#spatial_ref=PROJCS[&quot;unnamed&quot;,GEOGCS[&quot;Normal Sphere<br>
&gt; &gt; (r=6370997)&quot;,DATUM[&quot;unknown&quot;,SPHEROID[&quot;sphere&quot;,6370997,0]],PRIMEM[&quot;Greenwich&quot;,0],UNIT[&quot;degree&quot;,0.0174532925199433]],PROJECTION[&quot;Polar_Stereographic&quot;],PARAMETER[&quot;latitude_of_origin&quot;,60],PARAMETER[&quot;central_meridian&quot;,263],PARAMETER[&quot;scale_factor&quot;,1],PARAMETER[&quot;false_easting&quot;,3925000],PARAMETER[&quot;false_northing&quot;,8325000]]<br>


&gt; &gt; Subdatasets:<br>
&gt; &gt;   SUBDATASET_1_NAME=NETCDF:&quot;<a href="http://narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc" target="_blank">narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc</a>&quot;:lon<br>
&gt; &gt;   SUBDATASET_1_DESC=[104x123] longitude (64-bit floating-point)<br>
&gt; &gt;   SUBDATASET_2_NAME=NETCDF:&quot;<a href="http://narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc" target="_blank">narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc</a>&quot;:lat<br>
&gt; &gt;   SUBDATASET_2_DESC=[104x123] latitude (64-bit floating-point)<br>
&gt; &gt;   SUBDATASET_3_NAME=NETCDF:&quot;<a href="http://narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc" target="_blank">narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc</a>&quot;:time_bnds<br>
&gt; &gt;   SUBDATASET_3_DESC=[9496x2] time_bnds (64-bit floating-point)<br>
&gt; &gt;   SUBDATASET_4_NAME=NETCDF:&quot;<a href="http://narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc" target="_blank">narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc</a>&quot;:tasmin<br>
&gt; &gt;   SUBDATASET_4_DESC=[9496x104x123] air_temperature (32-bit floating-point)<br>
&gt; &gt; Corner Coordinates:<br>
&gt; &gt; Upper Left  (    0.0,    0.0)<br>
&gt; &gt; Lower Left  (    0.0,  512.0)<br>
&gt; &gt; Upper Right (  512.0,    0.0)<br>
&gt; &gt; Lower Right (  512.0,  512.0)<br>
&gt; &gt; Center      (  256.0,  256.0)<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; james@basalt ~ $ python<br>
&gt; &gt;&gt;&gt;&gt; from osgeo import gdal<br>
&gt; &gt;&gt;&gt;&gt; dst = gdal.Open(&quot;<a href="http://narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc" target="_blank">narccap_ecpc-20c3m-tasmin-ncep-with-srs.nc</a>&quot;)<br>
&gt; &gt;&gt;&gt;&gt; dst.GetProjection()<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; gdal-dev mailing list<br>
&gt; &gt; <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
&gt; &gt; <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
&gt; &gt;<br>
&gt;<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></div></blockquote></div><br>