<div dir="ltr">Andy,<div><br></div><div>This is probably the same grib2 memory leak that was reported and fixed last month.  You can download an NCL development version that includes this bug fix.  Please see this conversation for download instructions and other details:</div><div><br></div><div><a href="http://mailman.ucar.edu/pipermail/ncl-talk/2017-June/009360.html" target="_blank">http://mailman.ucar.edu/<wbr>pipermail/ncl-talk/2017-June/<wbr>009360.html</a></div><div><br></div><div>--Dave<div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 13, 2017 at 4:14 PM, Andy Penny <span dir="ltr">&lt;<a href="mailto:andybpenny@gmail.com" target="_blank">andybpenny@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>Hi all,<br><br></div>I&#39;ve encountered a memory issue when opening grib files in a loop using NCL&#39;s &quot;addfile&quot; function. Memory usage increases over time, even when I delete the file. I&#39;ve copied a sample script below to demonstrate this. Is this normal behavior for the &quot;addfile&quot; function? And if so, does anyone know of a way to avoid this issue? I&#39;m using NCL v6.4, binaries from: ncl_ncarg-6.4.0-RHEL6.4_64bit_<wbr>nodap_gnu447.tar.gz<br></div><div><br></div>Thanks,<br></div>Andy<br><div><div><br>------------------------------<wbr>---------------------------<br>gribfile= &quot;/data2/gfs/2017/20170710/gfs.<wbr>20170710t12z.pgrb2f120.grib2&quot;<br><br>do j = 0, 1000000<br>    do i = 0, 1000000<br><br>a = addfile(gribfile, &quot;r&quot;)<br><br>delete(a)<br><br>  end do<br>end do</div></div></div></blockquote></div></div></div></div>