16 REAL Q((M+1)*((I+1)*M+2))
21 ks=l*(2*m+(i-1)*(l-1))+2*n
22 qvar(n)=0.5*q(ks+1)**2
28 DO l=max(1,n-m),min(n,m)
29 ks=l*(2*m+(i-1)*(l-1))+2*n
30 qvar(n)=qvar(n)+q(ks+1)**2+q(ks+2)**2
subroutine spvar(I, M, Q, QVAR)
Computes the variances by total wavenumber of a scalar field in spectral space.