Munier -- Yes, I think you're exactly right.  I would look at New_Grid_ReadGrid.C lines 459+ to see what it actually does with the ParticleAttributes during a restart (creation_time is one of the ParticleAttributes).

Greg

On Mar 5, 2013, at 3:49 PM, Munier Azzam Salem <msalem@astro.columbia.edu> wrote:

Okay, this is very interesting:

I printed dd["creation_time"] for the 10th data dump (last before restarting enzo) and the 11th and 12th (just after restarting). The former has all non-zero creation times. The other two have many, many zeroed out creation times. My theory is this IS enzo's fault, and that it's zeroing out the creation time when it loads in data for a restart run.

My ham-fisted method of opening each file and summing all particle masses got around this because I wasn't checking creation time > 0.0. I can get away with this because I do not have live dark matter, but in general this should be fixed (in enzo).


On Tue, Mar 5, 2013 at 3:41 PM, Stephen Skory <s@skory.us> wrote:
> But, I should emphasize that when I open each individual data file, sum the
> particle masses, and plot, the total mass increases monotonically over time,
> and agrees well with the decrease in gas mass. It's only when I analyze via
> the star formation module that I see the jump.

Ah, maybe I'm jumping the gun on blaming Enzo. You can do your own
simple tests for the star particle mass like this outside of the star
particle analysis module:

dd = pf.h.all_data()
ct = dd['creation_time']
sel = (ct > 0)
pm = dd['ParticleMassMsun'][sel]
total_pm = pm.sum()

Can you tell me if total_pm makes sense across your datasets?


--
Stephen Skory
s@skory.us
http://stephenskory.com/
510.621.3687 (google voice)
_______________________________________________
yt-users mailing list
yt-users@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org




--
Munier A. Salem // 845.489.6450
_______________________________________________
yt-users mailing list
yt-users@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org