<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">You need to work out/ decide how t and t1 relate to each other. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Is t1 a subset of t?</div><div class="gmail_default" style="font-family:verdana,sans-serif">Is it coarser resolution? </div><div class="gmail_default" style="font-family:verdana,sans-serif">How does t(25,36,10) actually relate to t1 ? </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Rhetorical questions for you to answer yourself. Not sure how one would compare two geographical grids with such different dimensions unless it is a subset. In which case you should subset t to be the same area as t1. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">dof1 and dof2 are created from t & t1 so fixing t & t1 will fix dof1 & dof2 issues. <br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Alan. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 11 May 2015 at 14:29, Vanúcia Schumacher <span dir="ltr"><<a href="mailto:vanucia-schumacher@hotmail.com" target="_blank">vanucia-schumacher@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr"><div style="font-size:21.3333339691162px">NCL users,</div><div style="font-size:21.3333339691162px"><br></div><div style="font-size:21.3333339691162px"><br></div><div style="font-size:21.3333339691162px">I need to calculate the correlation between two variables with different lat and lon. But when I try to calculate the significance test this correlation appears this error:</div><div style="font-size:21.3333339691162px"><br></div><div><div><span style="font-size:21.3333339691162px"><font color="#ac193d">Dimension size, for dimension number 0, of operands does not match, can't continue</font></span></div></div><div style="font-size:21.3333339691162px"><br></div><div style="font-size:21.3333339691162px"><br></div><div style="font-size:21.3333339691162px">I understand that the error is due to DOF1 and dof2 have different sizes of lat and lon, but how could I solve it in this case?</div><div style="font-size:21.3333339691162px"><br></div><div style="font-size:21.3333339691162px">My code:</div><div style="font-size:21.3333339691162px"><br></div><div style="font-size:21.3333339691162px">....</div><div style="font-size:21.3333339691162px"><br></div><div><div><span style="font-size:21.3333339691162px"> r = escorc( t, t1 ) ; correlation</span></div><div><span style="font-size:21.3333339691162px">cor= r(:,:,0,0)</span></div><div><span style="font-size:21.3333339691162px">copy_VarCoords(t,cor)</span></div><div><br></div><div><span style="font-size:21.3333339691162px">; Calculate degrees of freedom for each time series pair</span></div><div><span style="font-size:21.3333339691162px">; This estimates the dof in autocorrelated series. </span></div><div><span style="font-size:21.3333339691162px"> </span></div><div><span style="font-size:21.3333339691162px"> siglvl = 0.05</span></div><div><span style="font-size:21.3333339691162px"> dof1 = equiv_sample_size (t, siglvl,0)</span></div><div><span style="font-size:21.3333339691162px"> dof2 = equiv_sample_size (t1, siglvl,0)</span></div><div><br></div><div><span style="font-size:21.3333339691162px"> ; For each grid point time series pair, choose the lesser abs value</span></div><div><span style="font-size:21.3333339691162px"> </span></div><div><span style="font-size:21.3333339691162px"><font color="#ac193d"> dof = where(abs(dof1).le.abs(dof2), dof1, dof2) error line</font></span></div><div><span style="font-size:21.3333339691162px"><br></span></div><div><span style="font-size:21.3333339691162px"> copy_VarCoords(cor,dof)</span></div><div><br></div><div><span style="font-size:21.3333339691162px"> rsig = rtest( cor, round(dof,3), 0) ; r test NCL</span></div><div><span style="font-size:21.3333339691162px">...</span></div><div><span style="font-size:21.3333339691162px"><br></span></div><div><span style="font-size:21.3333339691162px"><br></span></div><div><div><span style="font-size:21.3333339691162px">Variable: t</span></div><div><span style="font-size:21.3333339691162px">Type: float</span></div><div><span style="font-size:21.3333339691162px">Total Size: 1944000 bytes</span></div><div><span style="font-size:21.3333339691162px"> 486000 values</span></div><div><span style="font-size:21.3333339691162px">Number of Dimensions: 3</span></div><div><span style="font-size:21.3333339691162px">Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[lat | 90] x [lon | 180] x [time | 30]</span></div><div style="font-size:21.3333339691162px"><br></div></div><div><div><span style="font-size:21.3333339691162px">Variable: t1</span></div><div><span style="font-size:21.3333339691162px">Type: float</span></div><div><span style="font-size:21.3333339691162px">Total Size: 7920 bytes</span></div><div><span style="font-size:21.3333339691162px"> 1980 values</span></div><div><span style="font-size:21.3333339691162px">Number of Dimensions: 3</span></div><div><span style="font-size:21.3333339691162px">Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[lat | 6] x [lon | 11] x [time | 30]</span></div><div><span style="font-size:21.3333339691162px">Coordinates: </span></div><div style="font-size:21.3333339691162px"><br></div></div><div><span style="font-size:21.3333339691162px"> Variable: r</span></div><div><span style="font-size:21.3333339691162px">Type: float</span></div><div><span style="font-size:21.3333339691162px">Total Size: 4276800 bytes</span></div><div><span style="font-size:21.3333339691162px"> 1069200 values</span></div><div><span style="font-size:21.3333339691162px">Number of Dimensions: 4</span></div><div><span style="font-size:21.3333339691162px">Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[90] x [180] x [6] x [11]</span></div><div><span style="font-size:21.3333339691162px">Coordinates: </span></div><div><span style="font-size:21.3333339691162px">Number Of Attributes: 1</span></div><div><span style="font-size:21.3333339691162px"><br></span></div><div><div><span style="font-size:21.3333339691162px">Variable: cor</span></div><div><span style="font-size:21.3333339691162px">Type: float</span></div><div><span style="font-size:21.3333339691162px">Total Size: 64800 bytes</span></div><div><span style="font-size:21.3333339691162px"> 16200 values</span></div><div><span style="font-size:21.3333339691162px">Number of Dimensions: 2</span></div><div><span style="font-size:21.3333339691162px">Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[lat | 90] x [lon | 180]</span></div><div style="font-size:21.3333339691162px"><br></div></div><div><br></div><div><div>Variable: dof1</div><div>Type: integer</div><div>Total Size: 64800 bytes</div><div> 16200 values</div><div>Number of Dimensions: 2</div><div>Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[90] x [180]</div><div>Coordinates: </div><div><br></div><div>Variable: dof2</div><div>Type: integer</div><div>Total Size: 264 bytes</div><div> 66 values</div><div>Number of Dimensions: 2</div><div>Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[6] x [11]</div></div><div><br></div><div style="font-size:21.3333339691162px"><br></div></div>                                            </div></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>