Hi Andrew,On Wed, Aug 29, 2018 at 5:07 AM Andrew Wittenberg - NOAA Federal <andrew.wittenberg@xxxxxxxx> wrote:Running correlations are easy to compute in Ferret. If your signals are A and B, then:! define the running time-averaging transformation,! e.g. 21*12 grid points (21 years, if time step is 1 month)def sym trans "t=@sbx:`21*12`"let a2 = a^2; let b2 = b^2; let prod = a*blet a_b_cov = prod[($trans)] - a[($trans)]*b[($trans)]let a_b_corr = a_b_cov/((a2[($trans)] - a[($trans)]^2)*(b2[($trans)] - b[($trans)]^2))^.5Thanks! That's what I was looking for. The method I had in my mind wasdev = a - a[($trans)]dev2 = dev*devvar = dev2[($trans)]to compute the variance, which is wrong. Your method utilizes the identitymean{ [a - mean(a)]^2}= mean(a^2) - [mean(a)]^2so that the operation mean() is applied only once in each term. That's elegant.Currently, I need a "running skewness", which I think I can calculate applying your method.Cheers,Ryo