[ncl-talk] a question about changing netcdf file

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Fri Oct 31 13:56:31 MDT 2014


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.

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
in->A_Variable
and x.  Also show "ncdump -sh a.nc" for a completed output file.

--Dave

On Thu, Oct 30, 2014 at 11:51 PM, Zheng Lu <cfluzheng at gmail.com> wrote:

> Hi, dear NCL group,
>
> I would like to change the values in a large netcdf file (4000*6000). For
> example, if I use the following expression:
>
> in=addfile("a.nc","w")
> in->A_Variable(123,1344)=12.3
>
> it takes about only a few seconds,
>
> However if I use
>
> in->A_Variable(123,1344)=12.3*x
>
> , where x is a variable. it takes forever to assign the value to
> A_Variables
>
> Any idea why?
>
> Thanks very much!
>
>
> Zheng
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141031/03411774/attachment.html 


More information about the ncl-talk mailing list