cov_spatial function

Calculate spatial covariance.