<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 "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_code.ncl"<br>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_csm.ncl"<br>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/contributed.<wbr>ncl"<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 = "ps" <br> pltName = "regress"<br> pltTitle = "Globe: "+(ymStrt/100)+"-"+(ymLast/<wbr>100)<br><br>;*****************************<wbr>*******************<br>; Read from netCDF file: variable is type short...unpack<br>;*****************************<wbr>*******************<br> diri = "/media/Work/3_LTS_echam6_<wbr>Data/EACSST_ens_1971-2010/"<br> fili = "EACSST_E1_1971-2010_AOD.<wbr>nc"<br> f = addfile(diri+fili,"r") <br><br> YYYYMM = cd_calendar( f->time, -1)<br><br> iStrt = ind(YYYYMM.eq.ymStrt)<br> iLast = ind(YYYYMM.eq.ymLast)<br><br> <b>x = short2flt( f->tau_aod(iStrt:iLast,{latS:<wbr>latN},{lonL:lonR}))</b><br> <br> </div><div> x@units= "mm/day"<br><br> printVarSummary(x) <wbr> ; [time| 1344]x[lat| 91]x[lon| 180]<br><br> yyyymm = cd_calendar(x&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&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 = "Trend"<br> rc@units = xann@units+"/year"<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 = ""+nyrs+" year"<br><br>;*****************************<wbr>*******************<br>; plotting parameters <br>;*****************************<wbr>*******************<br> wks = gsn_open_wks("eps","EACSST_<wbr>trend_yearly_precip") ; specifies a ps plot<br> gsn_define_colormap(wks,"<wbr>precip2_15lev")<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 = "RasterFill"<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 = "ManualLevels" ; 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)+"-"+year(nyrs-1) <br> <br> res@tiMainString = "Yearly trend (precip EACSST)" ; 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>