<div dir="ltr">Thanks again for the help. Once I implemented that, I have a follow-up problem: Once I have this much larger grid covering, it seems possibly too large for yt/python to handle. When I run:<br><br><font face="monospace, monospace">cg=ds.smoothed_covering_grid(3,[0,0,0], dims*2**3)<br>data=cg['density']</font><div><br></div><div>(where before I had dims*2**1), the variable <font face="monospace, monospace">data</font> does not load and gives <a href="http://pastebin.com/JVhenc4z">a few errors</a> which lead me to believe that python or yt will not let me use that much space. Can I force yt to let me use more space?</div><div><br></div><div>Thanks,</div><div>Carla</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-19 16:11 GMT+01:00 Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Carla,<div><br></div><div>So it looks like ref_factors is only defined in the boxlib frontend, which is why it doesn't work for your Enzo data. Boxlib needs a concept of ref_factors because it allows AMR refinement jumps larger than a factor of two on a single level (i.e. level 2 might be four times higher resolution as level 1). Enzo and many other AMR codes do not allow this, instead only allowing a factor of two increase in linear resolution per AMR level.</div><div><br></div><div>The dimensions you want to use depend on what fraction of the full domain you want to interpolate to uniform resolution. It looks like you want to create a covering grid covering your full domain, so to create a covering grid at the same resolution as AMR level 3 you would do:</div><div><br></div><div><div style="font-size:12.8px"><font face="monospace, monospace">all_data_level_3 = ds.covering_grid(level=2, left_edge=[0,0.0,0.0],</font></div><div style="font-size:12.8px"><font face="monospace, monospace">                                    dims=ds.domain_dimensions * 2**3)</font></div></div><div style="font-size:12.8px"><font face="monospace, monospace"><br></font></div><div style="font-size:12.8px"><font face="arial, helvetica, sans-serif">This is because each refinement level jump in an Enzo simulation corresponds to a factor of two increase in spatial resolution.</font></div><div style="font-size:12.8px"><font face="arial, helvetica, sans-serif"><br></font></div><div style="font-size:12.8px"><font face="arial, helvetica, sans-serif">Hope that makes sense,</font></div><div style="font-size:12.8px"><font face="arial, helvetica, sans-serif"><br></font></div><div style="font-size:12.8px"><font face="arial, helvetica, sans-serif">Nathan</font></div><div><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 19, 2015 at 8:58 AM, Carla Bernhardt <span dir="ltr"><<a href="mailto:carla.j.bernhardt@gmail.com" target="_blank">carla.j.bernhardt@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">Thank you for your quick response. However, when I used:<div>







<p><span><font face="monospace, monospace">ref = int(np.product(ds.ref_factors[0:3])),</font></span></p><p>I got this error:<br><br><font face="monospace, monospace">AttributeError: 'EnzoDataset' object has no attribute 'ref_factors'<br></font><br>Did I misunderstand your suggestion? Or do I need to import something?</p><p>Thanks,</p><p>Carla</p></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-19 15:39 GMT+01:00 Michael Zingale <span dir="ltr"><<a href="mailto:michael.zingale@stonybrook.edu" target="_blank">michael.zingale@stonybrook.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I've done this in the past:<div><br></div><div><div>ref = int(np.product(ds.ref_factors[0:max_level]))                          </div><div>                                                                                </div><div># allocate for our uniformly-gridded result                                 </div><div>dims = ds.domain_dimensions*ref       </div></div><div><br></div><div>this will work for a more general case when the jump between levels can change as a function of level.</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Thu, Nov 19, 2015 at 9:10 AM, Carla Bernhardt <span dir="ltr"><<a href="mailto:carla.j.bernhardt@gmail.com" target="_blank">carla.j.bernhardt@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Dear YT Users,<div><br></div><div>To better understand <font face="monospace, monospace">covering_grid</font> (or <font face="monospace, monospace">smoothed_covering_grid</font>), can someone explain what dimensions I should use when I have multiple levels of refinement? If I have 1 level of refinement from AMR data, the dimensions should be the same, I believe, but what if I have 2 or 3 levels of refinement? Should the fixed resolution region then have dimensions of dims*2^2 and dims*3^2 respectively?</div><div><br></div><div>Here is one example from <a href="http://yt-project.org/doc/examining/low_level_inspection.html#examining-grid-data-in-a-fixed-resolution-array" target="_blank">a tutorial</a> if that helps isolate my question:</div><div><div><font face="monospace, monospace">all_data_level_2 = ds.covering_grid(level=2, left_edge=[0,0.0,0.0],</font></div><div><font face="monospace, monospace">                                      dims=ds.domain_dimensions * 2**2)</font></div></div><div><br></div><div>Thanks in advance,</div><div>Carla</div></div>
<br></div></div>_______________________________________________<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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div>Michael Zingale</div><div>Associate Professor</div><div><br></div><div>Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY 11794-3800</div><div><i>phone</i>:  <a href="tel:631-632-8225" value="+16316328225" target="_blank">631-632-8225</a></div><div><i>e-mail</i>: <a href="mailto:Michael.Zingale@stonybrook.edu" target="_blank">Michael.Zingale@stonybrook.edu</a></div><div><i>web</i>: <a href="http://www.astro.sunysb.edu/mzingale" target="_blank">http://www.astro.sunysb.edu/mzingale</a></div><div>github: <a href="http://github.com/zingale" target="_blank">http://github.com/zingale</a></div><div><br></div></div></div></div>
</font></span></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" rel="noreferrer" 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" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div></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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>