*5.2. Validation*

The automatic registration procedure converged, for both the synthetic and the real cases. It has been shown that the error between the two original fields was considerably reduced by applying the mapping *T*, even without bias adjustment (i.e., the warped field *u*warp). An issue encountered in the synthetic case was the grid distortion near the domain boundary (Figure 7). Some inconsistencies can appear when the rainfall events are close to the boundary. This was solved in the real case by adding a padding area, filled with zero precipitation, around the domain. This padding area enables the mapping to have a smooth transition from the largest displacement near the events to (almost) none near the new extended boundary (Figure 9a).

The automatic registration produced reasonable coordinate mapping in these two cases. However, problems can arise if the dissimilarity between the two original fields are too strong. We do not have a method to quantify this problem beforehand. However, there are some minimum conditions, such as having the same number of events in both fields or the proximity of these events. The smoothing steps of the registration algorithm can also be increased or decreased to allow the events to move further or not. In this study, we did not push to the cases to the extreme to determine a feasibility threshold. The goal of this article was to prove the applicability of registration and morphing to precipitation data. A next step would be to apply it to other cases, including different rainfall regimes.

The warping succeeded in correcting the general position error between the fields *u* and *v* in both cases. In the real case, the shape of the event is different in the original fields. One can notice that the shape of the event is slightly altered by the mapping, but the internal structure stayed similar. The peak (rainfall above 20 mm/h) is larger in the field *u* than in the target field *v*, but the event (rainfall above 1 mm/h) has a larger longitudinal spread according to *v* (see Figures 4 and 5). This can explain some of the intensity differences at the station location (Figure 12). The stations 4 to 6 are in the center of the event, the station 4 is especially very close to the peak (stations 1 and 2). The overestimation by the warped field is related to the larger peak in the field *u*. Similarly, the underestimation at station 3 and the overestimation at station 12 is due to their location near the edge of the event. Stations 3 and 12 are located close to the East edge and South edge of the event respectively and so are affected by the spread difference of the event according to *u* and *v*.

The morphing has been evaluated only for the synthetic case. Table 2 shows the added advantages of morphing over warping. The MAE of the warped signal is larger by factor 2 on domain *D*<sup>3</sup> and by a factor of 2.7 on domain *D*<sup>4</sup> compared to the MAE of the morphed signal. This important difference is due to the intensity difference between the lower event in *u* and the one in *v*. However, this advantage decreases when the intensity difference decreases. When the intensity is the same for the two fields, warping is more advantageous. Without difference in intensity, the residual *r* in the morphing formula Equation (7) is unnecessary and only add numeric errors (because of the inverse transform (*I* + *T*)−<sup>1</sup> and the extra linear interpolation). The morphing was not tested for the real case because of the irregular nature of the observations. The uncertainty of the kriged field is high in large part of the domain where no gauges are available. We made assumptions on the spatial mapping through the three criteria for optimality. This allowed us to correct the position through the entire domain. However, we can not make similar assumptions for the intensity.

#### *5.3. Applications*

In this paper, we corrected a satellite-based precipitation estimate based on gauge measurements. This position correction could be particularly useful to pre-process satellite rainfall data for applications needing accurate rain event positioning. Image morphing can take both the position and the intensity into account but we do not recommend to correct both at the same time. The morphed estimate would then be comparable to the kriged gauge field, without any advantage of the more detailed spatial structure of the satellite observations. A two-step approach is preferred, with first the position correction using the warping and then a bias correction such as the additive-multiplicative one used by IMERG-Final. Such position correction could be particularly beneficial as a pre-processing step for hydrological modelling applications. Rainfall data is an important input for hydrological models and can have a large impact on their accuracy [41,42]. The correct positioning of rainfall events can be as crucial as their intensities, especially for the localized events.

