[gdal-dev] multi-dimensional coordinate variables

Aaron Sims aaron_sims at ncsu.edu
Thu Apr 9 11:50:13 EDT 2009


All,

I am trying to view a netcdf file in grass via gdal.  The netcdf data is 
on a projected grid so the latitudes and longitudes are are unique at 
each point (i.e. 2D coordinate variables).
gdal  doesnt seem to understand the georeferencing information whn I try 
to follow the CF-1.0 specs on multi-dimensional coordinate variables,
http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/cf-conventions.html#id2888361
Below is the header info from ncdump and the resulting info coming from 
gdalinfo. Can you use multi-dimensional coordinate variables in 
conjunction with gdal?
If so, can you advise what I need to do to make my netcdf file work with 
gdal?

Thank you,
Aaron

*NCDUMP output:*
 >>>>> ncdump -h conc_20081208071500.nc
netcdf conc_20081208071500 {
dimensions:
        Time = UNLIMITED ; // (1 currently)
        DateStrLen = 14 ;
        xc = 299 ;
        yr = 301 ;
        nspecies = 1 ;
        nageclass = 1 ;
variables:
        char Times(Time, DateStrLen) ;
                Times:long_name = "time" ;
                Times:units = "minutes since Wed Apr  8 15:49:19 2009" ;
        float wet(Time, nageclass, nspecies, yr, xc) ;
                wet:long_name = "WET DEPOSITION" ;
                wet:units = "ppm" ;
                wet:coordinates = "lon lat" ;
        float dry(Time, nageclass, nspecies, yr, xc) ;
                dry:long_name = "DRY DEPOSITION" ;
                dry:units = "ppm" ;
                dry:coordinates = "lon lat" ;
        float xc(xc) ;
                xc:long_name = "x-coordinate in Cartesian system" ;
                xc:units = "m" ;
        float yr(yr) ;
                yr:long_name = "y-coordinate in Cartesian system" ;
                yr:units = "m" ;
        float nspecies(nspecies) ;
                nspecies:long_name = "number of species" ;
                nspecies:standard_name = "number_of_species" ;
        float nageclass(nageclass) ;
                nageclass:long_name = "number of age classes" ;
                nageclass:standard_name = "number_of_ageclasses" ;
        float lat(yr, xc) ;
                lat:long_name = "latitude" ;
                lat:units = "degrees_north" ;
        float lon(yr, xc) ;
                lon:long_name = "longitude" ;
                lon:units = "degrees_east" ;

*GDALINFO output:*
 >>>>gdalinfo NETCDF:"conc_20081208071500.nc":dry
Driver: netCDF/Network Common Data Format
Files: none associated
Size is 299, 301
Coordinate System is `'
Origin = (0.500000000000000,301.500000000000000)
Pixel Size = (1.000000000000000,-1.000000000000000)
Metadata:
  NC_GLOBAL#title=FLEXPART Concentration Grids
  NC_GLOBAL#institution=State Climate Office of NC
  NC_GLOBAL#history=Created on Wed Apr  8 15:49:19 2009
  NC_GLOBAL#reference=http://www.nc-climate.ncsu.edu
  NC_GLOBAL#Conventions=CF-1.0
  dry#long_name=DRY DEPOSITION
  dry#units=C
  dry#coordinates=lon lat
  xc#long_name=x-coordinate in Cartesian system
  xc#units=m
  yr#long_name=y-coordinate in Cartesian system
  yr#units=m
  nspecies#long_name=number of species
  nspecies#standard_name=number_of_species
  nageclass#long_name=number of age classes
  nageclass#standard_name=number_of_ageclasses
Corner Coordinates:
Upper Left  (       0.500,     301.500)
Lower Left  (   0.5000000,   0.5000000)
Upper Right (     299.500,     301.500)
Lower Right (     299.500,       0.500)
Center      (     150.000,     151.000)
Band 1 Block=299x1 Type=Float32, ColorInterp=Undefined
  NoData Value=9.96920996838686905e+36
  Metadata:
    NETCDF_VARNAME=dry
    NETCDF_DIMENSION_Time=1
    NETCDF_DIMENSION_nageclass=1.000000
    NETCDF_DIMENSION_nspecies=1.000000
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090409/65e735a5/attachment.html


More information about the gdal-dev mailing list