*2.3. Dealing with Irregularly Spaced Observations*

The automatic registration algorithm described above assumes that both signals *u* and *v* are on the same regular grid. However, in practice, one might deal with irregularly spaced observations, such as rain-gauge data.

In such a case, the observations are interpolated on the same regular grid, using kriging (details about the kriging are given in Section 3.2). In the remainder of the article, we will refer to the gauge interpolation as "kriging", while "interpolation" will refer to the bi-linear interpolation used in the automatic registration and morphing. The cost function *J* fro Equation (9) is modified to take the unequal coverage of the domain into account. A mask function *M* is added in the first term of *J*:

$$J(T) \quad = \quad \|M \cdot (v - u \circ (I + T))\| + \mathcal{C}\_1 \|T\| + \mathcal{C}\_2 \|\nabla T\| + \mathcal{C}\_3 \|\nabla \cdot T\| \tag{10}$$

were · is the element-wise matrix multiplication. The mask function is defined such that it is equal to 1 in a given perimeter around the observations and zero everywhere else. So, the difference *v* − *u* ◦ (*I* + *T*) for the grid points far from any observation does not weigh in the cost function *J*.
