[Gdal-dev] netcdf reading problems

Tim Sutton tim at linfiniti.com
Thu Sep 30 09:21:51 EDT 2004


Hi

I am trying to read netcdf data with gdal so that I can convert it to ascii 
format, and to be able to view it in QGIS. I found that gdal wont read 
any .nc files I give it. The data I am trying to read is multiband (e.g. 
http://linux-gis.co.uk/climate_sample.nc), but even a simple single band 
layer (http://linux-gis.co.uk/simple.nc) wont read. Iget error message like 
this from gdal:

aps02ts at linux:/tmp/netcdf_tests> gdalinfo simple.nc
ERROR 4: `simple.nc' not recognised as a supported file format.

GDALOpen failed - 4
`simple.nc' not recognised as a supported file format.

My gdal is built against cvs head:

aps02ts at linux:/tmp/netcdf_tests> gdalinfo --version
GDAL 1.2.2.0, released 2004/08/16

And has netcdf support compiled in :

aps02ts at linux:/tmp/netcdf_tests> gdalinfo --formats
Supported Formats:
 
8<----------- snip-----------------
  netCDF (rw): network Common Data Format
8<----------- snip-----------------


And the netcdf lib I am using is a suse rpm:

aps02ts at linux:/tmp/netcdf_tests> rpm -qa |grep netcdf
netcdf-3.5.0-665

I have tested the sample data with a standlone netcdf viewer (ncview) and it 
is able to read the data without problem.

Any help you can offer will be greatly appreciated!

Regards

Tim Sutton

-- 
The only reason for time is so that everything doesn't happen at once 
 --Albert Einstein 

Get my public keys from:

http://tim.suttonfamily.co.uk/modules.php?name=Content&pa=showpage&pid=2



More information about the Gdal-dev mailing list