<div dir="ltr">Hi Amarjiit,<div>You can loop over each index, evaluating the previous index value and the current index value. As an example:</div><div><br></div><div>; This will have to be modified for your own data, and is just an example that you can build off of.</div><div>; arr is one-dimensional and corresponds to the latitudes ordered from south to north </div><div>; untested, verify that the following is doing what you believe it is doing</div><div><br></div><div>lat = arr&lat ; create a new array that holds the latitudes (if needed)</div><div>do gg = 1,dimsizes(lat)-1</div><div> if (arr(gg-1).lt.0.and.arr(gg).ge.0) then</div><div> print("Identified latitude: "+lat(gg)+", preceding lat value at "+lat(gg-1)+"="+arr(gg-1)+", current lat value at "+lat(gg)+"="+arr(gg))</div><div> final_lat = lat(gg)</div><div> continue ; desired latitude index found, exiting do loop</div><div> end if</div><div>end do</div><div><br></div><div>That should at least get your started. As I stated, you will likely have to alter the above to fit your own situation.</div><div>If you have any further questions let the ncl-talk email list know.</div><div>Adam </div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 10, 2019 at 5:23 PM Amarjiit Vikkas Pandde via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear NCL users,<div><br></div><div>I am trying to calculate first latitude where the graph (attached below) changes from positive to negative north of 50-South and latitude where it changes from negative to positive south of 50-South. the data i plotting is tauu averaged over time and longitude, so it has latitude as its coordinate variable. </div><div><br></div><div>Thank you in advance,</div><div>Amarjiit Pandde.</div><div><br></div></div>
_______________________________________________<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/mailman/listinfo/ncl-talk</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>