## 5 Methodology
### NowDeepN Approach
#### 5.3.1 Data Collection and Cleaning  
We mention that in the data set used in our case study, values for \(R\) and \(V\) products are available for only six elevations (i.e., \(R\)01-\(R\)04 and \(R\)06-\(R\)07, \(V\)01-\(V\)04 and \(V\)06-\(V\)07). The other three elevations delivered by the radar are missing since they are not regularly used in operational services, thus they are not stored in the same format as the rest of the elevations. The data gathered by the radar and exported as shown in Section 5.1 contains a special value that represents \"No Data\". This value is usually represented by \(-999\) but we decided to replace it with 0 as in most cases this value refers to air particles with 0 reflectivity (i.e., no significant water droplets). \"No data\" may also represent air volumes which have returned no signal, for example if a sector with high reflectivity is between the radar and the respective location. In this case, replacing it with 0 is also correct, since the entire region is obturated and the data is not relevant for the learning process [45]. The radar data is also prone to different type of errors, meteorological and technical, which implicitly are to be found in the output data matrix. Meteorological errors (e.g., the underestimation of a particle's reflectivity) are difficult to identify and eliminate, but some errors occurring during the data conversion have been identified for \(V\). For instance, the product \(V\) should only contain values from \(-33\) to 3 but we found _invalid_ values which are outside the range \([-33,33]\), such as \(-100\). From a meteorological point of view, those erroneous values correspond to radar uncertainties in evaluating the direction and/or the speed of the particle, and are not taken into account in  
Figure 2: The 3D data grid at time stamp. operative service since they are punctiform values and are irrelevant to the characteristics of a region. We note that the cleaning process which is further described will be applied for the \(V\) values at each degree of elevation (i.e., \(V01\)-\(V04\) and \(V06\)-\(V07\)). Thus, when we are using \(V\) in the following, we refer to the \(V\) value at a certain degree of elevation. For reducing the noise that the invalid values of \(V\) represent, a _data cleaning_ step is proposed. The underlying idea behind the cleaning step is to replace the invalid values of \(V\) on a certain point \((i,j)\) with the weighted average of the valid \(V\) values from a neighborhood of length 13 surrounding the point. The weight associated to a certain neighbor of the point is inverse proportional to the Euclidian distance between the neighbor and the point, such that the closest neighbors' values have more importance in estimating the value of point. The reason for this cleaning step is that, from a meteorological viewpoint, \(V\) determines the direction and speed of air volumes, thus indicating neighbours that are more relevant for future value of points. The length 13 surrounding the point represents about 5 km in the physical world, a distance which commonly determines small gradients of the meteorological parameters. Let us consider that \((i,j)\) is the point having an erroneous value for \(V\) (e.g., \(-100\)) and this value has to be replaced with an approximation of its real value. We are denoting by \(V(x,y)\) the value of the product \(V\) for the point (\(x\),\(y\)) and by \(\mathcal{N}_{l}(i,j)\) the 2D data subgrid representing the neighborhood of length \(l\) surrounding \((i,j)\). For instance, the neighborhood \(\mathcal{N}_{3}(3,3)\) of length 3 surrounding the point (3, 3) from the data matrix from Figure 3 is depicted in Figure 4.  
For a certain point (\(x\),\(y\)) \(\in\mathcal{N}_{l}(i,j)\), \((x,y)\
eq(i,j)\), we denote by \(sim_{ij}(x,y)=\frac{1}{\sqrt{(x-i)^{2}+(y-j)^{2}}}\) the \"similarity\" between (\(i\),\(j\)) and its neighbor (\(x\),\(y\)). Certainly, the data points closer to (\(i\),\(j\)) have a higher similarity degree and their value is more relevant in the cleaning process.