[yt-users] Trouble with h5py + FLASH

John ZuHone jzuhone at milkyway.gsfc.nasa.gov
Tue Nov 1 23:00:03 PDT 2011


Hi Nathan,

You'd have to double-check with Matt, but as I recall we didn't design the yt interface to support FLASH2 data. Now, I wouldn't be surprised if it does for the most part, since the grid data is written in almost exactly the same format by design to ease people switching over to FLASH3.

The particles, however, are a different story. In FLASH2, the particles are a composite HDF5 data structure of ints and doubles, whereas in FLASH3 they are a 2D array of doubles. In the latter case, simplicity was chosen over design sophistication. I know for a fact that yt only supports particle data in FLASH3. 

I'm looking at this file of yours now... I was not aware that the way compound data types work in HDF5 that you get Python dictionaries when you read them in. That is a lot simpler than what I have to do to read FLASH3 particles. 

In any case, I reproduce the error you get. If you add the lines

del ParticleData
del f

after your "f.close()" call, I no longer get the error. This is what we had to do with the previous issue you mentioned. For some reason the FLASH files are sometimes a bit picky about having all objects allocated from the previous read deleted before accessing the file again. 

Best,

John


More information about the yt-users mailing list