Hi Elizabeth,<br><br>It's not totally clear to me what's failing.  Can you change that line to just<br>print data.quantities["TotalQuantity"]("TotalEnergy")[0]<br>just to see what's coming out of that.<br>
<br>Britton<br><br><div class="gmail_quote">On Wed, Nov 3, 2010 at 1:10 PM, Elizabeth Tasker <span dir="ltr"><<a href="mailto:taskere@mcmaster.ca">taskere@mcmaster.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Actually, it turns out this is still giving me problems. I'm now using yt 2.0 and have:<div class="im"><br>
<br>
from yt.analysis_modules.api import EnzoSimulation<br></div>
es = EnzoSimulation("SedovBlastAMR.enzo", initial_time=0.0, final_time=0.1)<br>
<br>
ETot = []<br>
<br>
for output in es.allOutputs:<br>
pf = load(output['filename'])<br>
data = pf.h.all_data()<br>
ETot.append(data.quantities["TotalQuantity"]("TotalEnergy")[0])<br>
.<br>
.<br>
.<br>
<br>
But I get:<br>
<br>
IndexError                                Traceback (most recent call last)<br>
<br>
/saw_sfs/work/taskere/yt-2/scripts/iyt in <module>()<br>
    15     # calculate total energy for the simulation volume<br>
    16     data = pf.h.all_data()<br>
---> 17     ETot.append(data.quantities["TotalQuantity"]("TotalEnergy")[0])<br>
    18<br>
    19     # calculate the time of output<br>
.<br>
.<br>
.<br>
IndexError: index (100) out of range (0<=index<99) in dimension 0<br>
WARNING: Failure executing file: <total_energy.py><br>
<br>
<br>
<br>
What did I do wrong?<br>
<br>
Elizabeth<br><font color="#888888">
<br>
<br>
<br>
<br>
<br>
<br>
Elizabeth Tasker wrote:<br>
</font><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
Hi Jeff,<br>
<br>
I think it might be enzo 1.7, but inspired by your comment I controversially checked the code and found<br>
<br>
import yt.extensions.enzo_simulation as ES<br>
<br>
works.<br>
<br>
Thanks, Elizabeth<br>
<br>
<br>
j s oishi wrote:<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Elizabeth,<br>
<br>
Are you on yt-2.0? If so, then it should be<br>
<br>
from yt.analysis_modules.api import EnzoSimulation as ES<br>
<br>
j<br>
</blockquote></div></blockquote>
<br><div><div></div><div class="h5">
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</div></div></blockquote></div><br>