Ticket #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
Note: See
TracTickets for help on using
tickets.
