[yt-users] Trouble with h5py + FLASH
John ZuHone
jzuhone at milkyway.gsfc.nasa.gov
Tue Nov 1 23:12:26 PDT 2011
Hi Nathan,
I would suspect that your grid data is probably fine, yes. I'm pretty sure the relevant data structures are essentially identical.
Happy FLASH-ing!
Best,
John
On Nov 2, 2011, at 2:10 AM, Nathan Goldbaum wrote:
> 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!
>>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
More information about the yt-users
mailing list