I am using windows 7(32-bit) and want to warp NetCDF (nc) files and save the output as GeoTIFF.

First I run gdalinfo first to get the info of the subdataset I need and added NETCDF in the beginning(e.g. gdalinfo NETCDF:"A2015069035500.L2_LAC_OC.nc") but was unfortunate because a warning appeared:

Warning 1: Variable has 0 dimension(s) - not supported. gdalinfo failed - unable to open 'netCDF:A2015069035500.L2_LAC_OC.nc'.

Command line input:

gdalinfo A2015069035500.L2_LAC_OC.nc

NetCDF is present when I tried gdalinfo --formats.

Does anyone have any idea about this?


Your problem comes from adressing the subdatasets wrong.

If you run gdalinfo on the complete file it will display the names of the subdatasets:


To get the information of the first subdataset you need to feed the complete name into gdalinfo

gdalinfo HDF5:"A2015069000500.L2_LAC_OC.nc"://geophysical_data/Kd_490

Alternatively you can use the -sd option to adress a subdataset:

gdalinfo -sd 1 A2015069000500.L2_LAC_OC.nc

If you want to translate a subdataset from HDF5 to GeoTiff you'll also need to provide the full name of the subdataset:

gdal_translate HDF5:"A2015069000500.L2_LAC_OC.nc"://geophysical_data/Kd_490 subdataset1.tif

Additionally your product is HDF5 and not NetCDF, as specified in the Ocean Level-2 Data Products.

  • How will I batch process gdalwarp these HDF5 files? – user Jul 14 '15 at 3:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.