<div dir="ltr"><img class="mailtrack-img" alt="" style="display:flex" src="https://mailtrack.io/trace/mail/c7d074a9884829988a52a3f640753f29c7d150a5.png?u=2827700" width="0" height="0"><div><div><div><div>Dear NCL users,<br><br></div><div>I am trying to draw the significance values at 95% on the correlation map but not able to succeed yet.<br><br></div><div>First I calculate and plot the correlation using <br><br> ts1 = var_a(lat|:,lon|:,time|:)<br> ts2 = var_b(lat|:,lon|:,time|:)<br> printVarSummary(ts1)<br> printVarSummary(ts2)<br> <br>;************************************************<br>; calculate cross correlations<br>;************************************************<br>; maxlag = 0 ; set lag<br>; note, the max lag should not be more than N/4<br> <br>; ccr = esccr(ts1,ts2(lat|:,lon|:,time|:), maxlag) ; calc cross correlations<br><span style="color:rgb(255,0,0)"><b> ccr = escorc(ts1,ts2) </b></span><br> printVarSummary(ccr)<br> printMinMax(ccr,0)<br> <br>; copy meta data and coordinate variables using contributed functions<br> copy_VarAtts(ts2, ccr) <br> copy_VarCoords_1(ts1,ccr)<br> <br><br> <span style="color:rgb(0,0,255)"><b>plot</b></span> = gsn_csm_contour_map(wks,ccr,res) <br><br><br></div><div><b>Then, I tried to calculate significance and draw over <span style="color:rgb(0,0,255)">plot</span> using</b><br><br><br>;**********************************************<br>;Calculating significance<br>;**********************************************<br><br><span style="color:rgb(153,0,255)"><b> prob_Dec=rtest(ccr,11,0)<br> sig_Dec =100*(1-prob_Dec)</b></span><br><br>printVarSummary(sig_Dec) <br> <br>rescn2 = res<br>rescn2@cnMinLevelValF = 95<br>rescn2@cnMaxLevelValF = 100<br>rescn2@cnLevelSpacingF = 5.<br>rescn2@cnFillMode = "RasterFill" <br>plotB=gsn_csm_contour(wks,sig_Dec,rescn2) ; contours are at 95,100<br><br>opt = True<br>opt@gsnShadeFillType = "pattern" ; pattern fill<br>opt@gsnShadeHigh = 2 ; use pattern #2<br><span style="color:rgb(0,0,255)"><b>plotB</b></span>=gsn_contour_shade(plotB,-999.,95.,opt) <br><br> overlay(<span style="color:rgb(0,0,255)"><b>plot,plotB</b></span>)<br> draw(plot)<br> frame(wks)<br><br>end<br></div><br></div><div>After running the script, the summary and warning displayed as <br><br><span style="color:rgb(204,0,0)">Variable: ts1<br>Type: float<br>Total Size: 141504 bytes<br> 35376 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [lat | 67] x [lon | 48] x [time | 11]<br>Coordinates: <br> lat: [ 5.. 38]<br> lon: [68.125..97.5]<br> time: [3134040..8392920]<br>Number Of Attributes: 8<br> vmin : -1e+15<br> vmax : 1e+15<br> fmissing_value : 1e+15<br> missing_value : 1e+15<br> _FillValue : 1e+15<br> units : kg m-2 s-1<br> <br><br>Variable: ts2<br>Type: float<br>Total Size: 141504 bytes<br> 35376 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [lat | 67] x [lon | 48] x [time | 11]<br>Coordinates: <br> lat: [ 5..38]<br> lon: [68.125..97.5]<br> time: [928806..1016454]<br>Number Of Attributes: 5<br> missing_value : -32767<br> _FillValue : -32767<br> units : K<br><br><br>Variable: ccr<br>Type: float<br>Total Size: 12864 bytes<br> 3216 values<br>Number of Dimensions: 2<br>Dimensions and sizes: [67] x [48]<br>Coordinates: <br>Number Of Attributes: 1<br> _FillValue : 1e+15<br>(0) min=-0.855062 max=0.561651<br><br>Variable: sig_Dec<br>Type: float<br>Total Size: 12864 bytes<br> 3216 values<br>Number of Dimensions: 2<br>Dimensions and sizes: [67] x [48]<br>Coordinates: <br>warning:mpMinLonF is not a valid resource in sign_Dec_contour at this time<br>warning:mpMaxLonF is not a valid resource in sign_Dec_contour at this time<br>warning:mpMinLatF is not a valid resource in sign_Dec_contour at this time<br>warning:mpMaxLatF is not a valid resource in sign_Dec_contour at this time<br>warning:mpShapeMode is not a valid resource in sign_Dec_contour at this time<br>warning:mpGridLineThicknessF is not a valid resource in sign_Dec_contour at this time<br>warning:mpGridSpacingF is not a valid resource in sign_Dec_contour at this time</span><br><br></div><div><br><br><br></div>In case full script, I have attached it.<br><br></div>please provide some thoughts on that if you have time.<br><br></div>Thank You<br clear="all"><div><div><div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>---<br></div><div><font size="2"><span>Kunal Bali<br></span></font></div><br><div><br></div><div><p style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div class="mt-signature">
<a href="https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality1&" class="mt-signature-logo" style="text-decoration:none"> <img src="https://s3.amazonaws.com/mailtrack-signature/sent_with_mailtrack.png" alt="Mailtrack" class="" width="16" height="14"> </a> <font style="color:#777">Sent with <a href="https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality1&" class="mt-install">Mailtrack</a> </font>
</div></div>