Abstract. When taking the model error into account in data assimilation, one needs to evaluate the prior distribution represented by the Onsager–Machlup functional. Numerical experiments have clarified how one should put it into discrete form in the maximum a posteriori estimates and in the assignment of probability to each path. In the maximum a posteriori estimates, the divergence of the drift term is essential, but for the path probability assignments in combination with the Euler time-discretization scheme, it is not necessary. The latter property will help simplify the implementation of nonlinear data assimilation for large systems with sampling methods such as the Metropolis-adjusted Langevin algorithm.