<div dir="ltr"><div><div><div>Dear NCL,<br><br></div>I calculated correlation and am trying to plot the significance plot. The significance plot , is not plotting correctly, it is giving no significance where there is high correlation and vice versa. It will be great if you could point out where I am going wrong.<br></div>Best Regards<br></div>Ipshita<br clear="all"><div><div><div><div><br>;=============================================<br>; Reading data<br>;=============================================<br><br>a=addfile(&quot;~/Documents/SST/Monthly/<a href="http://sst.mnmean.v4.nc">sst.mnmean.v4.nc</a>&quot;,&quot;r&quot;)<br>JJAS =asciiread(&quot;~/Documents/SST/Monthly/jjas_1871_2012.txt&quot;,(/142,1/),&quot;float&quot;)<br><br>;============================================<br>;Extracting JJAS for 1967 to 2012<br>;============================================<br><br>JJAS_1967_2012=JJAS(96:141,0)<br><br>e=transpose(transpose(JJAS_1967_2012))<br><br>;=============================================<br>;The dataset goes from 1854-2015<br><br>sst=a-&gt;sst<br><br> copy_VarAtts(a,sst)   <br> copy_VarCoords_1(a,sst)<br>;============================================<br><br>;Extracting sea surface temperature<br><br>sst=a-&gt;sst<br><br>;Extracting 1967-2012 for SST<br>sst_1967_2012=sst(1356:1907,:,:)<br><br>copy_VarAtts(sst,sst_1967_2012)   <br>copy_VarCoords_1(a,sst_1967_2012)<br>   <br>;============================================<br>;Extracting 1871 to 2012 SST<br><br>Dec_sst = new((/46,89,180/),float)<br>Dec_sst@_FillValue = -9.9621e+36<br><br><br>;==========================================<br>;Extracting SST for each month<br>;========================================<br><br>do nyr=0,551,12<br><br>Dec_sst(nyr/12,:,:) =sst_1967_2012(nyr+11,:,:)<br>end do<br><br>copy_VarAtts(sst_1967_2012,Dec_sst) <br>copy_VarCoords_1(sst_1967_2012,Dec_sst)<br><br>;=======================================<br>;Reordering<br>;=======================================<br><br>Dec_reorder=Dec_sst(lat|:,lon|:,time|:)<br><br>Dec_reorder@_FillValue = -9.9621e+36<br><br>copy_VarAtts(Dec_sst,Dec_reorder) <br>copy_VarCoords_1(Dec_sst,Dec_reorder)<br><br>;=====================================<br><br>;======================================<br>;Calculating Correlation<br>;======================================<br><br>corr_dec=escorc(Dec_reorder,e)<br>copy_VarCoords_1(Dec_reorder,corr_dec)<br><br>;===========================================<br><br>;Calculating significance<br>prob_dec   = rtest(corr_dec(:,:,0),46,0)<br>copy_VarCoords_1(Dec_reorder,prob_dec)<br>prob_dec@_FillValue = -9.9621e+36<br><br>;==============================================<br><br>; Now plotting the Significance<br>  wks  = gsn_open_wks(&quot;pdf&quot;,&quot;Significance_test&quot;)  <br>  gsn_define_colormap(wks,&quot;testcmap&quot;)              ; choose colormap<br> <br>  res                      = True                ; make plot mods<br>  res@gsnDraw = True<br>  res@gsnFrame = True<br>  res@cnFillOn             = True                ; turn on color<br>  res@gsnSpreadColors      = True                ; use full colormap<br>  res@lbLabelAutoStride    = True         ; automatic lb label stride<br><br>  res@cnLinesOn            = False               ; turn off contour lines<br>  res@cnLevelSelectionMode = &quot;ManualLevels&quot; ; manually set cnlev<br>  res@cnMinLevelValF       = -1            ; min level<br>  res@cnMaxLevelValF       =  1                 ; max level<br>  res@cnLevelSpacingF      = 0.1                 ; contour level spacing<br><br> <br><br>  res@tiMainString         = &quot;Dec SST with JJAS rainfall Regular 1967-2012&quot;<br>  plot= gsn_csm_contour_map_ce(wks,prob_dec,res)<br>   <br> ;===========================================<br><br></div></div></div></div></div>