<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi yt dev,<div><br></div><div>I’ve been working with the Enzo frontend for running yt inline during simulations, and have come across a strange problem that I can’t seem to sort out.  I ported a handful of functions in yt/frontends/enzo/io.py from the IOHandlerPackedHDF5 class to IOHandlerInMemory, and clearly messed something up in the _read_particle_fields function.  In particular, converting the mass from Enzo’s internal units (actually a density) with the line</div><div><br></div><div>data *= g.dds.prod(dtype="f8”)</div><div><br></div><div>(where g.dds.prod() gives the cell volume, a step that can be seen in Enzo’s code mass to actual mass conversion, see:  <a href="https://enzo.readthedocs.org/en/latest/reference/EnzoParticleMass.html#enzoparticlemass">https://enzo.readthedocs.org/en/latest/reference/EnzoParticleMass.html#enzoparticlemass</a>).</div><div><br></div><div>What’s problematic is that this is actually changing the particle mass in Enzo every time yt is called.  I’m testing this on a 128^3, DM only unigrid simulation, and this results in reducing the particle masses by a factor of 1/128^3 each time.  Simply removing this line, on the other hand, results in the particle masses being a factor of 128^3 too large.  I’m concerned that this calculation is actually modifying the Enzo particle masses (which I confirmed by checking the DD* and RD* outputs), I think that this conversion should only happen on the yt side, without pushing back to Enzo at this stage, but I’m not totally clear on how the Enzo/yt communication works.  Does anyone have some suggestions about what would be the best course of action?  Am I simply misunderstanding the intended flow of communications between yt and Enzo when running yt inline, or did my errors in porting this function actually cause something more insidious to happen?</div><div><br></div><div>Thanks,</div><div>Brian</div></body></html>