1

I'm trying to convert this file to EPSG:3857 with this command:

gdalwarp -t_srs EPSG:3857 S2A_rhow_l2r.nc test-proc.nc

Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute
Warning 1: Several drivers matching nc extension. Using NETCDF
ERROR 1: Input file S2A_rhow_l2r.nc has no raster bands.

I have no idea how to solve this problem.

0

The file does indeed contain raster subdatasets and GDAL can see them but there may so something special in the coordinates of that NetCDF file. Gdalinfo with GDAL 2.4 reports this

gdalinfo NETCDF:"S2A_turbidez.nc":rhow_865
Warning 1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid argument".
Warning 1: dimension #1 (x) is not a Longitude/X dimension.
Warning 1: dimension #0 (y) is not a Latitude/Y dimension.
Driver: netCDF/Network Common Data Format
Files: S2A_turbidez.nc
Size is 4584, 2976
Coordinate System is `'
Origin = (0.000000000000000,0.000000000000000)
Pixel Size = (0.000000000000000,0.000000000000000)

Gdalinfo with GDAL 3.0.1dev reports this (notice that the syntax has been changed)

gdalinfo NETCDF:"S2A_turbidez.nc":rhow_865
Warning 1: NetCDF driver detected file type=5, but libnetcdf detected type=3
Warning 1: dimension #1 (x) is not a Longitude/X dimension.
Warning 1: dimension #0 (y) is not a Latitude/Y dimension.
ERROR 1: netcdf error #-57 : NetCDF: Start+count exceeds dimension bound .
at (e:\sdk\vc15x64\gdal\gdal\frmts\netcdf\netcdfdataset.cpp,netCDFDataset::SetProjectionFromVar,3260)

Driver: netCDF/Network Common Data Format
Files: S2A_turbidez.nc
Size is 4584, 2976
Origin = (0.000000000000000,0.000000000000000)
Pixel Size = (0.000000000000000,0.000000000000000)

It is not a surprise that gdalwarp fails as well, here tried with 3.0.1dev.

gdalwarp -t_srs EPSG:3857 NETCDF:S2A_turbidez.nc://rhow_865 test-proc.nc
Warning 1: NetCDF driver detected file type=5, but libnetcdf detected type=3
Warning 1: dimension #1 (x) is not a Longitude/X dimension.
Warning 1: dimension #0 (y) is not a Latitude/Y dimension.
ERROR 1: netcdf error #-57 : NetCDF: Start+count exceeds dimension bound .
at (e:\sdk\vc15x64\gdal\gdal\frmts\netcdf\netcdfdataset.cpp,netCDFDataset::SetProjectionFromVar,3260)

Warning 1: Several drivers matching nc extension. Using NETCDF
ERROR 1: Cannot invert geotransform

The error seems to come from the NetCDF library. Reference: https://octave.sourceforge.io/netcdf/function/netcdf_getVar.html

Same error message appears in https://stackoverflow.com/questions/47085101/netcdf-startcount-exceeds-dimension-bound but I can't say if error is in the NetCDF file or in GDAL. I suggest to write mail to the gdal-dev mailing list.

  • Thanks for your time, i will write to gdal-dev. now i understand a litle bit more – grod Aug 23 at 14:14

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.