<div class="gmail_quote">On Mon, Jan 26, 2009 at 5:27 PM, Chris Butenhoff <span dir="ltr">&lt;<a href="mailto:cbutenhoff@yahoo.com">cbutenhoff@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On my attempt to display a variable in Grads v1.9b4 I receive the following<br>
message:<br>
<br>
&gt;&gt;&gt;Memory Allocation Error: &nbsp;grid storage<br>
&gt;&gt;&gt;Data Request Error: &nbsp;Error for variable &#39;lc&#39;<br>
<br>
The open file is about 600 Mb in size and has a lon/lat grid of 40320x16353.<br></blockquote><div><br></div><div>Let&#39;s do the math. The size of the file hardly matters as it may include compression. Grads v1.9b4 holds gridded data in 4 byte floats. &nbsp;So, a <span class="Apple-style-span" style="font-weight: bold;">single</span> variable at your grid resolution would require:</div>
<div><br></div><div><div>40320*16353*4/(1024*1024) ~ 2.5 GB</div><div><br></div><div>So, you could be very close to your memory limit of 3GB. The particular format also matters; there is a known memory leak with some form of netcdf/hdf file.</div>
</div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
My machine has over 3 Gb of RAM so I assume the memory limit must be set in<br>
Grads.<br>
<br>
Searching the archives I find the following info:&nbsp;</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
&gt;&gt;&gt; &quot;The limit of the cache size is (for now) hard-coded in gaio around<br>
&gt;&gt;&gt; line 76:<br>
&gt;&gt;&gt; #define MAXG2CACHE 500100100<br>
&gt;&gt;&gt; You can change this and recompile if you want to limit or expand your<br>
&gt;&gt;&gt; memory usage.&quot;<br>
<br>
Before attempting, does anyone have experience with this problem, and is<br>
this the right fix?<br></blockquote><div><br></div><div>&nbsp;This is a Grib-2 specific issue, certainly not an issue with v1.9b4 which does not support Grib-2.</div></div><br>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><br>