<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'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'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"><<a href="mailto:clotilde.dubois@mercator-ocean.fr" target="_blank">clotilde.dubois@mercator-ocean.fr</a>></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 "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"<br>
load "make_lon_monotonic.ncl"<br>
; ===========================================<br></blockquote><div> </div><div> f = addfile ("<a href="http://sst_equa_ano.nc" target="_blank">sst_equa_ano.nc</a>","r")</div><div>; scale = 1.e6 ; scale factor</div><div>chi = f->tn(:,0,0:359) ; get chi</div><div> </div><div>lon = f->nav_lon(0,0:359)</div><div>print("Is the input lon monotonic? 0 = No")</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("Lon Rearranged Should now be monotonic" )</div><div>print("Is the input lon monotonic? 0=No ")</div><div>print(isMonotonic( lon)) </div><div> </div><div>lon@units = "degrees_east"</div><div>lon!0="lon"</div><div>lon&lon = lon</div><div><br></div><div>chi!0="time"</div><div>chi!1="lon"</div><div><br></div><div><br></div><div>;;;; chi@lon = lon ;;; This is incorrect and strong recommended against. </div><div>chi&lon=lon</div><div><br></div><div>;; chi&lon@units = "degrees_east" Did this already, don't need to do again. </div><div><br></div><div>print(isMonotonic(chi&lon)) </div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div>