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

Junhwan Choi (최준환) choi.junhwan at gmail.com
Mon Nov 3 20:36:53 PST 2014


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



More information about the yt-users mailing list