Thanks for your reply!
So, if I have a root grid with cells of size 64 pc and 2 levels of AMR, I'd like to gather up all the level 0, 64pc cells and chop them up to make them 16 pc. Then take all the level 1, 32 pc cells and chop them to make them 16 pc.
>> For this, we'd like to grab all the cells on one AMR level, divide them so that they have a fixed cell size and output.
> I'm not entirely sure I understand this process... :(
Then dump to a file of any type :)
Great, that's neater.
>> Is there a quick way of doing this in yt?
>> I *think* the answer will be no, since (for example) covering_grid will grab the best data available to make the mesh, not just the data from a single level. Is that right? We specifically need to avoid interpolation.
>> If so, probably it's easiest just to grab the cells on one level via:
>> gridnum = [g for g in pf.h.grids if g.Level == l]
> You can also do this with pf.h.select_grids( level )
The format isn't really important. I was just looking for an easy way to take grids which have cell size 64 pc and produce grids with cell size 16 pc (or whatever size I want) **just** from those grids (i.e. not by grabbing the lower level grids).
>> then divide them into the right size. Is there a way of passing a grid to covering_grid to make it a particular size? i.e. something like:
>> for g in gridnum:
>> grid_fixedcellsize = g.covering_grid(......)
> Covering grids go up to a given level, specified in the constructor,
> which might accomplish what you're looking for; i.e., you specify a
> left edge, a level (which fixes the dx) and a dimensionality (which
> fixes the right_edge). What you are describing here is similar to
> what's done if you do:
> g.retrieve_ghost_zones( N, [field_list], smoothed = False)
> You can also explore grid_collection, which accepts any list of grids
> and then returns a data object.
> If you describe a bit more exactly the format you want to get out,
> perhaps I can give a better example? I think what you're describing
> is probably doable, I'm just not sure precisely what it will look like
> so I can't quite envision it.
Does that make more sense?
yt-dev mailing list