<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Chris,<br>
<br>
This same error was the subject of a discussion on April 13. I've
pasted Jennifer Adams' reply below. It appears to be a subtle
Grads bug (maybe "bug" isn't the right word--perhaps "limitation"
is better?). Jennifer, any updates on where things stand
regarding a patch? Thanks!!<br>
<br>
Paul<br>
<br>
<br>
On Apr 13, 2017, at 7:25 PM, Jennifer M Adams <<a
href="mailto:jadams21@gmu.edu">jadams21@gmu.edu</a>> wrote:<br>
<br>
<div>I figured out what the problem is. For each variable in a
binary file, GrADS calculates an offset — the number of bytes
that you must skip over before you read that particular
variable. The offset is for the first variable in the file is 0.
For each successive variable, it is the offset from the previous
variable plus its nlevs*nlons*nlats. In your data file, nlevs is
very large (127), and the xsize and ysize are also large enough
so that the offset grows very quickly. Unfortunately, it is
stored internally as a 4-byte integer, and after the 31st
variable, it runs out of bits and the offset values become
garbage. I added a debugging print statement which shows the
offset for each variable, note it goes bad for the last 6
variables: </div>
<div><br>
</div>
<div>
<div><font style="font-size: 14px;" face="Courier New"> cref
0</font></div>
<div><font style="font-size: 14px;" face="Courier New"> zh
573160</font></div>
<div><font style="font-size: 14px;" face="Courier New"> th
73364480</font></div>
<div><font style="font-size: 14px;" face="Courier New"> thpert
146155800</font></div>
<div><font style="font-size: 14px;" face="Courier New"> prs
218947120</font></div>
<div><font style="font-size: 14px;" face="Courier New"> prspert
291738440</font></div>
<div><font style="font-size: 14px;" face="Courier New"> qv
364529760</font></div>
<div><font style="font-size: 14px;" face="Courier New"> qc
437321080</font></div>
<div><font style="font-size: 14px;" face="Courier New"> qr
510112400</font></div>
<div><font style="font-size: 14px;" face="Courier New"> qi
582903720</font></div>
<div><font style="font-size: 14px;" face="Courier New"> qs
655695040</font></div>
<div><font style="font-size: 14px;" face="Courier New"> qg
728486360</font></div>
<div><font style="font-size: 14px;" face="Courier New"> qhl
801277680</font></div>
<div><font style="font-size: 14px;" face="Courier New"> ccn
874069000</font></div>
<div><font style="font-size: 14px;" face="Courier New"> ccw
946860320</font></div>
<div><font style="font-size: 14px;" face="Courier New"> crw
1019651640</font></div>
<div><font style="font-size: 14px;" face="Courier New"> cci
1092442960</font></div>
<div><font style="font-size: 14px;" face="Courier New"> csw
1165234280</font></div>
<div><font style="font-size: 14px;" face="Courier New"> chw
1238025600</font></div>
<div><font style="font-size: 14px;" face="Courier New"> chl
1310816920</font></div>
<div><font style="font-size: 14px;" face="Courier New"> vhw
1383608240</font></div>
<div><font style="font-size: 14px;" face="Courier New"> vhl
1456399560</font></div>
<div><font style="font-size: 14px;" face="Courier New"> dbz
1529190880</font></div>
<div><font style="font-size: 14px;" face="Courier New"> uinterp
1601982200</font></div>
<div><font style="font-size: 14px;" face="Courier New"> uturb
1674773520</font></div>
<div><font style="font-size: 14px;" face="Courier New"> udiff
1747564840</font></div>
<div><font style="font-size: 14px;" face="Courier New"> upwp
1820356160</font></div>
<div><font style="font-size: 14px;" face="Courier New"> vinterp
1893147480</font></div>
<div><font style="font-size: 14px;" face="Courier New"> vturb
1965938800</font></div>
<div><font style="font-size: 14px;" face="Courier New"> vdiff
2038730120</font></div>
<div><font style="font-size: 14px;" face="Courier New"> vpwp
2111521440</font></div>
<div><font style="font-size: 14px;" face="Courier New"> winterp
-2110654536</font></div>
<div><font style="font-size: 14px;" face="Courier New"> wturb
-2037863216</font></div>
<div><font style="font-size: 14px;" face="Courier New"> wdiff
-1965071896</font></div>
<div><font style="font-size: 14px;" face="Courier New"> xvort
-1892280576</font></div>
<div><font style="font-size: 14px;" face="Courier New"> yvort
-1819489256</font></div>
<div><font style="font-size: 14px;" face="Courier New"> zvort
-1746697936</font></div>
</div>
<div><br>
</div>
<div>So, I will have to patch this bug and use an 8-byte integer
to store the offset. Until then, your workaround is to write out
fewer Z levels, or separate the variables into two distinct
files. The output from ‘q file’ was very helpful, and so was the
clue about the final six variables showing the error. </div>
<div>—Jennifer</div>
<div><br>
</div>
<br>
<br>
<br>
On 5/31/17, 11:20 AM, Chris Nowotarski wrote:<br>
</div>
<blockquote
cite="mid:CAKQ4GfGq+R8VD8S9-eDrifxVqrLXrX4Mh861_katPGThAiCVeA@mail.gmail.com"
type="cite">
<div dir="ltr">Hello,
<div><br>
</div>
<div>I'm running grads 2.0.2 and I appear to be running into
file size limitations. Is there a maximum file size (or
record number) for binary files that are interpretable by
Grads? I had heard there was previously a 2 GB limit, but
that this limit is alleviated in newer versions of Grads. I
seem to have an issue once files exceed 8 GB. Is there any
way around this besides breaking up files? </div>
<div><br>
</div>
<div>-Chris<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div>Chris Nowotarski<br>
</div>
Assistant Professor<br>
</div>
Department of Atmospheric Sciences<br>
<div>Texas A&M University<br>
</div>
<div>MS 3150<br>
</div>
College Station, TX 77843<br>
979-845-3305</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gradsusr mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>
<a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Paul Markowski
Professor of Meteorology
Department of Meteorology and Atmospheric Science
Pennsylvania State University
520 Walker Building
University Park, PA 16802
email: <a class="moz-txt-link-abbreviated" href="mailto:pmarkowski@psu.edu">pmarkowski@psu.edu</a>
phone: 814.865.9736
web: <a class="moz-txt-link-freetext" href="http://sites.psu.edu/pmarkowski">http://sites.psu.edu/pmarkowski</a>
</pre>
</body>
</html>