[yt-users] Trouble with h5py + FLASH

Nathan Goldbaum goldbaum at ucolick.org
Tue Nov 1 23:10:00 PDT 2011


Thanks for looking into this, John.  Adding those two lines fixes my problem.

No worries about yt not supporting FLASH2 particle data - as you can see it's not a problem to read it in directly.

I haven't had any problems reading in my FLASH2 AMR data using yt.  I get results that are consistent with my old IDL scripts so I don't think there are any conversion issues.

On Nov 1, 2011, at 11:00 PM, John ZuHone wrote:

> 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
> !DSPAM:10175,4eb0dc6f288832791327606!
> 




More information about the yt-users mailing list