<div dir="ltr">Hi Lile,<div><br></div><div>This is due to a known issue in yt-3.0. Right now ghost zone generation has only been implemented for periodic boundary conditions. In yt-2, all simulations were assumed to have periodic boundary conditions, so it would incorrectly assume that for your dataset and generate ghost zones as if it were periodic.</div>
<div><br></div><div>Instead of silently generating incorrect results, yt-3 now issues the error you're seeing when trying to select data outside of the simulation domain for non-periodic datasets.</div><div><br></div>
<div>Improving support for ghost zones at the simulation boundary for non-periodic datasets is on the roadmap for yt 3.1: <a href="https://trello.com/c/lLlqF0zp">https://trello.com/c/lLlqF0zp</a></div><div><br></div><div>
You should be able to "cheat" and tell yt that your dataset is periodic when it really isn't by doing the following:</div><div><br></div><div>ds = yt.load(filename)</div><div>ds.periodicity = (True, True, True)</div>
<div><br></div><div>Hope that's helpful,</div><div><br></div><div>Nathan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 8, 2014 at 2:58 PM, Lile Wang <span dir="ltr"><<a href="mailto:wll9004@gmail.com" target="_blank">wll9004@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 bgcolor="#FFFFFF" text="#000000">
Hi all,<br>
<br>
I am just worried about the problem associated to the density
gradient field in yt-3.0.<br>
<br>
When I was trying to get the gradient of density field along z
(actually any) direction, I got this error message (last few lines)
when calling data[ 'density_gradient_z' ]:<br>
<blockquote><small><small>~/lilew/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.pyc
in selector(self)<br>
529 if sclass is None:<br>
530 raise
YTDataSelectorNotImplemented(self._type_name)<br>
--> 531 self._selector = sclass(self)<br>
532 return self._selector<br>
533 <br>
<br>
~/lilew/yt-x86_64/src/yt-hg/yt/geometry/selection_routines.so
in yt.geometry.selection_routines.RegionSelector.__init__
(yt/geometry/selection_routines.c:20276)()<br>
<br>
RuntimeError: Error: bad Region in non-periodic domain along
dimension 0. Region left edge = -0.01171875 code_length,
Region right edge = 0.13671875 code_lengthDataset left edge =
0.<br>
0 code_length, Dataset right edge = 1.0 code_length<br>
</small></small></blockquote>
Similar things happen for the pressure gradient.<br>
<br>
The data input was generated by Enzo with AMR. In comparison, it
works well with yt-2.6, where I refer to the gradient by data[
'gradDensityZ' ].<br>
<br>
Any ideas are appreciated. Thanks!<br>
<br>
Cheers,<br>
Lile<br>
<br>
<span style="font-family:courier new,monospace"><br>
-----------------------------------------------------------
<br>
Lile 'Patrick' Wang
<br>
Dept. of Astroph. Sci., Princeton University, NJ 08544 USA<br>
Website : <a href="http://www.astro.princeton.edu/%7Elilew/" target="_blank">http://www.astro.princeton.edu/~lilew/</a><br>
Tel (Mobile): <a href="tel:%2B1-%28734%29-834-3936" value="+17348343936" target="_blank">+1-(734)-834-3936</a>
<br>
Tel (GVoice): <a href="tel:%2B1-%28510%29-926-6831" value="+15109266831" target="_blank">+1-(510)-926-6831</a>
<br>
-----------------------------------------------------------
</span><br>
<br>
</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" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>