I'm extracting data from a GRIB file using GDAL in Python 3 on CentOS.

The model is 40 km resolution, and is usually 151x93.

When I try to extract data from band 195, I get the following error:

Error 4: 'vsimem/work_grib_0x2a194da.jpc' not recognized as a supported file format.

dec_jpeg2000: Unable to open JPEG2000 image within GRIB file.

Is the JPEG2000 driver available?

Warning 1: Band 295 of GRIB dataset is 108x94, while the first band and dataset is 151x113. Georeferencing of band 295 may be incorrect, and data access may be incomplete.

Could the resolution warning be coming from using the wrong driver?

When I call band.XSize, it reports 151, rather than 108.

Can this be resolved in Python?

Edit: the source for the warning message is found here:


Your Answer

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

Browse other questions tagged or ask your own question.