[yt-users] access coarse raw data in the AMR simulation with yt

Nathan Goldbaum nathan12343 at gmail.com
Mon Nov 3 20:52:10 PST 2014


Hi Junhwan,

You can access the raw grid data by going through the index object:

http://nbviewer.ipython.org/gist/ngoldbaum/aadd07cd3f188c59d272

This includes data that yt normally "masks" because higher resolution data
is available.

I'm not sure if there is a way to query data sources only up to a maximum
level.  There's probably a hacky way to do it by loading in a fake dataset
using load_amr_grids...

-Nathan

On Mon, Nov 3, 2014 at 8:36 PM, Junhwan Choi (최준환) <choi.junhwan at gmail.com>
wrote:

> Hi yt user,
>
> Previously, I asked basic question how I can access raw data using yt.
> At that time, I confirm that the following script print the x, y,
> z,vx, vy, vz, and mass for all finest cells in the spherical region
> =================
> from yt.mods import *
>
> pf = load("../DD%04d/DD%04d" % (snapshot,snapshot))
> center = pf.h.find_max("Density")[1]
> sp = pf.h.sphere(center, (rmax,'pc'))
>
> for icell in range(0,sp["CellMassMsun"].size):
>     print sp["x"][icell], sp["y"][icell], sp["z"][icell]
>     print sp["x-velocity"][icell], sp["y-velocity"][icell],
> sp["z-velocity"][icell]
>     print sp["CellMassMsun"][icell]
> ================
>
> However, is there any way to access the coarse raw data?
> For example, the highest resolution of my simulation is say N_amr=10.
> But, I would like to access the data only up to N_amr=5 (from top grid
> to N_amr=5 grid).
> In this case, the grid information N_amr=6 to 10 is represented by its
> parent grid data.
> Is it possible?
> If so, how can I access these coarse data?
>
>
> Thank you in advance,
> Junhwan
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20141103/87b440c1/attachment.html>


More information about the yt-users mailing list