<div dir="ltr"><div><div class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dear NCL experts,</div><div><br></div><div>I am trying to calculate the linear regression coefficient between a single time series and a gridded sst using the regCoef_n in ncl. I am using ncl v.6.4.</div><div><br></div><div>Attached is my script and the text file that I am regressing. Here is the link to the sst data:</div><div><br></div><div>[Link to the data]</div><div><a href="https://drive.google.com/file/d/0B9faET7Bc2o8TjNSWnd1ODREcVU/view?usp=sharing">https://drive.google.com/file/d/0B9faET7Bc2o8TjNSWnd1ODREcVU/view?usp=sharing</a><br></div><div><br></div><div>What I wanted to do:</div><div><br></div><div>1. I want to extract and plot significant coefficients (above 95% confidence level), so I have this line in the script:</div><div><br></div><div><div> df = rc@nptxy-2 ; degrees of freedom </div><div> tval = rc@tval ; t-statistic </div><div> b = tval ; b must be same size as tval (and df) </div><div> b = 0.5 </div><div><b> prob = betainc(df/(df+tval^2),df/2.0,b) </b></div><div><b> rc95 = where(prob.lt.0.95,rc@_FillValue,rc)</b></div></div><div><b><br></b></div><div>I encountered an error after this:</div><div><br></div><div><b>fatal:where: condition variable (parameter 0) dimension mismatch with parameter 2</b><br></div><div><b><br></b></div><div>I understand that the <b>"prob"</b> variable has only one dimension and the "<b>rc"</b> has 2 dimensions (lat & lon). </div><div><br></div><div>Is it possible to assign coordinates to "prob" similar to "rc" other than the copyVarCoords?</div><div><br></div><div><br></div><div>I'll appreciate any suggestions on how to do this correctly.</div><div><br></div><div><br></div><div>Sincerely,</div><div><br></div><div>Lyndz</div></div></div></div></div></div></div></div></div>
</div>