Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: performance degrades with filesize

John -- I simplified and ported your test to my netcdf/python module that
doesn't tie into Numeric the way that Konrad Hinsen's does.  I just filled
with a constant value.

When run, I get a flat load time of < 0.01 sec/10 interations.

--Bill Noon
Northeast Regional Climate Center
Cornell University


import nc
from time import clock

cdf = nc.create('garbage.nc',nc.CLOBBER)

dims = [10,50,23,15,125]
for i in range(len(dims)) :
        cdf.def_dim('x%d'%i, dims[i])
cdf.def_dim('time',nc.UNLIMITED)

vardims = [
        ('time','x1','x2'),
        ('time',)
        ]

for i in range(len(vardims)) :
        cdf.def_var('y%d'%i, nc.FLOAT, vardims[i])

cdf.endef()

y0 = cdf.var('y0')
y1 = cdf.var('y1')
time = 0
c = clock()
d = [[1.1,]*23,]*50
for time in range(1000) : 
        y0[time] = d
        y1[time] = 2.2

        if time % 10 == 0 :
                new_c = clock()
                print new_c - c
                c = new_c

 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690