[yt-users] Default Units for new Enzo Fields

Alex Hill ashill at haverford.edu
Tue Feb 16 16:42:15 PST 2016


Hi Andrew,

You should be able to use the units_override option in yt.load to force it to assign g cm**-3 to your field, I think. 

-Alex

---------
Alex Hill
Senior Postdoctoral Research Associate
Office: KINSC Link L106
Department of Astronomy, Haverford College
370 Lancaster Ave, Haverford, PA 19041 USA
phone: +1 484 297 2136
email/iMessage: ashill at haverford.edu

> On Feb 16, 2016, at 17:38, Andrew James Emerick <emerick at astro.columbia.edu> wrote:
> 
> Hi all,
> 
> I wasn't sure if this should go in the yt-users list or Enzo-dev, as I'm not sure where the solution lies.
> 
> I've defined some new fields in Enzo that have units of density that yt is reading as having dimensionless units.
> 
> Are the units for fields defined and outputted somewhere in Enzo (to be read by yt)? Or does yt assume units depending on the name of the field? 
> 
> If the former, where do I tell the code that my field has density units when its written to file? I see "DataUnits" throughout the code, but I'm not sure if this is relevant or how to use it.
> 
> If this is a yt-side thing, is there an easy way to just have yt read in my new fields with the correct units without me manually changing them once I've loaded a dataset?
> 
> 
> 
> Andrew
> 
> -- 
> Graduate Student 
> Columbia University
> Department of Astronomy
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160216/68a06322/attachment.html>


More information about the yt-users mailing list