<div dir="ltr"><div><div>Hello,<br><br>I would like to calculate spearman correlation between a variable in a text file (annual SST time series) with another variable in gridded netcdf file (annual rainfall time series). I want to calculate correlation for every grid in the rainfall data with the same time series of SST in a text file. I try something like below and not successful. Is this possible to do in NCL? Please advice.<br><br><br>; text file with SST time series - one column of data, for example annual SST 1981 to 2010, 30 time step - 30 rows in text file<br>sst = asciiread(&quot;sst&quot;,-1,&quot;float&quot;) <br><br>; gridded netcdf file - annual precipitation over globe for the period 1981-2010. which means every grid will have 30 time step<br>f = addfile(&quot;<a href="http://rf.nc">rf.nc</a>&quot;,&quot;r&quot;)                <br>p = f-&gt;rf(:,{10:30},{60:81})            ; Define precipitation variable<br><br>; Calculate spearman correlation<br>cor =spcorr(p,sst)  <br><br><br></div>Thanks<br></div>Jothi<br></div>