# A New Spatial Distance Metric for Verification of Precipitation
## 2 Materials and Methods  
### Description of the New Method  
Since the new method is based on smoothing and is primarily intended for precipitation, we named it the Precipitation Smoothing Distance (PSD). This section provides a summary list of all the steps needed to calculate the PSD value. A more detailed description of how the new metric was devised, and the reasoning behind each step, is provided in the Supplementary material. We assume we have a pair of 2D precipitation fields, denoted by \(f_{\text{a}}\) and \(f_{\text{b}}\). The fields are defined on the same spatial domain \(\mathcal{D}\) with coordinates \((x,y)\in\mathcal{D}\). It can be a limited area domain of arbitrary shape or a domain encompassing the whole Earth. The two fields can be a pair of forecast and observation fields, but this is not the only possibility. For example, in an ensemble forecast, the forecasts of various ensemble members can be intercompared to provide a measure of forecast uncertainty. In order to calculate the value of PSD, the following steps should be followed:  
1. _Normalization_ A new set of normalized fields \(f^{\prime}_{\text{a}}\) and \(f^{\prime}_{\text{b}}\) is calculated by \[f^{\prime}_{\text{a}}(x,y)=\frac{f_{\text{a}}(x,y)}{\overline{f_{\text{a}}}}; \qquad f^{\prime}_{\text{b}}(x,y)=\frac{f_{\text{b}}(x,y)}{\overline{f_{\text{b }}}}.\] (1) \(\overline{f_{\text{a}}}\) and \(\overline{f_{\text{b}}}\) are the average values of the fields defined as \[\overline{f_{\text{a}}}=\frac{1}{A_{\mathcal{D}}}\int\limits_{\mathcal{D}}f_{ \text{a}}(x,y)\text{d}A;\qquad\overline{f_{\text{b}}}=\frac{1}{A_{\mathcal{D} }}\int\limits_{\mathcal{D}}f_{\text{b}}(x,y)\text{d}A\] (2) with \(\text{d}A=\text{d}x\times\text{d}y\) being a small area element and \(A_{\mathcal{D}}=\int_{\mathcal{D}}\text{d}A\) being the area size of domain \(\mathcal{D}\). In the special case \(\overline{f_{\text{a}}}=0\) or \(\overline{f_{\text{b}}}=0\) (at least one of the fields does not contain any precipitation) the value of \(PSD\) is undefined and the following steps can be skipped. 2. _Overlap adjustment_ A new set of non-overlapping fields \(f^{\prime\prime}_{\text{a}}\) and \(f^{\prime\prime}_{\text{b}}\) is calculated with \[ \begin{split} f^{\prime\prime}_{\text{a}}(x,y)=& f^{\prime}_{\text{a}}(x,y)-\min[f^{\prime}_{\text{a}}(x,y),f^{ \prime}_{\text{b}}(x,y)],\\ f^{\prime\prime}_{\text{b}}(x,y)=& f^{\prime}_{ \text{b}}(x,y)-\min[f^{\prime}_{\text{a}}(x,y),f^{\prime}_{\text{b}}(x,y)]. \end{split} \] (3) The '\(\min[]\)' denotes the minimum function that takes two parameters as input and returns the smaller of the two. The resulting fields \(f^{\prime\prime}_{\text{a}}\) and \(f^{\prime\prime}_{\text{b}}\) will not have any overlap. That is, at any given location inside the domain, only one of the fields can have a larger-than-zero value. In the special case when the two fields \(f^{\prime\prime}_{\text{a}}\) and \(f^{\prime\prime}_{\text{b}}\) contain only zero values (this happens only when the fields \(f^{\prime}_{\text{a}}\) and \(f^{\prime}_{\text{a}}\) are identical), \(PSD=0\) (i.e., displacement is zero) and the following steps can be skipped. A new parameter \(Q\) is calculated with \[Q=\frac{\int\limits_{\mathcal{D}}f^{\prime\prime}_{\text{a}}(x,y)\text{d}A}{ \int\limits_{\mathcal{D}}f^{\prime}_{\text{a}}(x,y)\text{d}A}.\] (4)  
\(Q\) represents the portion of the non-overlapping precipitation in the two normalized fields and has a range between 0 and 1. If \(Q=0\), then there is a perfect overlap of precipitation in the two normalized fields, while if \(Q=1\), then the regions with precipitation do not overlap at all. In a similar manner \(1-Q\) represents the portion of overlapping precipitation. 3. _Finding the value of \(r_{ PSS=0.5}\)_ The following sub-steps, denoted by (c1)-(c3), should be repeated in an iterative manner until such value of the \(r\) parameter is found that the Precipitation Smoothing Score (\(PSS(r)\)) value equals to 0.5 (such \(r\) value is denoted as \(r_{ PSS=0.5}\)).