Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#7103 closed defect (fixed)

grib file: wrongly positioned, or wrong (meta)data?

Reported by: rduivenvoorde Owned by: warmerdam
Priority: normal Milestone: 2.2.3
Component: default Version: unspecified
Severity: normal Keywords:

Description (last modified by Even Rouault)

I have this grb file ( which in gdalinfo shows:

gdalinfo ECMWF_DET_RIVM_Set_01_2017082100_000_GB.grb 
Warning: Inside GRIB2Inventory, Message # 117
ERROR: Ran out of file reading SECT0
There were 20 trailing bytes in the file.
Driver: GRIB/GRIdded Binary (.grb)
Files: ECMWF_DET_RIVM_Set_01_2017082100_000_GB.grb
Size is 720, 361
Coordinate System is:
GEOGCS["Coordinate System imported from GRIB file",
Origin = (180.250000000000000,90.250000000000000)
Pixel Size = (0.500000000000000,-0.500000000000000)
Corner Coordinates:
Upper Left  ( 180.2500000,  90.2500000) (180d15' 0.00"E, 90d15' 0.00"N)
Lower Left  ( 180.2500000, -90.2500000) (180d15' 0.00"E, 90d15' 0.00"S)
Upper Right (     540.250,      90.250) (Invalid angle, 90d15' 0.00"N)
Lower Right (     540.250,     -90.250) (Invalid angle, 90d15' 0.00"S)
Center      (     360.250,       0.000) (360d15' 0.00"E,  0d 0' 0.01"N)
Band 1 Block=720x1 Type=Float64, ColorInterp=Undefined
  Description = 97[-] HYBL="Hybrid level"

Which seems a little odd? That is the upper right corner in a normal map... BUT in panoply it is viewed normal. See screendump: left is panoply, right is QGIS

Is this a data problem? Or a datum wrap arround problem.

(no need to hack something, if it is wrong data I'll try to contact the data owners)

Attachments (1)

grib.png (774.4 KB ) - added by rduivenvoorde 6 years ago.
left panoply, right QGIS + world

Download all attachments as: .zip

Change History (5)

by rduivenvoorde, 6 years ago

Attachment: grib.png added

left panoply, right QGIS + world

comment:1 by Even Rouault, 6 years ago

Description: modified (diff)

comment:2 by Even Rouault, 6 years ago

Resolution: fixed
Status: newclosed

In 40506:

GRIB: adjust the longitude range to be close to [-180,180] when possible for products whose left origin is close to 180deg. Can be controlled with the GRIB_ADJUST_LONGITUDE_RANGE=YES/NO config option, that defaults to YES in trunk (fixes #7103)

comment:3 by Even Rouault, 6 years ago

In 40507:

GRIB: if GRIB_ADJUST_LONGITUDE_RANGE config option is set to YES, adjust the longitude range to be close to [-180,180] when possible for products whose left origin is close to 180deg. (fixes #7103)

comment:4 by Even Rouault, 6 years ago

Milestone: 2.2.3

Fixed. In trunk, the origin will now be shifted to -179.75 by default. In 2.2 branch, to avoid potential backward compatibility issues with code that would already deal with that oddity, you must define the GRIB_ADJUST_LONGITUDE_RANGE environment variable to YES.

Note: See TracTickets for help on using tickets.