Opened 6 months ago

Closed 2 months 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 Changed 6 months ago by tomkralidis

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 Changed 6 months ago by tomkralidis

Cc: satri added

comment:3 Changed 6 months ago by Even Rouault

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 Changed 6 months ago by Even Rouault

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 Changed 6 months ago by Even Rouault

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 Changed 6 months ago by Satri

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 Changed 6 months ago by Even Rouault

In 36186:

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

comment:8 Changed 6 months ago by Even Rouault

In 36187:

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

comment:9 Changed 2 months ago by tomkralidis

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

Last edited 2 months ago by tomkralidis (previous) (diff)

comment:10 Changed 2 months ago by Even Rouault

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.