<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div>Thanks for bringing this to our attention and being very thorough in your analysis.</div><div><br></div>A couple things:<div><br></div><div>You may want to make a pull request for the 2.x fix to the overdensity field. While I don't think we will be doing releases in the 2.x series, the 2.x branch is still open and if people install from the install script, they will get your bugfix.</div><div><br></div><div>It might be worthwhile to raise this on the enzo-dev mailing list, since there will be more expertise on Enzo internals over there.</div><div><br></div><div>I don't think yt's CIC deposited particle properly accounts for grid boundaries. I opened an issue about it here: <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__bitbucket.org_yt-5Fanalysis_yt_issues-3Fq-3Dcloud-2Bin-2Bcell&d=BQMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=hgcBC3x6dKFoTrmFmMYYbKNfiHZlGLKliIidd1LwmHI&m=GcQA_nEeWKoyk7zmJmtP7DSq5LpX45N9ZMtk203R73A&s=l1E7w86oCmYzX43pNb-asD5MXyuWlaLA7R6napYpBGw&e=">https://bitbucket.org/yt_analysis/yt/issues?q=cloud+in+cell</a></div><div><br></div><div>Andrew Myers looked at this a while ago and didn't come to a satisfactory conclusion. I believe the most accurate deposited particle density would use nearest neighbor interpolation.</div><div><br></div><div>Is there any chance you can make a script (maybe two scripts - one for 2.x, one for 3.x) that demonstrates this issue? That will make the issue a bit more concrete.</div><div><br></div><div>I don't do cosmology simulations so I'm not sure which is necessarily the correct thing to do.</div><div><br></div><div>-Nathan</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 12, 2016 at 5:41 PM, Josh Moloney <span dir="ltr"><<a href="mailto:Joshua.Moloney@colorado.edu" target="_blank">Joshua.Moloney@colorado.edu</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">For the past couple of days I've been trying to figure out halo profiles and virial radius calculations in yt, which so far has mostly consisted of trying to understand the differences in the "Overdensity" field between yt versions.<div><br></div><div>The biggest difference is due to yt-2.x using an incorrect redshift scaling for the overdensity calculation. The field is defined as</div><div><br></div><div>Matter_Density / (rho_crit_now * data.pf.hubble_constant**2 * (1 + data.pf.current_redshift)**3)</div><div><br></div><div>which scales the critical density by (1+z)^3 instead of only the matter component.</div><div><br></div><div>This error is fixed in yt 3, but I'm not sure if it's corrected for or known by people still using legacy versions of yt.</div><div><br></div><div>After accounting for this, there is still a ~1.5% difference in the mean overdensity in my simulation between yt 2.x and 3 (the yt 3 value is lower). This difference comes from the particle_density component of the matter_density. The yt 2.x version uses the particle masses from Enzo and yt's CICDeposit_3. The yt 3 version uses the Dark_Matter_Density field from Enzo, which uses Enzo's build in cic method. As far as I understand, differences in cic methods could lead to different values over subdomains of a simulation, but shouldn't lead to different total masses over the entire simulation box.</div><div><br></div><div>I went through each grid of my simulation individually, and in every one of them the sum of the Dark_Matter_Density values is less than the sum of the particle_mass values. Differences range from 0.4% to 3.5% across individual grids. My guess is that this means the Dark_Matter_Density field is losing mass that is deposited in the ghost zones outside of the grid boundaries.</div><div><br></div><div>I'm not familiar enough with the internal workings of Enzo to know if this has any impact on the actual simulations, or if it is only an issue with the data outputs. Either way, it might be a good idea to have yt return to calculating the particle_density field from particle masses and do the cic deposition in yt, at least for Enzo data.</div><span class="HOEnZb"><font color="#888888"><div>    - Josh</div></font></span></div>
<br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.spacepope.org_listinfo.cgi_yt-2Ddev-2Dspacepope.org&d=BQMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=hgcBC3x6dKFoTrmFmMYYbKNfiHZlGLKliIidd1LwmHI&m=GcQA_nEeWKoyk7zmJmtP7DSq5LpX45N9ZMtk203R73A&s=oKQDhhFAF8czO-t3GTdCPDlYt2T1YWj3qee8Wx6sMPI&e=" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br></div>