[yt-users] Flush to file

David Collins dcollins at physics.ucsd.edu
Fri Sep 14 09:54:15 PDT 2012


> for g in pf.h.grids:
>     f = h5py.File(g.filename)
>     f["/Grid%08i" % g.id].create_dataset("Something", data=g[whatever])
>     f.close()

Perfect.  What will this do to under-subgrid data?  If I've defined a
field using some derived field (not quantity, sorry about that in the
first value) does _flush_to_grids do anything for data that might be
differently defined on fine grids vs. coarse grids?  Or will it get
the default that I supply to flush_to_grids?

d.


>
> Note you may need to apply conversions.  This could be sped up if you
> sort by filename and only open as needed.  If it's defined in a data
> object, you'll need to flush back to the grids using _flush_to_grids
> and supply a default value, as it won't be defined except where there
> are no child zones.  Then in enzo you'll likely need to apply a
> correction from the child grids to get the correct value back.
>
> -Matt
>
> On Fri, Sep 14, 2012 at 12:35 PM, david collins <antpuncher at gmail.com> wrote:
>> Hi, all--
>>
>> Is there a way to write a derived quantity directly to the original data files?
>>
>> d.
>>
>> --
>> Sent from my computer.
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org



-- 
Sent from my computer.



More information about the yt-users mailing list