[yt-users] Flush to file

Matthew Turk matthewturk at gmail.com
Fri Sep 14 09:56:55 PDT 2012


On Fri, Sep 14, 2012 at 12:54 PM, David Collins
<dcollins at physics.ucsd.edu> wrote:
>> 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?

It'll get the default.  I think the safest bet for ensuring you
personally define a value everywhere is to define it inside the grids.

-Matt

>
> 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.
> _______________________________________________
> 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