<div dir="ltr"><div>Hello,</div><div>I'm trying to open a NetCDF file from S3 with Gdal
and I'm hitting some problems and I'm not sure whether they are
limitations of the driver or I'm just not using it right.<br></div><div><br></div><div>I
have two NetCDF files, one is (small) sample file from the Copernicus
File Danger Index, the other is one month of data (1.5GB) from the ECMWF
Reanalysis 2m Temperature variable. The first file opens file from my
local file system and using the /vsis3 virtual filesystem but the second
one doesn't.</div><div><br></div><div>With CPL_DEBUG=ON, successfully opening the file with gdalinfo looks like this:<br></div><div><br></div><div><pre style="box-sizing:border-box;overflow:auto;font-family:monospace;font-size:14px;display:block;padding:1px 0px;margin:0px;line-height:inherit;color:rgb(0,0,0);word-break:break-all;background-color:rgb(255,255,255);border:0px none;border-radius:0px;white-space:pre-wrap;vertical-align:baseline;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">GNM: GNMRegisterAllInternal
GNM: RegisterGNMFile
GNM: RegisterGNMdatabase
GDAL_netCDF: driver detected file type=2, libnetcdf detected type=2
GDAL_netCDF: dim_count = 3
GDAL_netCDF: var_count = 4
GDAL_netCDF:
=====
SetProjectionFromVar( 3)
GDAL_netCDF: bIsGdalFile=0 bIsGdalCfFile=0 bBottomUp=1
GDAL_netCDF: set bBottomUp = 0 from Y axis
GDAL_netCDF: xdim: 1440 nSpacingBegin: 250 nSpacingMiddle: 250 nSpacingLast: 250
GDAL_netCDF: ydim: 721 nSpacingBegin: -250 nSpacingMiddle: -250 nSpacingLast: -250
GDAL_netCDF: SetGeoTransform(-0.125000,0.250000,0.000000,90.125000,0.000000,-0.250000)
GDAL_netCDF: bGotGeogCS=0 bGotCfSRS=0 bGotCfGT=1 bGotGdalSRS=0 bGotGdalGT=0
GDAL_netCDF: netcdf type=3 gdal type=3 signedByte=1<br>...<br><br></pre><pre style="box-sizing:border-box;overflow:auto;font-family:monospace;font-size:14px;display:block;padding:1px 0px;margin:0px;line-height:inherit;color:rgb(0,0,0);word-break:break-all;background-color:rgb(255,255,255);border:0px none;border-radius:0px;white-space:pre-wrap;vertical-align:baseline;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:arial,sans-serif">The same file when uploaded to S3 outputs the following using the vsis3 virtual filesystem:</span><br><br>GNM: GNMRegisterAllInternal
GNM: RegisterGNMFile
GNM: RegisterGNMdatabase
HTTP: libcurl/7.69.1 OpenSSL/1.1.1g zlib/1.2.5 libssh2/1.8.2
HTTP: GDAL was built against curl 7.64.1, but is running against 7.69.1.
S3: Switching to region eu-west-1
VSICURL: Downloading 0-16383 (<a href="https://some-s3-bucket.s3.amazonaws.com/era5-reanalysis/2m_temperature/2020-01.nc)." target="_blank">https://some-s3-bucket.s3.amazonaws.com/era5-reanalysis/2m_temperature/2020-01.nc).</a>..
VSICURL: Got response_code=206
ERROR 4: `/vsis3/some-s3-bucket/era5-reanalysis/2m_temperature/<a href="http://2020-01.nc" target="_blank">2020-01.nc</a>' not recognized as a supported file format.
gdalinfo failed - unable to open '/vsis3/some-s3-bucket/era5-reanalysis/2m_temperature/<a href="http://2020-01.nc" target="_blank">2020-01.nc</a>'.<br><br><br></pre><pre style="box-sizing:border-box;overflow:auto;font-family:monospace;font-size:14px;display:block;padding:1px 0px;margin:0px;line-height:inherit;color:rgb(0,0,0);word-break:break-all;background-color:rgb(255,255,255);border:0px none;border-radius:0px;white-space:pre-wrap;vertical-align:baseline;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:arial,sans-serif">Is it clear from this output whether there is an issue with the <a href="http://2020-01.nc" target="_blank">2020-01.nc</a> file?<br></span></pre><pre style="box-sizing:border-box;overflow:auto;font-family:monospace;font-size:14px;display:block;padding:1px 0px;margin:0px;line-height:inherit;color:rgb(0,0,0);word-break:break-all;background-color:rgb(255,255,255);border:0px none;border-radius:0px;white-space:pre-wrap;vertical-align:baseline;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:arial,sans-serif">Thanks,<br></span></pre><pre style="box-sizing:border-box;overflow:auto;font-family:monospace;font-size:14px;display:block;padding:1px 0px;margin:0px;line-height:inherit;color:rgb(0,0,0);word-break:break-all;background-color:rgb(255,255,255);border:0px none;border-radius:0px;white-space:pre-wrap;vertical-align:baseline;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:arial,sans-serif">Duncan Walker</span></pre></div></div>