<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, Don --&nbsp;<div>This one was tricky! Thank you for providing all the info I needed to diagnose the problem.&nbsp;</div><div><br></div><div>First of all, your grib files have 112 bytes of junk at the beginning of the file. One of my favorite debugging tools, the unix command 'od' gives me this:&nbsp;</div><div><div><br></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">&gt; od -c -N 116 nam.t00z.awphys01.grb2.tm00</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">0000000 &nbsp; \r &nbsp;\n &nbsp; - &nbsp; - &nbsp; 4 &nbsp; c &nbsp; 7 &nbsp; c &nbsp; 8 &nbsp; 0 &nbsp; 6 &nbsp; 5 &nbsp; 3 &nbsp; d &nbsp; e &nbsp; 3</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">0000020 &nbsp; \r &nbsp;\n &nbsp; C &nbsp; o &nbsp; n &nbsp; t &nbsp; e &nbsp; n &nbsp; t &nbsp; - &nbsp; t &nbsp; y &nbsp; p &nbsp; e &nbsp; : &nbsp; &nbsp;</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">0000040 &nbsp; &nbsp;t &nbsp; e &nbsp; x &nbsp; t &nbsp; / &nbsp; p &nbsp; l &nbsp; a &nbsp; i &nbsp; n &nbsp; ; &nbsp; &nbsp; &nbsp; c &nbsp; h &nbsp; a &nbsp; r</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">0000060 &nbsp; &nbsp;s &nbsp; e &nbsp; t &nbsp; = &nbsp; i &nbsp; s &nbsp; o &nbsp; - &nbsp; 8 &nbsp; 8 &nbsp; 5 &nbsp; 9 &nbsp; - &nbsp; 1 &nbsp;\r &nbsp;\n</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">0000100 &nbsp; &nbsp;C &nbsp; o &nbsp; n &nbsp; t &nbsp; e &nbsp; n &nbsp; t &nbsp; - &nbsp; r &nbsp; a &nbsp; n &nbsp; g &nbsp; e &nbsp; : &nbsp; &nbsp; &nbsp; b</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">0000120 &nbsp; &nbsp;y &nbsp; t &nbsp; e &nbsp; s &nbsp; &nbsp; &nbsp; 6 &nbsp; 6 &nbsp; 9 &nbsp; 5 &nbsp; 3 &nbsp; 5 &nbsp; - &nbsp; 1 &nbsp; 0 &nbsp; 4 &nbsp; 7</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">0000140 &nbsp; &nbsp;9 &nbsp; 1 &nbsp; 0 &nbsp; / &nbsp; 2 &nbsp; 6 &nbsp; 7 &nbsp; 7 &nbsp; 4 &nbsp; 7 &nbsp; 2 &nbsp; 2 &nbsp;\r &nbsp;\n &nbsp;\r &nbsp;\n</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">0000160 &nbsp; &nbsp;G &nbsp; R &nbsp; I &nbsp; B &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></font></div></div><div><br></div><div>In other words, your GRIB file has the following text prefixed:&nbsp;</div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">--4c7c80653de3</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">Content-type: text/plain; charset=iso-8859-1</span></font></div><div><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">Content-range: bytes 669535-1047910/26774722</span></font></div><div><br></div></div><div>Check your nam1hr.sh script and see if you can figure out how to get rid of that.&nbsp;</div><div><br></div><div>Secondly, as far as GrADS is concerned, the GRIB interface changed between a7 and a8 in order to handle files &gt; 2Gb. This meant we had to stop using a routine in the GRIB2 library (seekgb) because it does not use 8-byte integers for file position offsets. The work normally done by seekgb is coded directly in the GrADS I/O layer for version a8. Unfortunately, one thing that seekgb does that the new code in a8 does not is check for junk bytes before the 4-character string "GRIB" at the beginning of the record. I will fix this for the new release.&nbsp;</div><div><br></div><div>In the meanwhile, try to avoid contaminating your GRIB file with junk. And thanks for the bug report!&nbsp;</div><div>--Jennifer</div><div>&nbsp;</div><div><br></div><div><br></div><div><br><div><div>On Aug 31, 2010, at 1:04 AM, <a href="mailto:Don.VanDyke@noaa.gov">Don.VanDyke@noaa.gov</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hello,<br><br>I am noticing some strange behavior with GrADS 2.0.a8 when I try to write a netCDF file from the following grib2 files at this link. &nbsp;<a href="http://casil.met.fsu.edu/~dvandyke/GrADS-problem/">http://casil.met.fsu.edu/~dvandyke/GrADS-problem/</a> &nbsp;I created those grib2 files with the nam1hr.sh script at that link following the example shown at <a href="http://www.cpc.noaa.gov/products/wesley/fast_downloading_grib.html">http://www.cpc.noaa.gov/products/wesley/fast_downloading_grib.html</a> . &nbsp;Basically, they were created from standard NCEP 12 km NAM grib2 files, but they only have certain variables contained within them in order to save bandwidth. &nbsp;My goal is to write those variables to netCDF files, but my writenc.gs example script at <a href="http://casil.met.fsu.edu/~dvandyke/GrADS-problem/writenc.gs">http://casil.met.fsu.edu/~dvandyke/GrADS-problem/writenc.gs</a> does not work with grads2a8. &nbsp;It produces an error message shown at <a href="http://casil.met.fsu.edu/~dvandyke/GrADS-problem/notes.txt">http://casil.met.fsu.edu/~dvandyke/GrADS-problem/notes.txt</a> . &nbsp;<br><br>The interesting thing is that everything works perfectly using the previous version of GrADS (2.0.a7.1). &nbsp;However, I would like to use the -flt option with the sdfwrite command, and that's only available for 2.0.a8 and higher. &nbsp;Can anybody explain what I'm doing wrong or if this is a bug introduced with grads2a8? &nbsp;Thanks!<br><br>Don Van Dyke<br>NWS Tallahassee, FL &nbsp;<br>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>http://gradsusr.org/mailman/listinfo/gradsusr<br></div></blockquote></div><br><div apple-content-edited="true"> <div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 12px; "><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"></div> </div><br></div></body></html>