[gdal-dev] Cannot read NetCDF subdatasets
Etienne Tourigny
etourigny.dev at gmail.com
Fri Jun 15 03:53:34 PDT 2012
That file does not use the "bigfile" flag, but it is probably a
netcdf-4 file (with hdf5 storage).
Regardless, "bigfiles" are supported since gdal-1.9.0 on 32-bit platforms.
I would guess your netcdf and gdal installation do not have netcdf-4 support.
And probably a 'gdalinfo <file>' shows the hdf5 driver picks it up, right?
You can check your netcdf-4 suppport with
1)
$nc-config --all
(check for nc-4)
--has-nc4 -> yes
--has-hdf5 -> yes
2)
$ ncdump -k <file>
netCDF-4
$ ncdump <file>
...
3) gdalinfo --format netcdf
you should see:
<CreationOptionList>
<Option name="FORMAT" type="string-select" default="NC">
<Value>NC</Value>
<Value>NC2</Value>
<Value>NC4</Value>
<Value>NC4C</Value>
</Option>
If it is supported, could you share an example file?
Etienne
On Fri, Jun 15, 2012 at 7:16 AM, Free <yjacolin at free.fr> wrote:
> Paolo,
>
> I had a similar issue with 32b system with some NetCDF files with "bigfile" flag.
> We should use (if I remember correctly) 64b system.
>
> Regards,
>
> Y.
> Le vendredi 15 juin 2012 12:10:57 Paolo Corti a écrit :
>> Hi all
>>
>> While I can succesfully read NetCDF in Mint 12 (my development
>> environment), I cannot manage to read the subdatasets in REL5 (the
>> production server).
>>
>> In REL5 I can succesfully read the NetCDF dataset with gdalinfo:
>>
>> gdalinfo /my/full/path/mydataset.nc4
>>
>> But if I try reading a subdataset, I get the following error (CPL_DEBUG is
>> ON):
>>
>> $ gdalinfo NETCDF:"/my/full/path/mydataset.nc4":MY_VAR
>> GDAL_netCDF:
>> =====
>> calling nc_open(/my/full/path/mydataset.nc4 )
>>
>> GDAL: GDALClose(NETCDF:/my/full/path/mydataset.nc4:MY_VAR, this=0x85177f8)
>> ERROR 4: `NETCDF:/my/full/path/mydataset.nc4:MY_VAR' does not exist in
>> the file system,
>> and is not recognised as a supported dataset name.
>>
>> gdalinfo failed - unable to open
>> 'NETCDF:/my/full/path/mydataset.nc4:MY_VAR'. GDAL: In GDALDestroy -
>> unloading GDAL shared library.
>>
>> Some more information on my system configuration:
>>
>> $ rpm -qa hdf5*
>> hdf5-1.8.7-1.el5.rf
>> hdf5-devel-1.8.7-1.el5.rf
>>
>> $ gdalinfo --version
>> GDAL 1.9.0, released 2011/12/29
>>
>> $ gdalinfo --formats | grep -i cdf
>> GMT (rw): GMT NetCDF Grid Format
>> netCDF (rw+): Network Common Data Format
>>
>> $ gdalinfo --formats | grep -i hdf
>> HDF4 (ro): Hierarchical Data Format Release 4
>> HDF4Image (rw+): HDF4 Dataset
>> HDF5 (ro): Hierarchical Data Format Release 5
>> HDF5Image (ro): HDF5 Dataset
>>
>> any ideas? Is it possible that I am missing any dependency?
>> thanks so much
>>
>> p
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
More information about the gdal-dev
mailing list