[gdal-dev] Reading a NetCDF file with python (not recognised as a supported dataset name

Rutger kassies at gmail.com
Mon Jun 11 00:54:27 PDT 2012


Hey Etienne,

Thanks alot for the suggestions, here's are my results:

I made a minimal install of osgeo4w and tried to run the earlier script, it
results in the same error. I didnt notice anything different. 

I have tried it with the attached file, which also results in the same
error. 

Creating the 'tmp1.nc' with the command-line utilities works (as expected),
but then opening it directly (or with the vrt) again results in the same
error.
The script for testing was as simple as this:
/try:
    from osgeo import gdal
except ImportError:
    import gdal

dsin = gdal.Open('NETCDF:trmm.nc:soil_moisture_x')
/

I dont notice anything different when removing the VRT part, except that the
VRT method only throws the error when i actually start reading from the
dataset, whereas the direct .nc reading already fails at gdal.Open(). 

I added the VRT part to be sure that the reference to the NetCDF file was
correct. I wasnt 100% sure if my reference was correct, therefore i made
gdal_translate build the VRT. But all of it doesnt seem to make a
difference.


Thanks for your help so far! 



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Reading-a-NetCDF-file-with-python-not-recognised-as-a-supported-dataset-name-tp4979943p4980313.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list