Skip Menu |

This queue is for tickets about the Geo-ReadGRIB CPAN distribution.

Report information
The Basics
Id: 67457
Status: rejected
Priority: 0/
Queue: Geo-ReadGRIB

People
Owner: frank.l.cox [...] gmail.com
Requestors: sweinberger [...] ubimet.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Unable to read NCEP-Gribs spanning whole world with lon = 0..-1
Date: Thu, 14 Apr 2011 12:17:59 +0200
To: bug-Geo-ReadGRIB [...] rt.cpan.org
From: Stephan Weinberger <sweinberger [...] ubimet.com>
Geo::ReadGrib 1.4 seems to incorrectly read longitude values when they span from 0 to -1 (360° 'wrapped around') like in NCEP worldwide gribs. Following is the output on a grib consisting of 0-180hr fcst records downloaded from http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.YYYYMMDDHH/gfs.tHHz.pgrbf* and combined (via cat) into one file: $grib->show(): --------------------------------------------------------- Locations: lat: 90 to -90 long: 0 to -1 Times: Wed Apr 13 18:00:00 2011 (1302717600) to Fri May 20 00:00:00 2016 (1463702400) Types: 4LFTX: Best (4-layer) lifted index [K] ACPCP: Convective precipitation [kg/m^2] APCP: Total precipitation [kg/m^2] CSNOW: Categorical snow [yes=1;no=0] PRMSL: Pressure reduced to MSL [Pa] RH: Relative humidity [%] TCDC: Total cloud cover [%] TMAX: Max. temp. [K] TMIN: Min. temp. [K] TMP: Temp. [K] UGRD: u wind [m/s] VGRD: v wind [m/s] --------------------------------------------------------- grib->extract('TMAX', 0.5, 0.5): --------------------------------------------------------- extract(): LONG: >0.5< out of range 0 to -1 --------------------------------------------------------- grib->extract('TMAX', 0.5, -0.5): --------------------------------------------------------- extract(): LONG: >-0.5< out of range 0 to -1 --------------------------------------------------------- wgrib -V: --------------------------------------------------------- [...] rec 4:260890:date 2011041312 TMAX kpds5=15 kpds6=105 kpds7=2 levels=(0,2) grid=3 2 m above gnd valid 0-6hr: TMAX=Max. temp. [K] timerange 2 P1 0 P2 6 TimeU 1 nx 360 ny 181 GDS grid 0 num_in_ave 0 missing 0 center 7 subcenter 0 process 96 Table 2 latlon: lat 90.000000 to -90.000000 by 1.000000 nxny 65160 long 0.000000 to -1.000000 by 1.000000, (360 x 181) scan 0 mode 128 bdsgrid 1 min/max data 210.2 322.5 num bits 11 BDS_Ref 2102 DecScale 1 BinScale 0 [...] rec 439:36428326:date 2011041312 TMAX kpds5=15 kpds6=105 kpds7=2 levels=(0,2) gr id=3 2 m above gnd valid 174-180hr: TMAX=Max. temp. [K] timerange 2 P1 174 P2 180 TimeU 1 nx 360 ny 181 GDS grid 0 num_in_ave 0 missi ng 0 center 7 subcenter 0 process 96 Table 2 latlon: lat 90.000000 to -90.000000 by 1.000000 nxny 65160 long 0.000000 to -1.000000 by 1.000000, (360 x 181) scan 0 mode 128 bd sgrid 1 min/max data 210 320.1 num bits 11 BDS_Ref 2100 DecScale 1 BinScale 0 [...] --------------------------------------------------------- -- Stephan Weinberger, BSc IT UBIMET GmbH Dresdner Straße 82 A 1200 Wien Tel +43 1 99 71 004 - 38 Fax +43 1 99 71 004 - 20 sweinberger@ubimet.com www.unwetterzentrale.at www.ubimet.com
It looks like the files in that location are grib2 format. Geo::ReadGRIB only supports grib1 files. NCEP grib1 files can be found here: ftp://polar.ncep.noaa.gov/pub/waves/latest_run and other places. Geo::ReadGRIB will support the world wide grib files found there including concatenated ones. On Thu Apr 14 06:18:14 2011, sweinberger@ubimet.com wrote: Show quoted text
> Geo::ReadGrib 1.4 seems to incorrectly read longitude values when they > span > from 0 to -1 (360° 'wrapped around') like in NCEP worldwide gribs. > > Following is the output on a grib consisting of 0-180hr fcst records > downloaded from >
http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.YYYYMMDDHH/gfs.t HHz.pgrbf* Show quoted text
> and combined (via cat) into one file: > > $grib->show(): > --------------------------------------------------------- > Locations: > > lat: 90 to -90 > long: 0 to -1 > > Times: > > Wed Apr 13 18:00:00 2011 (1302717600) to Fri May 20 00:00:00 > 2016 > (1463702400) > > Types: > > 4LFTX: Best (4-layer) lifted index [K] > ACPCP: Convective precipitation [kg/m^2] > APCP: Total precipitation [kg/m^2] > CSNOW: Categorical snow [yes=1;no=0] > PRMSL: Pressure reduced to MSL [Pa] > RH: Relative humidity [%] > TCDC: Total cloud cover [%] > TMAX: Max. temp. [K] > TMIN: Min. temp. [K] > TMP: Temp. [K] > UGRD: u wind [m/s] > VGRD: v wind [m/s] > --------------------------------------------------------- > > grib->extract('TMAX', 0.5, 0.5): > --------------------------------------------------------- > extract(): LONG: >0.5< out of range 0 to -1 > --------------------------------------------------------- > > grib->extract('TMAX', 0.5, -0.5): > --------------------------------------------------------- > extract(): LONG: >-0.5< out of range 0 to -1 > --------------------------------------------------------- > > wgrib -V: > --------------------------------------------------------- > [...] > > rec 4:260890:date 2011041312 TMAX kpds5=15 kpds6=105 kpds7=2 > levels=(0,2) > grid=3 2 m above gnd valid 0-6hr: > TMAX=Max. temp. [K] > timerange 2 P1 0 P2 6 TimeU 1 nx 360 ny 181 GDS grid 0 num_in_ave 0 > missing > 0 > center 7 subcenter 0 process 96 Table 2 > latlon: lat 90.000000 to -90.000000 by 1.000000 nxny 65160 > long 0.000000 to -1.000000 by 1.000000, (360 x 181) scan 0 > mode 128 > bdsgrid 1 > min/max data 210.2 322.5 num bits 11 BDS_Ref 2102 DecScale 1 > BinScale 0 > > [...] > > rec 439:36428326:date 2011041312 TMAX kpds5=15 kpds6=105 kpds7=2 > levels=(0,2) > gr > id=3 2 m above gnd valid 174-180hr: > TMAX=Max. temp. [K] > timerange 2 P1 174 P2 180 TimeU 1 nx 360 ny 181 GDS grid 0 > num_in_ave 0 > missi > ng 0 > center 7 subcenter 0 process 96 Table 2 > latlon: lat 90.000000 to -90.000000 by 1.000000 nxny 65160 > long 0.000000 to -1.000000 by 1.000000, (360 x 181) scan 0 > mode 128 > bd > sgrid 1 > min/max data 210 320.1 num bits 11 BDS_Ref 2100 DecScale 1 > BinScale 0 > > [...] > --------------------------------------------------------- >
grib2 files are still not supported