<div dir="ltr"><div class="gmail_default" style="font-size:small">Arun,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">In the future, please include a Subject line when posting to NCL-talk. I added one for you.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">It looks like you may be hitting a NetCDF 2 GB limitation on the size of your file. I believe in your case it&#39;s happening because one of the variables you are trying to write is more than 2 GB into the NetCDF file.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If you enable &quot;large file support&quot; the problem should go away. To do this, add this line:</div><div class="gmail_default" style="font-size:small">







<p>setfileoption(&quot;nc&quot;,&quot;format&quot;,&quot;largefile&quot;)</p><p>before this line:</p></div><div class="gmail_default">







<p style="font-size:small"><span>        fw = </span><span>addfile</span><span>(</span>&quot;<a href="http://gfsout_2015113000.nc" target="_blank">gfsout_2015113000.nc</a>&quot;<span>, </span><span>&quot;c&quot;</span><span>)</span></p><p style="font-size:small">You have some code in your script that is needlessly using up extra memory, and could potentially make your code slower.  For example, I&#39;m not sure why you have these lines, but you shouldn&#39;t need them:</p><p><span style="white-space:pre-wrap">        </span>tc = new((/nlev,ntime,nlat,nlon/),&quot;float&quot;)</p><p>        ua = new((/nlev,ntime,nlat,nlon/),&quot;float&quot;)</p><p>        va = new((/nlev,ntime,nlat,nlon/),&quot;float&quot;)</p><p>        wa = new((/nlev,ntime,nlat,nlon/),&quot;float&quot;)</p><p>        ws = new((/nlev,ntime,nlat,nlon/),&quot;float&quot;)</p><p>        wd = new((/nlev,ntime,nlat,nlon/),&quot;float&quot;)</p><p><span style="white-space:pre-wrap">        </span>T2 = new((/ntime,nlat,nlon/),&quot;float&quot;)</p><p>        rh2 = new((/ntime,nlat,nlon/),&quot;float&quot;)</p></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Also, I believe you could significantly speed up the NetCDF file creation part by predefining your variables.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Please see this page on writing NetCDF files:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style=""><a href="http://www.ncl.ucar.edu/Applications/o-netcdf.shtml">http://www.ncl.ucar.edu/Applications/o-netcdf.shtml</a><br></div><div class="gmail_default" style=""><br></div><div class="gmail_default" style="">On this page are two ways to write NetCDF files: the inefficient but easy way (method #1), and the efficient-but-more-coding-required-way (method #2).</div><div class="gmail_default" style=""><br></div><div class="gmail_default" style="">You are using method #1. I suggest looking at the code for method #2.</div><div class="gmail_default" style=""><br></div><div class="gmail_default" style="">Finally, I noticed that while you have named your dimensions &quot;time&quot;, &quot;level&quot;, &quot;lat&quot; and &quot;lon&quot;, you don&#39;t have any coordinate arrays attached to your variable, and nor are you writing any type of time, level, latitude, or longitude arrays to the file.  Please make sure you are writing your file correctly.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_extra"><div class="gmail_default" style="font-size:small">​If you continue to have questions about NCL, post them to ncl-talk, but with a subject line included.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small">​</div><br><div class="gmail_quote">On Tue, Dec 8, 2015 at 5:53 AM, Arun Kumar Dwivedi <span dir="ltr">&lt;<a href="mailto:dwivedi.arunkumar@gmail.com" target="_blank">dwivedi.arunkumar@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hello Everyone,<div>I am extracting some parameters from  an nc file, do some calculations and writing all the parameters into a nother nc file.</div><div>I have some error.</div><div>Kindly help me.</div><div>The script and the error screenshot is attached herewith.<br clear="all"><div><br></div>Thanks &amp; Regards <span class=""><font color="#888888"><br><div><div dir="ltr"><div dir="ltr">Arun Kumar Dwivedi,<br><br></div></div></div>
</font></span></div></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div></div>