[ncl-talk] Dimension size, for dimension number 0, of operands does not match
Vanúcia Schumacher
vanucia-schumacher at hotmail.com
Mon May 11 12:45:29 MDT 2015
t is a variable of lat and lon (90,180)t1 is an index created in another grid lat and lon
I want to examine how this index is correlated with the variable in the grid variable (t) and not in t1 grid, and make a significance test, if I could use only DOF1, for this case?
From: abrammer at albany.edu
Date: Mon, 11 May 2015 14:36:35 -0400
Subject: Re: [ncl-talk] Dimension size, for dimension number 0, of operands does not match
To: vanucia-schumacher at hotmail.com
CC: ncl-talk at ucar.edu
You need to work out/ decide how t and t1 relate to each other.
Is t1 a subset of t?Is it coarser resolution? How does t(25,36,10) actually relate to t1 ?
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.
dof1 and dof2 are created from t & t1 so fixing t & t1 will fix dof1 & dof2 issues.
Alan.
On 11 May 2015 at 14:29, Vanúcia Schumacher <vanucia-schumacher at hotmail.com> wrote:
NCL users,
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:
Dimension size, for dimension number 0, of operands does not match, can't continue
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?
My code:
....
r = escorc( t, t1 ) ; correlationcor= r(:,:,0,0)copy_VarCoords(t,cor)
; Calculate degrees of freedom for each time series pair; This estimates the dof in autocorrelated series. siglvl = 0.05 dof1 = equiv_sample_size (t, siglvl,0) dof2 = equiv_sample_size (t1, siglvl,0)
; For each grid point time series pair, choose the lesser abs value dof = where(abs(dof1).le.abs(dof2), dof1, dof2) error line
copy_VarCoords(cor,dof)
rsig = rtest( cor, round(dof,3), 0) ; r test NCL...
Variable: tType: floatTotal Size: 1944000 bytes 486000 valuesNumber of Dimensions: 3Dimensions and sizes: [lat | 90] x [lon | 180] x [time | 30]
Variable: t1Type: floatTotal Size: 7920 bytes 1980 valuesNumber of Dimensions: 3Dimensions and sizes: [lat | 6] x [lon | 11] x [time | 30]Coordinates:
Variable: rType: floatTotal Size: 4276800 bytes 1069200 valuesNumber of Dimensions: 4Dimensions and sizes: [90] x [180] x [6] x [11]Coordinates: Number Of Attributes: 1
Variable: corType: floatTotal Size: 64800 bytes 16200 valuesNumber of Dimensions: 2Dimensions and sizes: [lat | 90] x [lon | 180]
Variable: dof1Type: integerTotal Size: 64800 bytes 16200 valuesNumber of Dimensions: 2Dimensions and sizes: [90] x [180]Coordinates:
Variable: dof2Type: integerTotal Size: 264 bytes 66 valuesNumber of Dimensions: 2Dimensions and sizes: [6] x [11]
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150511/925c40b1/attachment.html
More information about the ncl-talk
mailing list