<div dir="ltr">Is "x" a large array? If so, then NCL would probably do a separate disk read and a disk write for each element of "x". This would explain the long run time.<div><br></div><div>If x is not an array, then please show a small complete test case that demonstrates the long run time. Also show printVarSummary for both <span style="font-family:arial,sans-serif;font-size:16px">in->A_Variable and x. Also show "ncdump -sh <a href="http://a.nc" target="_blank">a.nc</a>" for a completed output file.</span><br><div><div><br></div><div>--Dave</div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 30, 2014 at 11:51 PM, Zheng Lu <span dir="ltr"><<a href="mailto:cfluzheng@gmail.com" target="_blank">cfluzheng@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, dear NCL group,<div><br></div><div>I would like to change the values in a large netcdf file (4000*6000). For example, if I use the following expression:</div><div><br></div><div>in=addfile("<a href="http://a.nc" target="_blank">a.nc</a>","w")</div><div>in->A_Variable(123,1344)=12.3</div><div><br></div><div>it takes about only a few seconds,</div><div><br></div><div>However if I use </div><div><br></div><div>in->A_Variable(123,1344)=12.3*x <br></div><div><br></div><div>, where x is a variable. it takes forever to assign the value to A_Variables</div><div><br></div><div>Any idea why?</div><div><br></div><div>Thanks very much!</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div><div>Zheng</div><div><br></div><div><br></div></font></span></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>