[yt-users] yt-users Digest, Vol 56, Issue 12

Matthew Turk matthewturk at gmail.com
Tue Oct 9 07:01:26 PDT 2012


Hi Chao,

> Hi G.S., thanks for the reply. There's no Dark_Matter_Density field in this
> grid as
> well as all others. But also, there're two elements in the particle
> attributes in
> EnzoGrid_0056 when I used h5ls to inspect. It's wired why yt can't load it.
> And I
> have encountered grid that has no particles in it, in which case yt just
> returned
> an empty array but didn't give any error.
>
> Thanks,
>
> Chao

This does seem like odd behavior which I don't have an immediate
understanding of or solution for, particularly since the problem does
not seem to be in yt, but rather in the h5py code that opens a grid.
What happens if you start your iteration at grid 50 or so, and
continue from there?

Reading the source code itself, this error:

ReadingError: ReadHDF5DataSet: Unable to open
/home/cshi31/research/SG256-RP/extract0062.cpu0000

will only be thrown if there is an error in how the HDF5 files are
opened, specifically if the H5Fopen call fails.  Are you able to open
this using h5py?  This code, run in isolation, should test that:

import h5py
f = h5py.File("/home/cshi31/research/SG256-RP/extract0062.cpu0000")
print f["/Grid00000056/particle_type"][:]

It would also be helpful to check that you can do:

g = pf.h.grids[55] # indexed-by-1 in ids
f = h5py.File(g.filename)
print f["/Grid00000056/"].keys()
print f["/Grid00000056/particle_type"][:]

Thanks,

-Matt

PS It's much easier for us to keep up an email discussion if you
change from digest to regular delivery when you post to the list.
That way, we don't get the full digest, and email threading works both
in email clients and in the archive view.  It will also help people
following along to track the progress of the conversation.



More information about the yt-users mailing list