<div dir="ltr">Hello all,<div>For the first time I am working with GRIB files and have stumbled across a problem having GDAL open files. The data source is the Copernicus Atmosphere Monitoring Service (<a href="https://atmosphere.copernicus.eu/">CAMS</a>). QGIS, ArcGIS and GRIB viewers have no problem opening the file for view, yet GDAL returns this error using multiple functions, including gdalinfo:</div><div><div><br></div><div>Warning: Inside GRIB2Inventory, Message # 26</div><div>ERROR: Ran out of file reading SECT0</div><div>There were 72 trailing bytes in the file.</div></div><div><br></div><div>Depending on the file, the reported trailing bytes varies. I should also mention that no spatial reference system is defined, though my assumption is that it is WGS 84, based on the data. If I just wanted to view the data, I would  use any of the aforementioned software to do so, but I would like to archive selected GRIB datasets in a postGIS database if possible.</div><div><br></div><div>Does anyone know the source of this error message? Has anyone found a work around? I would attach a sample GRIB file, but am not sure as to the protocol for attachments on this listserv.</div><div><br></div><div>kind regards,</div><div>Hannah Augustin</div><div><br></div><div>More info about the dataset including error message and first band (out of 25) of GRIB file:</div><div><div>PS C:\temp> gdalinfo .\z_cams_c_ecmf_20161203000000_prod_an_pl_000_ch4.grib</div><div>Warning: Inside GRIB2Inventory, Message # 26</div><div>ERROR: Ran out of file reading SECT0</div><div>There were 72 trailing bytes in the file.</div><div>Driver: GRIB/GRIdded Binary (.grb)</div><div>Files: .\z_cams_c_ecmf_20161203000000_prod_an_pl_000_ch4.grb</div><div>Size is 900, 451</div><div>Coordinate System is:</div><div>GEOGCS["Coordinate System imported from GRIB file",</div><div>    DATUM["unknown",</div><div>        SPHEROID["Sphere",6367470,0]],</div><div>    PRIMEM["Greenwich",0],</div><div>    UNIT["degree",0.0174532925199433]]</div><div>Origin = (-0.200000000000000,90.200000000000003)</div><div>Pixel Size = (0.400000000000000,-0.400000000000000)</div><div>Corner Coordinates:</div><div>Upper Left  (  -0.2000000,  90.2000000) (  0d12' 0.00"W, 90d12' 0.00"N)</div><div>Lower Left  (  -0.2000000, -90.2000000) (  0d12' 0.00"W, 90d12' 0.00"S)</div><div>Upper Right (     359.800,      90.200) (359d48' 0.00"E, 90d12' 0.00"N)</div><div>Lower Right (     359.800,     -90.200) (359d48' 0.00"E, 90d12' 0.00"S)</div><div>Center      ( 179.8000000,   0.0000000) (179d48' 0.00"E,  0d 0' 0.01"N)</div><div>Band 1 Block=900x1 Type=Float64, ColorInterp=Undefined</div><div>  Description = 1[hPa] ISBL (Isobaric surface)</div><div>  Metadata:</div><div>    GRIB_COMMENT=Potential vorticity [m^2K/kg/s]</div><div>    GRIB_ELEMENT=PVORT</div><div>    GRIB_FORECAST_SECONDS=0 sec</div><div>    GRIB_REF_TIME=  1480723200 sec UTC</div><div>    GRIB_SHORT_NAME=1-ISBL</div><div>    GRIB_UNIT=[m^2K/kg/s]</div><div>    GRIB_VALID_TIME=  1480723200 sec UTC</div></div></div>