<div dir="ltr"><div><div>I guess I do not understand the issue.. <br><br>x(nlat,lon) and y(nlat,mlon) and weights, wgt(nlat,mlon).
Assorted pattern correlations are computed via
<pre>wgt = 1.0 <br>ra = <strong>pattern_cor</strong>(x, y, wgt, 0) ; no weighting, centered<br><br><br></pre></div>[1] If (say) you have 100 points all weighted 1.0: sumWGT=100<br><br></div>[2] sum(x*WGT) = sum(x); (nlat,mlon)<br><div><br>[3] xAvgArea = sum(x)/sumWGT ==> overall average for (say) 100 points<br><br></div><div>so no ... "if my weight is 1 it is simply the sum of the array not the area average"<br><br></div><div>It is the overall average ... not the "sum if the array"<br><br>===<br></div><div>Maybe I am misunderstanding the issue.<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 15, 2016 at 4:44 AM, Shilpa Malviya <span dir="ltr"><<a href="mailto:shilpamalviya123@gmail.com" target="_blank">shilpamalviya123@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>When we call pattern_cor function it then calls pattern_cor2 function to compute the pattern correlation. I n case of centered correlation area averaging is done , the code is as below</div><div><br></div><div><div> sumWGT = sum(WGT)</div><div> xAvgArea = sum(x*WGT)/sumWGT ; weighted area average</div><div> yAvgArea = sum(y*WGT)/sumWGT</div><div><br></div><div> xAnom = x - xAvgArea ; anomalies</div><div> yAnom = y - yAvgArea</div><div><br></div><div>if my weight is 1 it is simply the sum of the array not the area average.This may lead to wrong results.</div><div><br></div><div>Is it because of this that when I perform centered averaging I get values of the order of 0.6 and when uncentered then 0.9.</div><div><br></div><div><div><div dir="ltr">Regards,<div>Shilpa Malviya</div></div></div></div>
</div></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>