[yt-users] yt.extensions.EnzoSimulation gorne

Britton Smith brittonsmith at gmail.com
Wed Nov 3 10:22:06 PDT 2010


Hi Elizabeth,

It's not totally clear to me what's failing.  Can you change that line to
just
print data.quantities["TotalQuantity"]("TotalEnergy")[0]
just to see what's coming out of that.

Britton

On Wed, Nov 3, 2010 at 1:10 PM, Elizabeth Tasker <taskere at mcmaster.ca>wrote:

> Actually, it turns out this is still giving me problems. I'm now using yt
> 2.0 and have:
>
>
> from yt.analysis_modules.api import EnzoSimulation
> es = EnzoSimulation("SedovBlastAMR.enzo", initial_time=0.0, final_time=0.1)
>
> ETot = []
>
> for output in es.allOutputs:
> pf = load(output['filename'])
> data = pf.h.all_data()
> ETot.append(data.quantities["TotalQuantity"]("TotalEnergy")[0])
> .
> .
> .
>
> But I get:
>
> IndexError                                Traceback (most recent call last)
>
> /saw_sfs/work/taskere/yt-2/scripts/iyt in <module>()
>    15     # calculate total energy for the simulation volume
>    16     data = pf.h.all_data()
> ---> 17     ETot.append(data.quantities["TotalQuantity"]("TotalEnergy")[0])
>    18
>    19     # calculate the time of output
> .
> .
> .
> IndexError: index (100) out of range (0<=index<99) in dimension 0
> WARNING: Failure executing file: <total_energy.py>
>
>
>
> What did I do wrong?
>
> Elizabeth
>
>
>
>
>
>
> Elizabeth Tasker wrote:
>
>> Hi Jeff,
>>
>> I think it might be enzo 1.7, but inspired by your comment I
>> controversially checked the code and found
>>
>> import yt.extensions.enzo_simulation as ES
>>
>> works.
>>
>> Thanks, Elizabeth
>>
>>
>> j s oishi wrote:
>>
>>> Hi Elizabeth,
>>>
>>> Are you on yt-2.0? If so, then it should be
>>>
>>> from yt.analysis_modules.api import EnzoSimulation as ES
>>>
>>> j
>>>
>>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20101103/4c807ad2/attachment.html>


More information about the yt-users mailing list