*Appendix A.1. Constraints*

This minimization problem include a certain number of constraints. These constraints come from two requirements. First, we require that the nodes stay within the domain *D* (i.e., (*I* + *T*)(*xk*, *yj*) ∈ *D* ∀(*xk*, *yj*) ∈ *Di*. That is, the nodes on the boundary of the domain are allowed to move inside the domain but no nodes are allowed to leave it. These constraints can be seen as inequality constraints or as bounds. Second, the mapping *I* + *T* has to be invertible. Each node (*xk*, *yj*) of the grid *Di* is constrained to the domain between the points (*xk*+1, *yj*), (*xk*, *yj*−1), (*xk*−1, *yj*) and (*xk*, *yj*+1), in order to insure that the inverse mapping (*I* + *T*) <sup>−</sup><sup>1</sup> exists (see Reference [32]). This second requirement translates as inequality constraints.

Since nodes on the boundary are allowed to move inside the domain, some computations will need the value of an image outside the domain *D* (e.g., *u* ◦ (*I* + *T*) <sup>−</sup><sup>1</sup> on *D* or the smoothing of *u* and *v*). To allow these computations, all the images are extended on IR<sup>2</sup> by assuming that there is no precipitation outside the domain, that is, ∀(*x*, *y*) ∈ *D*, *u*(*x*, *y*) = *v*(*x*, *y*) = 0.
