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

  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: