<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div>Dear NCL usrs,<br><br></div>In my script I want to ignore AOD values which are greater than 1.0, any idea where to put it?<br><div><div><br>=================<br>load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_code.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_csm.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/contributed.<wbr>ncl&quot;<br><br>begin<br><br>;*****************************<wbr>*******************<br>; Specify geographical region and time span (year-month start and end<br>;*****************************<wbr>*******************<br><br>  latS     = -90               <br>  latN     =  90<br>  lonL     =  0<br>  lonR     = 360<br><br>  ymStrt   = 197101     <br>  ymLast   = 201012<br>  <br>  pltType  = &quot;ps&quot;  <br>  pltName  = &quot;regress&quot;<br>  pltTitle = &quot;Globe: &quot;+(ymStrt/100)+&quot;-&quot;+(ymLast/<wbr>100)<br><br>;*****************************<wbr>*******************<br>; Read from netCDF file: variable is type short...unpack<br>;*****************************<wbr>*******************<br>   diri   = &quot;/media/Work/3_LTS_echam6_<wbr>Data/EACSST_ens_1971-2010/&quot;<br>   fili   = &quot;EACSST_E1_1971-2010_AOD.<wbr>nc&quot;<br>   f      = addfile(diri+fili,&quot;r&quot;) <br><br>   YYYYMM = cd_calendar( f-&gt;time, -1)<br><br>   iStrt  = ind(YYYYMM.eq.ymStrt)<br>   iLast  = ind(YYYYMM.eq.ymLast)<br><br>   <b>x      = short2flt( f-&gt;tau_aod(iStrt:iLast,{latS:<wbr>latN},{lonL:lonR}))</b><br>    <br>   </div><div>  x@units= &quot;mm/day&quot;<br><br>   printVarSummary(x)            <wbr>                ; [time| 1344]x[lat| 91]x[lon| 180]<br><br>   yyyymm = cd_calendar(x&amp;time, -1)<br>   yyyy   = yyyymm/100<br><br>   dimx = dimsizes(x)<br>   ntim = dimx(0)                ; all years and months<br>   nlat = dimx(1)<br>   mlon = dimx(2)<br><br>   year  = ispan(yyyy(0), yyyy(ntim-1), 1)<br>   nyrs  = dimsizes(year)<br><br>;*****************************<wbr>*******************<br>; Areal averages: cos(lat) is good enough<br>;*****************************<wbr>*******************<br><br>   xann  = month_to_annual(x , 1)                 ; [year| 112]x[lat| 91]x[lon| 180]<br>   xann&amp;year  = year<br>   printVarSummary(xann)<br><br>;*****************************<wbr>*******************<br>; Calculate the regression coefficients (slopes)    <br>;*****************************<wbr>*******************<br>   rc           = regCoef(year,xann(lat|:,lon|:,<wbr>year|:))            <br>   <br>   rc@long_name = &quot;Trend&quot;<br>   rc@units     = xann@units+&quot;/year&quot;<br>   copy_VarCoords(xann(0,:,:), rc)                ; copy lat,lon coords<br><br>   printVarSummary(rc)<br><br>;*****************************<wbr>*******************<br>; for illustration: change units to degC/period-used<br>;*****************************<wbr>*******************<br>   rc           = rc*nyrs                       ; (C/year)*(nyrs)<br>   rc@units     = &quot;&quot;+nyrs+&quot; year&quot;<br><br>;*****************************<wbr>*******************<br>; plotting parameters <br>;*****************************<wbr>*******************<br>   wks  = gsn_open_wks(&quot;eps&quot;,&quot;EACSST_<wbr>trend_yearly_precip&quot;)       ; specifies a ps plot<br>   gsn_define_colormap(wks,&quot;<wbr>precip2_15lev&quot;)<br>   res                       = True     <br>   res@gsnMaximize           = True             ; make large<br><br>   res@cnFillOn              = True             ; turn on color<br>   res@cnLinesOn             = False            ; turn off contour lines<br>   res@cnLineLabelsOn        = False            ; turn off contour line labels<br> ;;res@cnFillMode            = &quot;RasterFill&quot;<br><br>   res@mpMinLatF             =  5                  ;-- sub-region minimum latitude<br>   res@mpMaxLatF             =  40                 ;-- sub-region maximum latitude<br>   res@mpMinLonF             =  60                  ;-- sub-region minimum longitude<br>   res@mpMaxLonF             =  100                  ;-- sub-region maximum longitude<br><br><br>   res@cnLevelSelectionMode  = &quot;ManualLevels&quot;   ; set manual contour levels<br>   res@cnMinLevelValF        =  -0.18            ; set min contour level<br>   res@cnMaxLevelValF        =  0.18            ; set max contour level<br>   res@cnLevelSpacingF       =  0.01            ; set contour interval<br><br>   res@mpFillOn              = False            ; turn off default background gray<br>  ;res@mpCenterLonF          = 180<br><br>   res@gsnCenterString       = year(0)+&quot;-&quot;+year(nyrs-1) <br>   <br>   res@tiMainString          = &quot;Yearly trend (precip EACSST)&quot;    ; fili<br>   plot = gsn_csm_contour_map_ce(wks,rc,<wbr>res)    <br>  end<br>=================<br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div><div>--</div>Regards,<div>Nitin Patil</div></div></div></div></div></div></div></div></div></div>
</div></div></div>
</div><br></div>