The morphing can also be applied to rainfall fields from other sources, such as a numerical model. It can then be used for data assimilation. Two approaches are possible. The position correction can be applied as a first step before the usual data assimilation on the intensity [22,24]. It is also possible to assimilate both intensity and distortion at the same time, represented respectively by the residual *r* and the mapping *T* [32,33]. In the second case one can take full advantage of the morphing formulation. In this paper, we did not perform data assimilation as it was described in References [32,33]. Instead, we used a similar method to theirs to correct the position in a satellite-based estimate using gauge data. There are three main differences between our method and the morphing described in References [32,33]. First, they used two penalty terms to ensure the smoothness of the displacement field (based on its magnitude and gradient), we add a third penalty term based on the divergence. Second, they solved the minimization problem for one grid point at a time (i.e., they have several 1D minimization problems), while we solve it for all the grid points together (i.e., we have one multi-variable minimization problem). Finally, we extend the method to non-gridded observations. Contrary to radar data, the gauge measurements used in our study case are irregularly spaced (i.e., non-gridded). In Reference [33], the framework for assimilating radar rainfall using morphing is described but is not actually applied to real rainfall data.

The main limitation of image morphing is in fact the limitations of the automatic registration. As discussed above, it can fail if the fields are too dissimilar. It is also influenced by the three regulation coefficients *C*1, *C*<sup>2</sup> and *C*3. For example, in the case of a low intensity event, the regulation terms in *Jb* can dominate the cost function, not allowing the rain event to move. In this paper, we explore the feasibility of image morphing for position correction in precipitation estimates. However, we have not pushed to the extreme the cases to quantify its limits. This paper is meant as a proof-of-concept. The next step will be to extend the study to other cases, involving different rainfall regimes. Extreme cases should be included to determine the boundary within which the automatic registration succeeds

#### **6. Conclusions**

We have investigated the use of a morphing approach for the gauge-adjustment of satellite-based rainfall estimates with respect to position error. The morphing method, adapted from Reference [32], has been applied to two cases. Synthetic rainfall events, represented by ellipses, have been used to test the automatic registration and the morphing method. The second case, a convective rainfall event in southern Ghana, showed the potential of the method when applied to real, noisy precipitation data. We applied the position correction such that the gauge data were downscaled while keeping the high spatial variability of the satellite-based product. The rain events estimated by IMERG-Late were spatially shifted to match the gauge data. The morphing method can take both the intensity and the position of the rain events into account. This is an advantage compared to the traditional gauge-adjustment methods that are only looking at the intensity bias.

The automatic registration is able to represent different types of distortions. However, its performance of the registration depends on the degree of difference between the fields *u* and *v* and on the regulation coefficients. The more complex the distortion between the fields is, the more computationally expensive the registration is. For example, in the case of a simple distortion (such as a translation), it is possible to choose a smaller number of steps *I*. The minimization method at each step would also need fewer iterations. On the other hand, if the fields are too dissimilar, the registration can fail. The regulation coefficients also influence both the convergence and the result of the registration.

This paper explores the use of an image morphing method to correct location errors in precipitation estimates. The next step will be to extend the study to other case studies, including different rainfall regimes. It should also be pushed to more extreme cases to determine the method's limitations more precisely. For example, the regulation coefficients have been chosen empirically in this study. A next step will be to develop a more robust way to select them, for example by defining adaptive coefficients.

**Supplementary Materials:** The python scripts for the automatic registration and the morphing are available online at https://github.com/clecoz/precipitation-morphing.git. The scripts permit to reproduce the synthetic case shown in this article.

**Author Contributions:** Conceptualization, C.L.C., A.H., M.V., M.-c.t.V. and N.v.d.G.; methodology, C.L.C., A.H. and M.V.; software, C.L.C.; formal analysis, C.L.C.; writing—original draft preparation, C.L.C.; writing—review and editing, A.H., M.V., M.-c.t.V. and N.v.d.G.; funding acquisition, A.H. and N.v.d.G.

**Funding:** This research is supported by the TU Delft | Global Initiative, a program of the Delft University of Technology to boost Science and Technology for Global Development.

**Acknowledgments:** This research is supported by the TU Delft | Global Initiative, a program of the Delft University of Technology to boost Science andTechnology for Global Development. The work leading to these results has received funding from the European Community's Horizon 2020 Programme (2014–2020) under grant agreement No. 776691 (TWIGA). The opinions expressed in the document are of the authors only and no way reflect the European Commission's opinions. The European Union is not liable for any use that may be made of the information. We acknowledge TAHMO (www.tahmo.org) for providing the in-situ data.

**Conflicts of Interest:** The authors declare no conflict of interest.
