[yt-users] derived field with Grackle?
Brian O'Shea
bwoshea at gmail.com
Mon Oct 20 17:58:26 PDT 2014
Hi Matt,
> I am attempting to create a derived field from a cosmological simulation
> > dataset using Grackle. Specifically, I have a simulation that was run
> with
> > Grackle, but which unfortunately did not output the cooling time. Ergo,
> I'd
> > like to create that as a derived field. Does anybody have an example of
> a
> > Grackle-based derived field in yt that I can use as a model? I would
> note
> > that I looked at the "run_from_yt.py" example in the Grackle distro, but
> it
> > isn't quite what I need.
>
> You'll probably need to use bits of that, and actually call Grackle on
> your data object. If you can set up Grackle outside of the derived
> field you can minimize the overhead cost. But, calling grackle just
> like it would be otherwise, but inside the derived field definition,
> is going to be the way to go I think.
>
As a very high-level answer, that makes sense. Implementation seems to be
a bit harder - I've been trying to reconcile the way that grackle is called
from its python wrapper with the way that yt generates derived fields. In
grid_to_grackle(), you feed in individual grids and each grid's fields
(including other derived fields) are accessed by stepping through a grid in
slabs, with a great deal of information about the grid itself being
required. When I look at derived fields in yt, everything works by calling
data[], possibly using adjacent slabs/cells in various ways, but never
referring to individual grids. Could you point me toward an example of a
derived field where grids are manipulated more directly? I don't really
have any idea about how to actually *do* what you've suggested, at least
given the grackle python interface as it stands in grackle 2.
Thank you!
--Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20141020/223e9d8b/attachment.htm>
-------------- next part --------------
_______________________________________________
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