<div dir="ltr"><div><div><div>Dear NCL<br><br></div>I am trying to get the trend significane plot at 95 percentile. <br></div>I used the script given below, <br></div>Could any one please let me know that is it correct way to do it.<br><div><div><div><br><br> a = addfile("/media/Seagate Backup Plus Drive/work//<a href="http://test.nc" target="_blank">test.nc</a>","r")<br> <br> y = a->TOTEXTTAU<br><br>; create x and calculate the regression coefficients (slopes, trends) <br>;*****************************<wbr>*******************<br><br>; rc = regCoef(y&time, y(lat|:,lon|:,time|:))*1000000<br> ; rc@long_name = "regression coefficient (trend)"<br> ; rc@units = ts@units+"/day" <br> ; copy_VarCoords(y(0,:,:), rc)<br> ; printVarSummary(rc)<br> ; printMinMax(rc,1)<br> <br> y_clim=dim_avg_n_Wrap(y,0)<br><br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;;;;;;;;;;;;;;<br><br> dim_size = dimsizes (y)<br> aot_dtrend = dtrend_n(y,True,0)<br> aot_trend = onedtond(aot_dtrend@slope,(/<wbr>dim_size(1),dim_size(2)/))<br> <br> copy_VarCoords(y_clim,aot_<wbr>trend)<br> aot_trend@_FillValue = y_clim@_FillValue<br><br> printVarSummary(aot_trend)<br><br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;;;;;;;;;;;;;;<br><br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;;;;;;;;;;;;;;;;; Significance<br><br> tval = new((/dim_size(1),dim_size(2)/<wbr>),"float") ; preallocate tval as a float array and<br> df = new((/dim_size(1),dim_size(2)/<wbr>),"integer") ; df as an integer array for use in regcoef <br> line_1 = ispan(0,dim_size(0)-1,1)<br> rc = regcoef(line_1,y(lat|:,lon|:,<wbr>time|:),tval,df) ; regress z against a straight line to<br> <wbr> ; return the tval and degrees of freedom<br><br> df = equiv_sample_size(y(lat|:,lon|<wbr>:,time|:),0.05,0) <br> df = df-2 ; regcoef/equiv_sample_size return N, need N-2<br><br> beta_b = new((/dim_size(1),dim_size(2)/<wbr>),"float") ; preallocate space for beta_b<br> beta_b = 0.5 ; set entire beta_b array to 0.5, the suggested value of beta_b <br> ; according to betainc documentation<br> binc=betainc(df/(df+tval^2), df/2.0, beta_b)<br> aot_trend_signif_percent = (1.-binc)*100. ; significance of trends ; expressed from 0 to 100%<br><br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;;;;;;;;;;;;;;<br><br> aot_trend_sig = where (<a href="http://aot_trend_signif_percent.gt">aot_trend_signif_percent.gt</a>.<wbr>95,aot_trend,aot_trend@_<wbr>FillValue)<br> copy_VarCoords(y_clim,aot_<wbr>trend_sig)<br><br> plot= gsn_csm_contour_map_ce(wks,<wbr>aot_trend_sig,res)<br><br><br></div><div>Thank You<br></div><div><br><div><div><div class="m_8863269555741269778gmail_signature"><div dir="ltr"><div><div>Regards<br></div><div>Kunal Bali<br></div><div dir="ltr"><div><br></div><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>