<div dir="ltr"><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">I think this:</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">dzdx = ( (c + 2*f + i) - (a + 2*d + g))/(2*dx)   ; right - left<br></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">----</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">dzdy = ( (a + 2*b + c) - (g + 2*h + i))/(2*dy)   ; top - bottom<br></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">----</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">aspect = <span style="font-variant-ligatures:no-common-ligatures">57.29578*atan2(dzdy,dzdx)   <br></span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">if (aspect.lt.0) then</span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">    aspect = 90 - aspect</span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">end if</span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">---</span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">This link has a formula that uses atan ,,, not atan2</span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><a href="http://www.spatialanalysisonline.com/HTML/index.html?gradient__slope_and_aspect.htm">http://www.spatialanalysisonline.com/HTML/index.html?gradient__slope_and_aspect.htm</a><br></span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">D<br></p></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 13, 2018 at 10:51 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</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"><div>Hi Mike,<br><br></div>Maybe a minus sign in the 2nd argument of atan2? <br><div><br>Given your:<span class=""><br><br><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures">; a b c</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures">; d e f</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures">; g h i<br></span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></p></span><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">dzdx = ( (c + 2*f + i) - (a + 2*d + g))/dx</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">----</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">dzdy = ( (a + 2*b + c) - (g + 2*h + i))/dy</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">or, maybe, not sure of sign convention<br></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">dzdy = ( (g + 2*h + i) - (a + 2*b + c))/dy</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">----<br></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">Your code may need a minus sign before the 2nd argument:<br></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">aspect = <span style="font-variant-ligatures:no-common-ligatures">57.29578*atan2(dzdy,-dzdx)   ; <=== minus sign ???</span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">if (aspect.lt.0) then</span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">    aspect = 90 - aspect</span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">end if</span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">------------------<br></span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br><span style="font-variant-ligatures:no-common-ligatures"><span style="font-variant-ligatures:no-common-ligatures">if (aspect(jj,ii).le.0.) then</span>
</span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463gmail-m_919916421783336330gmail-m_-4762187390746946064Apple-converted-space">       
</span>aspect(jj,ii)=90.-aspect(jj,ii<wbr>)</span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">end if<br></span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">--<br></span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">If you use a minus sign, maybe you do not need other 'if' blocks?<br></span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"></span></p></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Mar 12, 2018 at 3:27 PM, Michael Notaro <span dir="ltr"><<a href="mailto:mnotaro@wisc.edu" target="_blank">mnotaro@wisc.edu</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 class="h5">




<div dir="ltr">
<div id="m_-4744649809809268463m_-8038621355348424374divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p style="margin-top:0;margin-bottom:0">I used the following to compute terrain aspect based</p>
<p style="margin-top:0;margin-bottom:0">on elevation.  But it seems the values are possibly not</p>
<p style="margin-top:0;margin-bottom:0">quite right, since they disagree with another aspect </p>
<p style="margin-top:0;margin-bottom:0">dataset I have.  Does anyone see something wrong below?</p>
<p style="margin-top:0;margin-bottom:0">Michael</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures">ny=dims(0)</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures">nx=dims(1)</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures">aspect=new((/ny,nx/),"float")</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures">aspect@_FillValue=-999.</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures">aspect=-999.</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:19px">
<span style="font-variant-ligatures:no-common-ligatures"></span><br>
</p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures">; a b c</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures">; d e f</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures">; g h i</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:19px">
<span style="font-variant-ligatures:no-common-ligatures"></span><br>
</p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures">do ii=1,nx-2</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space"> 
</span>do jj=1,ny-2</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">   
</span>if (.not.ismissing(elev(jj,ii))) then</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">     
</span>a=elevation(jj+1,ii-1)</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">     
</span>b=elevation(jj+1,ii)</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">     
</span>c=elevation(jj+1,ii+1)</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">     
</span>d=elevation(jj,ii-1)</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">     
</span>e=elevation(jj,ii)</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">     
</span>f=elevation(jj,ii+1)</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">     
</span>g=elevation(jj-1,ii-1)</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">     
</span>h=elevation(jj-1,ii)</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">     
</span>i=elevation(jj-1,ii+1)</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">     
</span>dzdx=((a+2.*d+g)-(c+2.*f+i))/(<wbr>8.*800.) ; 800 m PRISM</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">     
</span>dzdy=((g+2.*h+i)-(a+2.*b+c))/(<wbr>8.*800.)</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">     
</span>aspect(jj,ii)=57.29578*atan2(d<wbr>zdy,dzdx)</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">     
</span>if (aspect(jj,ii).le.0.) then</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">       
</span>aspect(jj,ii)=90.-aspect(jj,ii<wbr>)</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">     
</span>else if (aspect(jj,ii).gt.90.) then</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">       
</span>aspect(jj,ii)=360.-aspect(jj,i<wbr>i)+90.</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">     
</span>else</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">       
</span>aspect(jj,ii)=90.-aspect(jj,ii<wbr>)</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">     
</span>end if</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">     
</span>end if</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space">   
</span>end if</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-4744649809809268463m_-8038621355348424374Apple-converted-space"> 
</span>end do</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-variant-ligatures:no-common-ligatures">end do</span></p><span class="m_-4744649809809268463HOEnZb"><font color="#888888">
<br>
<p></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<div id="m_-4744649809809268463m_-8038621355348424374Signature">
<div id="m_-4744649809809268463m_-8038621355348424374divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:Calibri,Arial,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
Michael Notaro<br>
<div>Associate Director<br>
</div>
<div>Nelson Institute Center for Climatic Research<br>
</div>
<div>University of Wisconsin-Madison<br>
</div>
<div>Phone: <a href="tel:(608)%20261-1503" value="+16082611503" target="_blank">(608) 261-1503</a><br>
</div>
<div>Email: <a href="mailto:mnotaro@wisc.edu" target="_blank">mnotaro@wisc.edu</a><br>
</div>
</div>
</div>
</font></span></div>
</div>

<br></div></div>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>