Grads 2.0 with grib2 files
Jennifer Adams
jma at COLA.IGES.ORG
Thu Feb 7 07:30:37 EST 2008
There is a bug in g2clib that causes it to fail to detect the end of
a grib2 record if sizeof(g2int) != 4 (i.e. on 64-bit systems). You
need the following patch to seekgb.c in g2clib:
39d38
< int hdr;
69,70c68,69
< k4=fread(&hdr,4,1,lugb); //hard-coded 4
instead of sizof(g2int)
< if (k4 == 1 && hdr == 926365495) { //GRIB message
found
---
> k4=fread(&end,sizeof(g2int),1,lugb);
> if (k4 == 1 && end == 926365495) { //GRIB message
found
I have patched g2clib-1.0.5 and posted the new src tarball on our ftp
server:
ftp://grads.iges.org/grads/Supplibs/2.0/src/g2clib-1.0.5.tar.gz
If implementing this patch and rebuilding the library and relinking
with grads doesn't fix your problem, please let me know.
Jennifer
On Feb 7, 2008, at 2:40 AM, Oliver König wrote:
> On Thursday 07 February 2008 01:36:30 Jennifer Adams wrote:
>>> $ gribmap -i gfs2.ctl
>>
>> What is the output from gribmap if you use the -v option?
>> --
>> Jennifer M. Adams
>
> $ gribmap -iv gfs2.ctl
> grib2map: scanning GRIB2 file: gfs.t12z.sfluxgrbf12.grib2
> grib2map: Writing out the index file
> $ ls -l gfs.t12z.sfluxgrbf12.grib2.idx
> -rw-r--r-- 1 user users 1416 2008-02-07 08:35
> gfs.t12z.sfluxgrbf12.grib2.idx
>
> --
> Oliver König
--
Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Calverton, MD 20705
jma at cola.iges.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20080207/58eb0742/attachment.html
More information about the gradsusr
mailing list