On the equivalence between Kalman smoothing and weak-constraint four-dimensional variational data assimilation.