[ncl-talk] Problem in plotting t-test figure

Steven Kong kongksk at gmail.com
Tue Oct 20 20:52:57 MDT 2015


hi all,

Current i would like to a plot a t-test output, a significant change of
daily mean surface temperature between 01 Janaury and 02 January. Could any
one help me?

;;;;;;;;;;;;;;;;;;;;;daily mean temperature at 01 January;;;;;;;;;;;;;;

temp1=a->T2(0,:,:)
temp1=0
  do i = 0,23
    temp1 = temp1 + a->T2(i,:,:)
  end do

  mean1 = (temp1)/24

;;;;;;;;;;;;;;;;;;;;;daily mean temperature at 02 January;;;;;;;;;;;;;;

temp2=b->T2(0,:,:)
temp2=0
  do i = 0,23
    temp2 = temp2 + b->T2(i,:,:)
  end do

  mean2 = (temp2)/24

;-------------T-Test: Area with 95% significant
difference----------------------------------------------

r_ave1 = avg(mean1)
r_var1 = variance(mean1)

r_ave2 = avg(mean2)
r_var2 = variance(mean1)

probt = 100.*(1. -ttest(r_ave1,r_var1,24,r_ave2,r_var2,24, True, False)) ;
all areas whose value > 95 are significant
aveX = where(probt.lt.95.,r_ave1 at _FillValue, r_ave1)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151021/49ab1fa6/attachment.html 


More information about the ncl-talk mailing list