The ECMWF implementation of three dimensional variational assimilation. Part II: Structure functions