[gdal-dev] problem with 5D variables in NetCDF

Michael Sumner mdsumner at utas.edu.au
Tue Sep 23 08:12:29 EDT 2008


Hello,

The 5D dataset in this NetCDF file causes an error on Windows but not on 
Linux.

http://staff.acecrc.org.au/~mdsumner/gdal/foo.nc

The Windows FWTools is recent, and the Linux version is old:

Linux: GDAL 1.5dev, FWTools 1.3.2, released 2007/06/01

Windows: GDAL 1.6.0dev, FWTools 2.2.6, released 2008/08/22

Is this a known problem? Variables of 2D, 3D and 4D all seem fine on 
Windows even
when in a file containing a 5D variable.

I've put details below for (1) the file, (2) the SDS on Linux, (3) the 
SDS on Windows.


Cheers, Mike.

1. gdalinfo for file (Linux and Windows):

Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute
Driver: netCDF/Network Common Data Format
Files: foo.nc
Size is 512, 512
Coordinate System is `'
Subdatasets:
  SUBDATASET_1_NAME=NETCDF:"foo.nc":temperature
  SUBDATASET_1_DESC=[2x2x2x10x10] temperature (64-bit floating-point)
  SUBDATASET_2_NAME=NETCDF:"foo.nc":xx
  SUBDATASET_2_DESC=[10x10] xx (64-bit floating-point)
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  512.0)
Upper Right (  512.0,    0.0)
Lower Right (  512.0,  512.0)
Center      (  256.0,  256.0)



2. gdalinfo for SDS (Linux  ):

 gdalinfo NETCDF:"foo.nc":temperature
Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute
Driver: netCDF/Network Common Data Format
Files: none associated
Size is 10, 10
Coordinate System is `'
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,   10.0)
Upper Right (   10.0,    0.0)
Lower Right (   10.0,   10.0)
Center      (    5.0,    5.0)
Band 1 Block=10x1 Type=Float64, ColorInterp=Undefined
  NoData Value=9.96920996838687e+36
  Metadata:
    NETCDF_VARNAME=temperature
    NETCDF_DIMENSION_x=1
    NETCDF_DIMENSION_y=1
    NETCDF_DIMENSION_z=1
Band 2 Block=10x1 Type=Float64, ColorInterp=Undefined
. . .
. . .etc. up to Band 8


3. On Windows this fails with error message box:

"gdalinfo.exe has encountered a problem and needs to close"


The "xx" SDS works fine on both platforms:

gdalinfo NETCDF:"foo.nc":xx
Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute
Driver: netCDF/Network Common Data Format
Files: none associated
Size is 10, 10
Coordinate System is `'
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,   10.0)
Upper Right (   10.0,    0.0)
Lower Right (   10.0,   10.0)
Center      (    5.0,    5.0)
Band 1 Block=10x1 Type=Float64, ColorInterp=Undefined
  NoData Value=9.969209968386869e+036
  Metadata:
    NETCDF_VARNAME=xx



More information about the gdal-dev mailing list