<div>Jeff, Britton, </div><div><br></div>Thanks for the responses.  It's not clear to me what data it was grabbing before either.  I've gone ahead and pushed the changes for DivV using pf.dimensionality to determine what to include for both 1D and 2D. <div>

<br></div><div>Best,</div><div>Sam<br><div><br><div class="gmail_quote">On Wed, Jul 13, 2011 at 3:50 AM, Britton Smith <span dir="ltr"><<a href="mailto:brittonsmith@gmail.com">brittonsmith@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hey Sam,<br><br>It's not clear to me why it doesn't work without the if statement around the z dimension.  What data would it be getting in that case?<br>

<br>Either way, I think adding the if statement is good, because the calculation does not need to be done.  Perhaps for generality, it's worth putting the y dimension calculation in an if statement as well so that this also works in 1D.<br>

<font color="#888888">
<br>Britton</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Tue, Jul 12, 2011 at 7:05 PM, j s oishi <span dir="ltr"><<a href="mailto:jsoishi@gmail.com" target="_blank">jsoishi@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Sam,<br>
<br>
I looked over the ValidateSpatial briefly, but I'm not sure I<br>
understand it. However,<br>
<div><br>
> I could see us using a fix that does something like:<br>
>     if len(data.pf.dimensions) > 2:<br>
>         ds = div_fac * data['dz'].flat[0]<br>
>         f += data["z-velocity"][1:-1,1:-1,sl_right]/ds<br>
>         f -= data["z-velocity"][1:-1,1:-1,sl_left ]/ds<br>
<br>
</div>seems pretty reasonable to me.<br>
<br>
j<br>
_______________________________________________<br>
Yt-dev mailing list<br>
<a href="mailto:Yt-dev@lists.spacepope.org" target="_blank">Yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
</blockquote></div><br>
</div></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="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br></div></div>