Opened 13 years ago
Closed 12 years ago
#3791 closed defect (fixed)
Processing Temperature Bands in Grib data results in values in degrees Celsius
Reported by: | bcrosby | Owned by: | aboudreault |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | grib |
Cc: | warmerdam |
Description
For some reason, it looks like (by default) values returned by gdal when processing grib files is in metric (degrees Celsius) instead of degrees Kelvin.
This is confusing when the metadata in the band says that values are in degrees Kelvin.
For example, processing a grib file from the NOAA:
Band 1 Block=360x1 Type=Float64, ColorInterp=Undefined Description = 10000[Pa] ISBL="Isobaric surface" Metadata: GRIB_UNIT=[K] GRIB_COMMENT=Temperature [K] GRIB_ELEMENT=TMP GRIB_SHORT_NAME=10000-ISBL GRIB_REF_TIME= 1287424800 sec UTC GRIB_VALID_TIME= 1287424800 sec UTC GRIB_FORECAST_SECONDS=0 sec GRIB_PDS_PDTN=0 GRIB_PDS_TEMPLATE_NUMBERS=0 0 2 0 81 0 0 0 1 0 0 0 0 100 0 0 0 39 16 255 0 0 0 0 0
However, if I run gdal2xyz.py to see the values of band 1:
> gdal2xyz.py 2010101818-00.grib -band 1 | more 0.500 269.500 -56.25 1.500 269.500 -56.25 2.500 269.500 -56.25 3.500 269.500 -56.25
-56.25 is not a valid temperature in degrees Kelvin.
I've been able to confirm with the windows version of the degrib software that the values are stored in K in the grib file.
(I can be reached on #gdal, user bcrosby)
Change History (9)
comment:1 by , 13 years ago
Component: | default → GDAL_Raster |
---|---|
Keywords: | grib added |
comment:2 by , 12 years ago
bcrosby, could you attach (or send me privately) a grib file as test case please?
comment:3 by , 12 years ago
Cc: | added |
---|---|
Owner: | changed from | to
comment:4 by , 12 years ago
comment:7 by , 12 years ago
bcrosby, could you confirm that this is the expected and valid output:
0.500 89.500 218.4 1.500 89.500 218.4 2.500 89.500 218.4 3.500 89.500 218.4 4.500 89.500 218.4
This thread is likely quite relavant to this issue:
http://www.osgeo.org/pipermail/gdal-dev/2008-January/015693.html