[gradsusr] data set correlation
mcs2214 at columbia.edu
mcs2214 at columbia.edu
Fri Jul 8 15:03:13 EDT 2011
Hi Gradusers,
I am trying to get a temporal correlation of two data sets that also
vary in x and y. Just to give you some context, I am comparing model
data to observed data over a 52 year span. I wrote a script that
calculates point by point temporal correlation by use of the tcorr
function, but it is unusable for me as it is very inefficent! Was
wondering if anyone had a correlation script/ suggestions for me?
here is the script:
***function to plot a temporal correlation with a spatial loop
function correlation(arg)
startx=subwrd(arg,1)
endx=subwrd(arg,2)
starty=subwrd(arg,3)
endy=subwrd(arg,4)
startt=subwrd(arg,5)
endt=subwrd(arg,6)
say 'longitude = ' startx ' to ' endx
say 'latitude = ' starty ' to ' endy
say 'years = ' startt ' to ' endt
x=startx
while (x<= endx)
'set x ' x
y=starty
while (y <= endy)
'set y ' y
'set t ' startt
'd tcorr(prcp.1,prcp.2,t=' startt ',t=' endt ')'
y=y+1
endwhile
x=x+1
endwhile
exit
More information about the gradsusr
mailing list