Opened 7 years ago

Closed 7 years ago

#6719 closed defect (fixed)

GRIB2 read error

Reported by: tomkralidis Owned by: warmerdam
Priority: normal Milestone: 2.1.3
Component: GDAL_Raster Version: 2.1.0
Severity: normal Keywords: grib2
Cc: satri

Description

Reading the attached GRIB2 works via gdalinfo in GDAL 1.10.0 but not GDAL 2.1.0:

$ gdalinfo CMC_hrdps_continental_DEPR_ISBL_0200_ps2.5km_2016110818_P021-00.grib2
WARNING in tgt_create tree->numnodes == 0, no tree created.
WARNING: No incltree created.
WARNING in tgt_create tree->numnodes == 0, no tree created.
WARNING: No imsbtree created.
WARNING in tgt_create tree->numnodes == 0, no tree created.
WARNING: No incltree created.
WARNING in tgt_create tree->numnodes == 0, no tree created.
WARNING: No imsbtree created.
....<snip never ending warning>

Change History (10)

comment:1 by tomkralidis, 7 years ago

Turns out I can't attached a GRIB2 file (too big). The issue can be reproduced by trying gdalinfo against any file in http://dd.weather.gc.ca/model_hrdps/continental/grib2/12/001/

comment:2 by tomkralidis, 7 years ago

Cc: satri added

comment:3 by Even Rouault, 7 years ago

Resolution: fixed
Status: newclosed

In 36184:

OpenJPEG: for single-line organized images, such as found in some GRIB2 JPEG2000 images, use a Wx1 block size to avoid huge performance issues (fixes #6719)

comment:4 by Even Rouault, 7 years ago

In 36185:

OpenJPEG: for single-line organized images, such as found in some GRIB2 JPEG2000 images, use a Wx1 block size to avoid huge performance issues (fixes #6719)

comment:5 by Even Rouault, 7 years ago

Milestone: 2.1.3

I've never seen such crazy JPEG2000 images. They are organized as a Nx1 image (where N <= Width * Height) instead of the natural Width*Height 2D organization. That must not be good for the compression rate since JPEG2000 uses 2D wavelets, which are completely mis-used here. Sigh

comment:6 by Satri, 7 years ago

Seems there's potentially a typo in the two related commits.

There's

if( nTileH == 1 && nTileW < 20 * 1024 * 1204 )

which probably should be

if( nTileH == 1 && nTileW < 20 * 1024 * 1024 )

1204 => 1024

I'll let you fix if that's the case. Thanks -- Alex

comment:7 by Even Rouault, 7 years ago

In 36186:

Correct -arbitrary- threshold value to look more 'natural' (refs #6719)

comment:8 by Even Rouault, 7 years ago

In 36187:

Correct -arbitrary- threshold value to look more 'natural' (refs #6719)

comment:9 by tomkralidis, 7 years ago

Resolution: fixed
Status: closedreopened

Looks like this error appears using 2.1.0 (does not hang the process but emits the numerous warnings. Sample file to reproduce issue:

http://dd.weather.gc.ca/model_gem_regional/10km/grib2/12/006/CMC_reg_UGRD_TGL_10_ps10km_2017021312_P006.grib2

Version 0, edited 7 years ago by tomkralidis (next)

comment:10 by Even Rouault, 7 years ago

Resolution: fixed
Status: reopenedclosed

The issue was fixed/improved in 2.1.3, but it also requires a openjpeg fix ( https://github.com/uclouvain/openjpeg/pull/893 ) and/or the trunk workaround ( https://trac.osgeo.org/gdal/changeset/37373 ) to be completely silent

Note: See TracTickets for help on using tickets.