access coarse raw data in the AMR simulation with yt
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
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 (최준환)
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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
On Mon, Nov 3, 2014 at 8:52 PM, Nathan Goldbaum
Hi Junhwan,
You can access the raw grid data by going through the index object:
http://nbviewer.ipython.org/gist/ngoldbaum/aadd07cd3f188c59d272
Sorry, meant to send this link, which shows a bit more of the grid API at the end: http://nbviewer.ipython.org/gist/ngoldbaum/0735a8b6611b01ab9b2f
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 (최준환)
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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (2)
-
Junhwan Choi (최준환)
-
Nathan Goldbaum