<div dir="ltr">Hi Sam,<div><br></div><div>referring to the Enzo documentation:</div><div><br></div><div><dt style="margin:0px;padding:0px;color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:medium;line-height:22.390625px;text-align:justify">
<tt class="" style="margin:0px;padding:1px;background-color:rgb(238,238,236)"><span class="" style="margin:0px;padding:0px">InitialTime</span></tt> (internal)</dt><dt style="margin:0px;padding:0px;color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:medium;line-height:22.390625px;text-align:justify">
The time, in code units, of the current step. For cosmology the units are in free-fall times at the initial epoch (see <a class="" href="http://enzo.readthedocs.org/en/latest/user_guide/EnzoOutputFormat.html#enzooutputformats" style="margin:0px;padding:0px;color:rgb(206,92,0)"><em style="margin:0px;padding:0px">Enzo Output Formats</em></a>). Default: generally 0, depending on problem</dt>
<dt style="margin:0px;padding:0px;color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:medium;line-height:22.390625px;text-align:justify"><tt class="" style="margin:0px;padding:1px;background-color:rgb(238,238,236)"><span class="" style="margin:0px;padding:0px">Initialdt</span></tt> (internal)</dt>
<dt style="margin:0px;padding:0px;color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:medium;line-height:22.390625px;text-align:justify">The timestep, in code units, for the current step. For cosmology the units are in free-fall times at the initial epoch (see <a class="" href="http://enzo.readthedocs.org/en/latest/user_guide/EnzoOutputFormat.html#enzooutputformats" style="margin:0px;padding:0px;color:rgb(206,92,0)"><em style="margin:0px;padding:0px">Enzo Output Formats</em></a>). Default: generally 0, depending on problem</dt>
<dt style="text-align:start;margin:0px;padding:0px"><br></dt><dt style="text-align:start;margin:0px;padding:0px">my understanding from this is that as Enzo does for the parameter InitialTime, also Initialdt should be saved in the parameters file and represents the TopGrid timestep computed by Enzo at each TopGrid cycle.</dt>
<dt style="text-align:start;margin:0px;padding:0px">So when during a run the console outputs for example:</dt><dt style="text-align:start;margin:0px;padding:0px"><br></dt><dt style="margin:0px;padding:0px;text-align:justify">
<font color="#000000" face="Verdana, Arial, sans-serif" size="3"><span style="line-height:22.390625px">TopGrid dt = 7.815060e-05     time = 0.52042974743667    cycle = 7138 </span></font><br></dt><dt style="margin:0px;padding:0px;text-align:justify">
<font color="#000000" face="Verdana, Arial, sans-serif" size="3"><span style="line-height:22.390625px"><br></span></font></dt><dt style="margin:0px;padding:0px;text-align:justify">the time and cycle are actually saved in the parameter file (if an output is scheduled for that cycle), but dt is not, while I would expect that to be saved to.</dt>
<dt style="margin:0px;padding:0px;text-align:justify">Am I right?</dt><dt style="margin:0px;padding:0px;text-align:justify"><br></dt><dt style="margin:0px;padding:0px;text-align:justify">dt is the thing I need because I would like to do some data analysis that requires the time step (iI need to analyse the evolution of some quantities over a cycle).<br>
</dt><dt style="margin:0px;padding:0px;text-align:justify"><br></dt><dt style="margin:0px;padding:0px;text-align:justify">Thanks,</dt><dt style="margin:0px;padding:0px;text-align:justify">                Roberto</dt><dt style="margin:0px;padding:0px;text-align:justify">
<br></dt></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 3 December 2013 10:43, Sam Skillman <span dir="ltr"><<a href="mailto:samskillman@gmail.com" target="_blank">samskillman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Roberto,<div><br></div><div>InitialTime is the current timestep in the simulation.  It refers to the start time of the current timestep (as opposed to an intermediate time during the adaptive timestepping in Enzo).  Initialdt is not written out to the output parameter files because it is only used for the very first step in the simulation.</div>


<div><br></div><div>A shortcut that currently exists is pf.current_time, which is the same as pf.parameters['InitialTime'].</div><div><br></div><div>I hope that helps,</div><div>Sam</div><div><br></div></div><div class="HOEnZb">
<div class="h5"><div class="gmail_extra">

<br><br><div class="gmail_quote">On Mon, Dec 2, 2013 at 3:36 PM, trobolo dinni <span dir="ltr"><<a href="mailto:trobolo.trobolo.dinni5@gmail.com" target="_blank">trobolo.trobolo.dinni5@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Matt,<div><br></div><div>yes, I don't know why it is not there.</div><div><br></div><div>I tried with the pf.parameters function:</div>


<div><br></div><div><div><i>In [456]: pf.parameters['Initialdt']</i></div>
<div><i>---------------------------------------------------------------------------</i></div><div><i>KeyError                                  Traceback (most recent call last)</i></div><div><i><br></i></div><div><i>/home/cthulhu/Repository/Python/yt scripts/<a href="http://5.primary_damping_analysis.py" target="_blank">5.primary_damping_analysis.py</a> in <module>()</i></div>



<div><i>----> 1 </i></div><div><i>      2 </i></div><div><i>      3 </i></div><div><i>      4 </i></div><div><i>      5 </i></div><div><i><br></i></div><div><i>KeyError: 'Initialdt'</i></div><div><i><br></i></div>



<div><i>In [458]: pf.parameters['InitialTime']</i></div><div><i>Out[458]: 0.52818454582493</i></div><div><br></div><div>but since Initialdt is not there it is not able to find it. </div><div><br></div><div>Can I ask if is there a way to tell Enzo to write out the Initialdt or should be there by default?</div>



<div><br></div><div>Thanks,</div><div>             Roberto</div><div><br></div><div><br></div><div><br></div><div><br></div></div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">

On 3 December 2013 10:13, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Roberto,<br>
<div><div><br>
On Mon, Dec 2, 2013 at 6:10 PM, trobolo dinni<br>
<<a href="mailto:trobolo.trobolo.dinni5@gmail.com" target="_blank">trobolo.trobolo.dinni5@gmail.com</a>> wrote:<br>
> Dear YT users,<br>
><br>
> I would like to ask a simple question to which I was not able to find a<br>
> solution.<br>
><br>
> My Enzo parameters file does not have any Initialdt line saved, also if by<br>
> reading the Enzo documentation at<br>
> <a href="http://enzo.readthedocs.org/en/latest/parameters/initialization.html" target="_blank">http://enzo.readthedocs.org/en/latest/parameters/initialization.html</a> looks<br>
> like the line should be there; and I would like to obtain the current<br>
> timestep from the output using yt.<br>
><br>
> I would like to ask if is there a way to do that or if there is some<br>
> alternative solution.<br>
><br>
> Thanks for the help,<br>
>                                  Roberto<br>
<br>
</div></div>Weird that it's not there!  yt can get the cycle number if it's not.<br>
You can see this and other parameters by looking at pf.parameters .<br>
You can try using the "pprint" module to make it looks nice:<br>
<br>
import pprint<br>
pprint.pprint(pf.parameters)<br>
<br>
-Matt<br>
<br>
><br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<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>
><br>
_______________________________________________<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>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<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>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">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>
<br></blockquote></div><br></div>