[yt-users] How to fully close a database

Yingchao Lu yingchao.lu at rice.edu
Tue Feb 7 11:13:31 PST 2017


Hi All,

 

I want to do a time query over multiply hdf5 files as following:

 

import yt

from glob import glob

 

fns = glob('flash_hdf5_plf_*')

data = []

 

for fn in fns:

ds = yt.load(fn)

pt = ds.point([0,0,0])

data.append([ds.parameters['time'], pt.mean('tele')])

ds.close()

 

print data

 

At the beginning, it takes about 1s to process each file. But later, it
becomes slower and slower. Finally, 100 files cost 10 minutes, much large
than 1s*100. I guess maybe the database is not fully closed. When I try
ds.field_info() after ds.close(), it still displays the field information.
Does anyone have the same problem?

 

 

Yingchao

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20170207/6379590f/attachment.htm>


More information about the yt-users mailing list