Hi G.S.,

This is pretty far outside of how fields are designed to work in yt.  The access of data in yt isn't currently designed to work with more than one pf.  I don't actually see a way to do this without combining the data so that it can be seen as a single pf.  If parallel wasn't an issue and this were only a unigrid run, you might be able to read in all the data at once from both pfs and do some of this by hand.  If this is AMR, then I think this may not be possible at all, considering the hierarchy is unlikely to be exactly the same between two different datasets.


On Mon, Jul 18, 2011 at 5:27 PM, <gso@physics.ucsd.edu> wrote:

I was wondering if it is possible to specify two different sources of
input to create a derived field.  Currently with a single source, I have a
derived field defined as:

def _HII_HFraction(field, data):
  return data["HII_Density"]/(data["HI_Density"]+data["HII_Density"])

add_field("HII_HFraction", function=_HII_HFraction,

And I can access the total quantity in parallel


dd = pf.h.all_data()


But I'm dealing with


pf1 has the HI_Density field data and pf2 has the HII_Density field data.
Is there a way to create a derived field and use TotalQuantity to operate
on the data in parallel?


PS. I guess my alternative is to glue the two HDF5 files into one, but
want to avoid it if possible.

yt-users mailing list