
Alternatively, you can try ad[‘dx’]. It will give you the sides for each cell, so if you pair it with np.unique(ad[‘dx’]), you can obtain the cell size corresponding to the level of refinement that you are interested in. Just a suggestion. Hope it helps! Cheers, BK Boon Kiat Oh PhD Student Institute for Astronomy University of Edinburgh Royal Observatory Blackford Hill Edinburgh EH9 3HJ On 8 Sep 2019, at 9:51 PM, Nathan <nathan.goldbaum@gmail.com<mailto:nathan.goldbaum@gmail.com>> wrote: Maybe you want the cell_volume field? If it’s a 2D simulation that should be equivalent to the area of the cells. It’ll still have units of a 3D volume because yt treats 2D data as 3D but with a dummy z dimension with unit width for all zones. On Sun, Sep 8, 2019 at 2:44 PM Guido Granda Muñoz <guidogranda@gmail.com<mailto:guidogranda@gmail.com>> wrote: Hello Nathan and Matthew, Thank you for answering, I tried Nathan approach and doing that gives me an array of refinement levels. However, the dimension of this array is the same when I do "index.grid_levels" in the whole computational volume and in the sub-region (or smaller data object). And this dimension is equal to the number of grids I get when I so print_stats() of the whole computational volume. I think this is due to the hierarchy of AMR simulations, in other words, AMR level 5 is inside AMR level 4 and so on. My goal is to obtain the area of each cell in a data object regardless the fact that they have a different level of refinement, so that is why I've been trying to obtain what is the refinement level of every cell in a data object so I can estimate their size and area. Maybe there is another way to do this, do you know how? Cheers, _______________________________________________ yt-users mailing list -- yt-users@python.org<mailto:yt-users@python.org> To unsubscribe send an email to yt-users-leave@python.org<mailto:yt-users-leave@python.org> _______________________________________________ yt-users mailing list -- yt-users@python.org<mailto:yt-users@python.org> To unsubscribe send an email to yt-users-leave@python.org<mailto:yt-users-leave@python.org>