<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>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: </div><div><br class="webkit-block-placeholder"></div><div><div>39d38</div><div>&lt;       int hdr;</div><div>69,70c68,69</div><div>&lt;             k4=fread(&amp;hdr,4,1,lugb);                //hard-coded 4 instead of sizof(g2int) </div><div>&lt;             if (k4 == 1 &amp;&amp; hdr == 926365495) {      //GRIB message found</div><div>---</div><div>&gt;             k4=fread(&amp;end,sizeof(g2int),1,lugb);</div><div>&gt;             if (k4 == 1 &amp;&amp; end == 926365495) {      //GRIB message found</div><div><br class="webkit-block-placeholder"></div><div>I have patched g2clib-1.0.5 and posted the new src tarball on our ftp server:</div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Geneva" size="3" style="font: 11.0px Geneva"><a href="ftp://grads.iges.org/grads/Supplibs/2.0/src/g2clib-1.0.5.tar.gz">ftp://grads.iges.org/grads/Supplibs/2.0/src/g2clib-1.0.5.tar.gz</a></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Geneva" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br class="webkit-block-placeholder"></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Geneva" size="3"><span class="Apple-style-span" style="font-size: 11px;">If implementing this patch and rebuilding the library and relinking with grads doesn't fix your problem, please let me know.</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Geneva" size="3"><span class="Apple-style-span" style="font-size: 11px;">Jennifer</span></font></div></div><div><br class="webkit-block-placeholder"></div><div><br></div><div><br class="webkit-block-placeholder"></div></div><br><div><div>On Feb 7, 2008, at 2:40 AM, Oliver König wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On Thursday 07 February 2008 01:36:30 Jennifer Adams wrote:</div> <blockquote type="cite"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">$ gribmap -i gfs2.ctl</div> </blockquote><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">What is the output from gribmap if you use the -v option?</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">--</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Jennifer M. Adams</div> </blockquote><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">$ gribmap -iv gfs2.ctl</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">grib2map: scanning GRIB2 file: gfs.t12z.sfluxgrbf12.grib2</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">grib2map: Writing out the index file</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">$ ls -l gfs.t12z.sfluxgrbf12.grib2.idx</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-rw-r--r-- 1 user users 1416 2008-02-07 08:35 gfs.t12z.sfluxgrbf12.grib2.idx</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">--</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Oliver König</div> </blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></span> </div><br></body></html>