<div dir="ltr"><div class="gmail_extra"><div class="gmail_default" style="font-family:verdana,sans-serif">​See my edits to your script below. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Note:  In making the lon monotonic you may have to move you&#39;re pivot point outside of the typical 0-360 or -180-180 range.   The return lons below range 72.5-431.5.  NCL should handle these fine for plotting etc. but if you want to pivot around 30E, then choose 360+30.  </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">p.s. Unless mentioned otherwise try and keep ncl-talk cc&#39;d so other people can assist and people can find the thread if they have a similar problem.​</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><br><div class="gmail_quote">On Wed, Sep 2, 2015 at 1:41 PM, clotilde dubois <span dir="ltr">&lt;<a href="mailto:clotilde.dubois@mercator-ocean.fr" target="_blank">clotilde.dubois@mercator-ocean.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
      ; ===========================================<br>
      load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;<br>
      load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;<br>
      load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot;<br>
      load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl&quot;<br>
      load &quot;make_lon_monotonic.ncl&quot;<br>
      ; ===========================================<br></blockquote><div> </div><div> f     = addfile (&quot;<a href="http://sst_equa_ano.nc" target="_blank">sst_equa_ano.nc</a>&quot;,&quot;r&quot;)</div><div>;  scale = 1.e6                                  ; scale factor</div><div>chi   = f-&gt;tn(:,0,0:359)                                ; get chi</div><div>  </div><div>lon       = f-&gt;nav_lon(0,0:359)</div><div>print(&quot;Is the input lon monotonic?  0 = No&quot;)</div><div>print(isMonotonic(lon))</div><div>print( lon(107:108) )   ;;; This should show you that the lon are not monotonic. They cross the dateline at </div><div><br></div><div>;;;;;;;;;;;    Therefore use my function to make them monotonic. </div><div><br></div><div>lon = make_lon_monotonic(lon)</div><div>print(&quot;Lon Rearranged Should now be monotonic&quot; )</div><div>print(&quot;Is the input lon monotonic? 0=No  &quot;)</div><div>print(isMonotonic( lon))  </div><div> </div><div>lon@units = &quot;degrees_east&quot;</div><div>lon!0=&quot;lon&quot;</div><div>lon&amp;lon = lon</div><div><br></div><div>chi!0=&quot;time&quot;</div><div>chi!1=&quot;lon&quot;</div><div><br></div><div><br></div><div>;;;;  chi@lon = lon   ;;; This is incorrect and strong recommended against. </div><div>chi&amp;lon=lon</div><div><br></div><div>;; chi&amp;lon@units = &quot;degrees_east&quot;  Did this already, don&#39;t need to do again. </div><div><br></div><div>print(isMonotonic(chi&amp;lon)) </div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div>