[yt-users] Covering grids, ordering

Matthew Turk matthewturk at gmail.com
Wed Mar 17 09:46:42 PDT 2010


Hi Dave,

I think it'll be transposed -- if you look in DataReadingFuncs.py,
you'll note that we swapaxes on the Enzo data.  This is to make the
grid dimensions match up with what's in the file -- Enzo drops out
[X,Y,Z] in dimensions in the hierarchy, but [Z,Y,X] in the HDF5 files.
 This is just another C/F ordering issue, I think.  For instance, in
one of my .hierarchy files:

Grid = 336
GridRank          = 3
GridDimension     = 14 18 22
-snip-

and in the corresponding .cpu file:

/Grid00000336/Temperature Dataset {16, 12, 8}

(note that ghost zones get stripped off, so -6 on all of those dimensions.)

I think the only way to be sure things match up the way you think they
ought to is to test...  :(

-Matt

On Wed, Mar 17, 2010 at 9:37 AM, david collins <antpuncher at gmail.com> wrote:
> Hi there--
>
> The covering_grid returns arrays that are in Enzo (thus Fortran)
> ordering, correct?  So if I do
>
> open(filename,'wb').write( h.covering_grid(0,left,resolution)[ 'Density'] )
>
> I should wind up with a binary file in the same order as the original enzo data?
>
> d.
>
> --
> Sent from my Stone Tablet and carried by my Pterodactyl.
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list