<div dir="ltr">Hi, <div><br></div><div>I am having problems with the ttest function, the error is:</div><div>







<p>fatal:ttest: If s1 is not a scalar, then it must have the same number of dimensions as ave1, var1, ave2, and var2</p><p>I don&#39;t understand very much this error, I would like to ask you what I am missing here.</p><p>This is a piece of the code:</p></div>        ua_ncep = u_ncep-&gt;uwnd(1:42,1,:,:) ;select 925 level<br>        ;Averages<br>        ave_ua_ncep=dim_avg(ua_ncep(lat|:,lon|:,time|:))<br>        ;Variances<br>        Var_ua_ncep = dim_variance (ua_ncep(lat|:,lon|:,time|:))         ; calculate variances<br>        ;Defining sizes<br>        sX   = dimsizes (ave_ua_ncep)   <br>        ;Model<br>        ua_model = uFiles[i]-&gt;ua(1:42,1,:,:)  ;plevel 1=925 plevel 9=200 <br>        ;Time averages<br>        ave_ua_model=dim_avg(ua_model(lat|:,lon|:,time|:))<br>        ;Variances<br>        Var_ua_model = dim_variance (ua_model(lat|:,lon|:,time|:))    ; calculate   var.<br>        sY=dimsizes(ave_ua_model)<br>        iflag=False<br>        ;Significance levels: <div>   prob = ttest(ave_ua_ncep,Var_ua_ncep^2,sX, ave_ua_model,Var_ua_model^2,sY, iflag, False) ;using STD <div><p>I also wanted to ask you, in this case, would it be necessary to use <font color="#000000"><span style="font-weight:bold;font-size:13px;font-family:verdana,sans-serif;line-height:16px"> </span><span style="font-size:13px;margin:0px;padding:0px;text-decoration:none;font-family:verdana,sans-serif;line-height:16px"><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/wgt_areaave.shtml" style="font-size:13px;margin:0px;padding:0px;text-decoration:none;font-family:verdana,sans-serif;line-height:16px">wgt_areaave</a>?</span></font> </p><p>Many thanks in advance,</p><p><br></p><p>Cheers,</p><p><br></p><p>Noelia</p><p><br></p><p><br></p></div></div></div>