[yt-users] new feature in EnzoSimulation class

Britton Smith brittonsmith at gmail.com
Fri Aug 20 14:38:08 PDT 2010


Greetings,

I've just added a new feature to the EnzoSimulation class that a number of
people have been asking for.  If you don't know what EnzoSimulation does,
see here:
http://yt.enzotools.org/doc/extensions/analyzing_an_entire_simulation.html

For people who have been setting Enzo to output every constant number of
cycles, rather than a constant amount of time, the EnzoSimulation class did
not work, as there is no way to know from the parameter file exactly how
many datadumps will get made during the simulation and at what times.  Also,
if you do collapse simulations where you are outputting data every time a
new AMR level is reached, it doesn't work for you either.  To fix that, I've
added a new keyword, get_data_by_force, that if set to True, will search the
working directory for all directories that match the data dir name
convention.  It will then open them all and get times and redshifts by
hand.  It takes slightly longer, but only a second or two compared to
previously less than a second.

So to use this, you simply need to do, for example:
import yt.extensions.enzo_simulation as ES
my_run = ES.EnzoSimulation(parameter_file, get_data_by_force=True,
initial_time=0)

And my_run.allOutputs will have your list of datasets.

Britton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20100820/625a2a49/attachment.htm>


More information about the yt-users mailing list