[gdal-dev] Issue with sub-dataset suffix

Simon Eves simon.eves at heavy.ai
Fri Jul 21 15:27:04 PDT 2023


We are dealing with some netCDF files on S3 which have multiple
sub-datasets.

Trying to do a simple gdalinfo using VSI paths.

Note you may need to have AWS_NO_SIGN_REQUEST=YES to access the file below.

This works, and gives a summary dump...

$ gdalinfo /vsis3/noaa-nwm-pds/nwm.20230720/short_range/
nwm.t00z.short_range.land.f001.conus.nc

This fails...

$ gdalinfo
/vsis3/noaa-nwm-pds/nwm.20230720/short_range/nwm.t00z.short_range.land.f001.conus.nc:
SOILSAT_TOP
ERROR 4:
`/vsis3/noaa-nwm-pds/nwm.20230720/short_range/nwm.t00z.short_range.land.f001.conus.nc:SOILSAT_TOP'
does not exist in the file system, and is not recognized as a supported
dataset name.
gdalinfo failed - unable to open
'/vsis3/noaa-nwm-pds/nwm.20230720/short_range/nwm.t00z.short_range.land.f001.conus.nc:
SOILSAT_TOP'.

If you ALSO specify the file type hint on the front of the path, it works...

$ gdalinfo
NETCDF:/vsis3/noaa-nwm-pds/nwm.20230720/short_range/nwm.t00z.short_range.land.f001.conus.nc:
SOILSAT_TOP

This seems like a bug. It should still be able to recognize and open the
file without the type hint, whether or not you provide a sub-dataset suffix.

Our system generally relies heavily on GDAL's usually-reliable ability to
recognize file types and load anything without such hints, so having to
provide that as well will be undesirable.

-- 
Simon Eves
Senior Rendering Engineer
+1 (415) 902-1996
simon.eves at heavy.ai

<http://www.heavy.ai>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230721/9074c5dc/attachment.htm>


More information about the gdal-dev mailing list