<div dir="ltr"><br><div class="gmail_quote"><br><div dir="ltr"><span style="font-size:12.8px">Hello, </span><div style="font-size:12.8px">I'm having problems in shading areas exceeding 95% confidence level. I want to plot correlation between precipitation and T2m temperature only for land area. So I masked T2m temperature for land and plot the correlation map. I also want to shade the areas exceeding 95% significance level. </div><div style="font-size:12.8px">I could shade the areas exceeding 95% confidence level on land but all the ocean areas are also shaded (missing value area). How can I remove the shading on ocean. I use ncl version 6.3.0. </div><div style="font-size:12.8px">My ncl code and plot are as follows.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thank You.</div><span style="font-size:12.8px">Dinuka</span><span style="font-size:12.8px"> </span><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><div><span style="font-size:12.8px">load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_code.ncl"</span></div><div><span style="font-size:12.8px">load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_csm.ncl"</span></div><div><span style="font-size:12.8px">load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/contributed.<wbr>ncl"</span></div><div><span style="font-size:12.8px">load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/diagnostics_<wbr>cam.ncl"</span></div><div><span style="font-size:12.8px">load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/shea_util.ncl"</span></div><div><span style="font-size:12.8px">;-----------------------------<wbr>------------------------------<wbr>-----</span></div><div><span style="font-size:12.8px">begin</span></div><div><span style="font-size:12.8px">f = "<a href="http://mon.precip.nc" target="_blank">mon.precip.nc</a>"</span></div><div><span style="font-size:12.8px">fin1 = addfile(f, "r")</span></div><div><span style="font-size:12.8px">time3 = fin1->time</span></div><div><span style="font-size:12.8px">;-----------------------------<wbr>------------------------------<wbr>----------</span></div><div><span style="font-size:12.8px">ymd3 = cd_calendar(time3,2)</span></div><div><span style="font-size:12.8px">iTim2 = ind (<a href="http://ymd3.ge.19790101.and.ymd3.lt">ymd3.ge.19790101.and.ymd3.lt</a>.<wbr>20130101)</span></div><div><span style="font-size:12.8px">;-----------------------------<wbr>------------------------------<wbr>---------</span></div><div><span style="font-size:12.8px">preci = fin1->precip(iTim2,{6:10},{79:<wbr>82})</span></div><div><span style="font-size:12.8px">printVarSummary(preci)</span></div><div><span style="font-size:12.8px">pano = rmMonAnnCycTLL(preci)</span></div><div><span style="font-size:12.8px">;-----------------------------<wbr>------------------------------<wbr>-----------</span></div><div><span style="font-size:12.8px">p = month_to_season(pano,"JJA")</span></div><div><span style="font-size:12.8px">printVarSummary(p)</span></div><div><span style="font-size:12.8px">index =dim_avg_Wrap (dim_avg_Wrap (p (time|:,lat|:,lon|:)))</span></div><div><span style="font-size:12.8px">;*****************************<wbr>******************************<wbr>************</span></div><div><span style="font-size:12.8px"> ; T2M over land</span></div><div><span style="font-size:12.8px">;*****************************<wbr>******************************<wbr>***********</span></div><div><span style="font-size:12.8px">ECMWF = "/home/dinu/ecmwf/monthly/"</span></div><div><span style="font-size:12.8px">files = systemfunc ("ls "+ECMWF+"t2/t2.mon.*.nc")</span></div><div><span style="font-size:12.8px">fin = addfiles (files, "r")</span></div><div><span style="font-size:12.8px">time = fin[:]->time</span></div><div><span style="font-size:12.8px">;-----------------------------<wbr>------------------------------<wbr>-----</span></div><div><span style="font-size:12.8px">ymd = cd_calendar(time,2)</span></div><div><span style="font-size:12.8px">iTim = ind (<a href="http://ymd.ge.19790101.and.ymd.lt">ymd.ge.19790101.and.ymd.lt</a>.<wbr>20130101)</span></div><div><span style="font-size:12.8px">;-----------------------------<wbr>------------------------------<wbr>-----</span></div><div><span style="font-size:12.8px">T2 = fin[:]->t2(iTim,:,:)</span></div><div><span style="font-size:12.8px">T2 = T2-273.15</span></div><div><span style="font-size:12.8px">T2@units = "C"</span></div><div><span style="font-size:12.8px">;-----------------------------<wbr>------------------------------<wbr>-</span></div><div><span style="font-size:12.8px">f1 = systemfunc("ls /home/dinu/data/<a href="http://landsea.nc" target="_blank">landsea.nc</a>")</span></div><div><span style="font-size:12.8px">a = addfile(f1, "r")</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">;a = addfile("<a href="http://landsea.nc" target="_blank">landsea.nc</a>","r")</span></div><div><span style="font-size:12.8px">lsdata = a->LSMASK</span></div><div><span style="font-size:12.8px">lsm = landsea_mask(lsdata,T2&lat,T2&<wbr>lon)</span></div><div><span style="font-size:12.8px">t2 = mask(T2,lsm.eq.0,False)</span></div><div><span style="font-size:12.8px">copy_VarCoords(T2,t2)</span></div><div><span style="font-size:12.8px">;-----------------------------<wbr>------------------------------<wbr>--</span></div><div><span style="font-size:12.8px">Temp = month_to_season(t2,"JJA")</span></div><div><span style="font-size:12.8px">;*****************************<wbr>******************************<wbr>***************</span></div><div><span style="font-size:12.8px"> ; Correlation Rainfall and T2M</span></div><div><span style="font-size:12.8px">;*****************************<wbr>******************************<wbr>***************</span></div><div><span style="font-size:12.8px">ccr = escorc(index,Temp(lat|:,lon|:,<wbr>time|:))</span></div><div><span style="font-size:12.8px">copy_VarCoords(t2(0,:,:),ccr)</span></div><div><span style="font-size:12.8px">printVarSummary(ccr)</span></div><div><span style="font-size:12.8px">;-----------------------------<wbr>------------------------------<wbr>-------------</span></div><div><span style="font-size:12.8px">siglvl = 0.05</span></div><div><span style="font-size:12.8px">Prob = rtest(ccr(lat|:,lon|:),34,0)</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Prob!0 = "lat"</span></div><div><span style="font-size:12.8px">Prob!1 = "lon"</span></div><div><span style="font-size:12.8px">Prob&lat = ccr&lat</span></div><div><span style="font-size:12.8px">Prob&lon = ccr&lon</span></div><div><span style="font-size:12.8px">printVarSummary(Prob)</span></div><div><span style="font-size:12.8px">;_____________________________<wbr>______________________________<wbr>_______________</span></div><div><span style="font-size:12.8px">wks =gsn_open_wks("X11","")</span></div><div><span style="font-size:12.8px">gsn_define_colormap(wks,"<wbr>BlueDarkRed18")</span></div><div style="font-size:12.8px"><br></div></div><div><div><span style="font-size:12.8px">res = True</span></div><div><span style="font-size:12.8px">res@cnLinesOn = False</span></div><div><span style="font-size:12.8px">res@cnFillOn = True ; turn color on</span></div><div><span style="font-size:12.8px">res@gsnSpreadColors = True</span></div><div><span style="font-size:12.8px">res@cnLineLabelsOn = False</span></div><div><span style="font-size:12.8px">res@tiMainString = " "</span></div><div><span style="font-size:12.8px">res@cnLevelSelectionMode = "ManualLevels" ; manually set cn levels</span></div><div><span style="font-size:12.8px">res@cnMinLevelValF = -0.4 ; min level</span></div><div><span style="font-size:12.8px">res@cnMaxLevelValF = 0.4 ; max level</span></div><div><span style="font-size:12.8px">res@cnLevelSpacingF = 0.1 ; contour level spacing</span></div><div><span style="font-size:12.8px">;res@cnLabelAutoSrtide = True</span></div><div><span style="font-size:12.8px">res@mpCenterLonF =180</span></div><div><span style="font-size:12.8px">res@gsnDraw = False</span></div><div><span style="font-size:12.8px">res@gsnFrame = False</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">res1 = True</span></div><div><span style="font-size:12.8px">res1@gsnAddCyclic = False</span></div><div><span style="font-size:12.8px">res1@gsnDraw = False</span></div><div><span style="font-size:12.8px">res1@gsnFrame = False</span></div><div><span style="font-size:12.8px">res1@cnLevelSelectionMode = "ManualLevels"</span></div><div><span style="font-size:12.8px">res1@cnMinLevelValF = 0.00</span></div><div><span style="font-size:12.8px">res1@cnMaxLevelValF = 1.05</span></div><div><span style="font-size:12.8px">res1@cnLevelSpacingF = 0.05</span></div><div><span style="font-size:12.8px">res1@cnInfoLabelOn = False</span></div><div><span style="font-size:12.8px">res1@cnLinesOn = False</span></div><div><span style="font-size:12.8px">res1@cnLineLabelsOn = False</span></div><div><span style="font-size:12.8px">res1@cnFillScaleF = 0.6 ; add extra density</span></div><div><span style="font-size:12.8px">;*****************************<wbr>******************************<wbr>*************</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">plot = gsn_csm_contour_map(wks,ccr,<wbr>res)</span></div><div><span style="font-size:12.8px">plot = gsn_csm_contour_map(wks,ccr,<wbr>res)</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">opt = True</span></div><div><span style="font-size:12.8px">opt@gsnShadeFillType = "pattern" ; pattern fill</span></div><div><span style="font-size:12.8px">opt@gsnShadeLow = 17 ; use pattern 17</span></div><div><span style="font-size:12.8px">opt@gsnShadeDotSizeF = 0.3</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">plot1 = gsn_csm_contour(wks,Prob, res1)</span></div><div><span style="font-size:12.8px">plot1 = gsn_contour_shade(plot1,0.05,<wbr>0.75,opt)</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">overlay (plot, plot1)</span></div><div><span style="font-size:12.8px">draw(plot)</span></div><div><span style="font-size:12.8px">frame (wks)</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">end</span></div><div style="font-size:12.8px"><br></div></div><div style="font-size:12.8px"><img src="cid:ii_15c779e7916c2c6b" alt="Inline image 1" width="463" height="280"><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div></div>
</div><br></div>