All
Perhaps I am just missing the obvious, but I have some code that is converting
netCDF4 files to pyTables Carray with blosc compression (playing around).
I loop over the files in a directory, and I have found that the first file is
written compressed, but the second file onward is NOT. I have checked the
filter settings after each file write, and
they are the same. Any ideas here? If I turn off compression, the file sizes
match.....
Code below....
Lou
array_atom = tables.Float32Atom()
filters = tables.Filters(complevel=0, complib='blosc')
for file in files[0:2]:
print "\n Processing file: %s \n" % file
f = netCDF4.Dataset(file)
fid = tables.openFile(file[:-2]+"h5","w")
t0 = time()
# Copy all arrays
for array_name in f.variables:
data = f.variables[array_name][:]
print array_name, data.shape
field = fid.createCArray(fid.root, array_name, array_atom, data.shape,
filters=filters)
field[:] = data[:]
f.close()
fid.close()
----------------------------------------------------------------------------
| Dr. Louis J. Wicker
| NSSL/FRDD Rm 4368
| National Weather Center
| 120 David L. Boren Boulevard, Norman, OK 73072
|
| E-mail: [email protected]
| HTTP: www.nssl.noaa.gov/~lwicker
| Phone: (405) 325-6340
| Fax: (405) 325-6780
|
| If you start a day without a clear plan about how you’re
| going to spend your attention, you’ll end up wasting most
| of it.—Martha Beck (2002)
|
| Assemby of Japanese bicycle requires great peace of mind.
| Robert Pirsig, ZAMM
|
----------------------------------------------------------------------------
|
| "The contents of this message are mine personally and
| do not reflect any position of the Government or NOAA."
|
----------------------------------------------------------------------------
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense..
http://p.sf.net/sfu/splunk-d2d-c1
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users