{'fraction_non_alphanumeric': 0.02911082940963419, 'fraction_numerical': 0.01168055052517204, 'mean_word_length': 4.939499865555256, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Automatic quality control of telemetric rain gauge data for operational applications at IMGW-PIB

The automatic procedure of real-time quality control (QC) of telemetric rain gauge measurements (G) has been developed to produce quantitative precipitation estimates mainly for the needs of operational hydrology. The developed QC procedure consists of several tests: gross error detection, a range check, a spatial consistency check, a temporal consistency check, and a radar and satellite conformity check. The output of the procedure applied in real-time is quality index QI(G) that quantitatively characterised quality of each individual measurement. The QC procedure has been implemented into operational work at the Institute of Meteorology and Water Management since 2016. However, some elements of the procedure are still under development and can be improved based on the results and experience collected after about two years of real-time work on network of telemetric rain gauges


Introduction
Precipitation is an essential input data for numerous operational applications in meteorology and hydrology, such as quantitative precipitation estimation (QPE), weather forecasts and warnings, hydrological modelling, agricultural meteorology, etc. These applications require real-time reliable rainfall data with a high temporal and spatial resolution.
There are several types of errors that may affect automatic measurements: gross, random and systematic errors. Gross errors are mainly caused by the malfunctioning of measurement devices or during data transmission. Random errors can cause overestimation or underestimation of an actual value. Systematic errors tend to bias measured values and can be caused by a long-term drift of sensors or by sensors with no valid calibration. Therefore, the World Meteorological Organization has recommended that observational data must be quality controlled at different levels of data preprocessing, processing and transfer in real time and nonreal time, using various procedures [1]. There are two levels of real-time quality control of observational data from automatic weather stations: (i) quality control of raw data, i.e., basic quality control, and (ii) quality control of processed data (extended quality control). The automatic control of raw data should primarily indicate the malfunctioning of sensors, instability and the interference of data. In case of the automatic control of processed data, the check intends to identify erroneous or anomalous data through checking the data's integrity, i.e., their completeness and consistency.
The amount of rain during a current time period may be measured by manual or telemetric gauges like a tipping bucket, weighing type or optical rain gauge. In recent decades, the number of telemetric rain gauges has greatly increased. However, each type of rain gauge has its advantages and disadvantages. Tipping bucket rain gauges, commonly used in the Polish network of meteorological stations, are relatively simple devices, but they are burdened with many errors, both random and systematic. The principal problem noted with tipping bucket rain gauges is related to partial or total blockages. Gauges which are unattended for long time, are especially exposed to clogging and the jamming of the mechanism due to accumulated mineral particulates or biological detritus, e.g. dust, insects, blown grass etc. that can get into the mechanism [2,3]. The blockage of the gauge orifice can lead to a rain measurement being greatly underestimated [4,5].
The systematic errors in measurements by means of tipping bucket rain gauges involve losses due to wind, wetting, evaporation and splashing [6]. Wind in particular can result in underestimation of the gauge. According to research carried out by Sevruk et al. (2009) [5], errors caused by wind were one of the predominant factors in observation errors, as a gauge typically has an undercatch of approximately 3% of rainfall, but in some events this can be up to even 20%.
The increasing number of automatic rain measurement sites and the many sources of possible data error means that automatic real time data quality control (QC) procedures are needed for objective detection of the erroneous values in the data. There are several advantages of automatic quality control procedures pointed out by the WMO: (i) objectivity and repeatability, (ii) uniformity, (iii) the possibility of using complex control parameters (iv) the elimination of tedious checking of huge amounts of correct data, (v) the close supervision of quality control results [1]. Therefore, automated real-time quality control procedures have become essential and have been applied for local and regional rain gauge networks for various time resolutions of a dataset. Moreover, the constant improvement of the quality procedures is necessary, taken on board the latest available technology and techniques in data analysis [7].
Generally, data QC is divided into quality control and data correction steps. Data quality control is a procedure carried out in order to categorise the data as either fine or suspicious, or to characterise the quality quantitatively by means of quality index (QI), which describes the quality in a range from 0 to 1 for bad and ideal data, respectively [8]. Data correction is the process of modifying data which have been found as not sufficiently good in the quality control procedure [9].
In the paper we focus on procedures for quality control developed for rain gauge data. Therefore, this paper presents the automatic QC procedure in order to identify erroneous and suspicious data and assign the quality index to the individual measurements, mainly for the quantitative precipitation estimation developed at the Institute of Meteorology and Water Management -National Research Institute (IMGW-PIB).

Data
In Poland, the telemetric rain gauge network operated by IMGW-PIB consists of 492 tipping-bucket rain gauges which provide real-time data (Fig. 1). Each gauge is equipped with two sensors: unheated and heated. The unheated one is not used during the cold season, when solid precipitation is mostly observed. The rain measurements are recorded at a 10-minute temporal resolution at each site, producing 144 measurements per station per day.
The automated QC procedure for rain measurement has been operationally implemented at IMGW-PIB since January 2016. In 2017 nearly 88% of possible observations were successfully collected and archived in real time. Weather radar data (R) applied to verify the QC algorithms were generated by the Polish radar network POLRAD, which consists of eight C-band Doppler radars from Selex ES. Three-and two-dimensional radar products are generated every 10 minutes with a 1-km spatial resolution. The surface precipitation product was obtained from a PseudoSRI (surface rainfall intensity) product, and then a 10-minute precipitation accumulation (PAC) product was generated from two consecutive products, taking account of spatial and temporal interpolation in order to avoid effects related to data sampling. With the data from individual weather radars, the composite was generated using a qualitybased approach.
Quality control of radar reflectivity (in dBZ) raw 3D data is performed by means of a dedicated RADVOL-QC system to correct the data and generate quality information QI(R) [10]. Radar errors can be divided into a three groups. The first one is related to radar beam geometry and includes effects related to the distance from a radar site, like the beam broadening. The next group, which influences the radar estimates to the highest degree, is related to the presence of nonmeteorological echoes, mainly caused by ground clutter, external signals from RLAN emitters (radio local area network), measurement noise (speckles), and biological echoes from birds or insects. Other errors are caused by attenuation in heavy rain, anomalous propagation of the radar beam, and beam blockage on terrain obstacles which decreases signal strength.

Automatic quality controls
Many methods have been developed to perform quality controls of measurement data automatically. In the case of rain data, Einfalt et al. (2008) [11] proposed starting the QC procedure from a simple test and then following this with a more complex investigation. The following steps concerning the QC of rain data were proposed: (i) the detection of gaps in the data, (ii) the detection of physically impossible values, (iii) the control of measurement variability, (iv) the detection of constant values, (v) the control of internal consistency, (vi) the control of spatial consistency.
Previous quality control methods were, in particular, based on spatiotemporal analysis within the gauge network. However, the effectiveness of a method depends mainly on the density of gauges and precipitation regime [12]. The simple checks are the commonly referred to plausibility tests, which can be done automatically [13,11,14,15,16]. These plausibility tests are performed directly on the data to check if they have passed or failed each test. Taylor and Loescher (2013) [16] state that plausibility tests could be defined as metrics that examine the range and variability of a given dataset.
However, the high variability of rainfall, both temporal and spatial, causes a lot of difficulty in the assessment of the accuracy of rain gauge data. Therefore, for more complex analysis, relationships between meteorological parameters from multiple sensors, including a weather radar network, are applied [12,17].
The telemetric rain data QC developed and implemented at IMGW-PIB is focused on real-time quality controls by automatic algorithms to identify suspect data and assign the QI for each single gauge measurement. The developed quality control procedure consists of several tests, starting from the simplest tests of gross errors and range checks, through spatial and temporal consistency checks, up to the multi-sensor check of conformity with radar and satellite precipitation estimates. The output from the applied real-time quality control tests of rain data (G) is the quality index QI(G), which characterises the quality of the individual gauge measurement.
The Gross Error Check (GEC) is the first test performed on a single measurement to identify gross error mainly caused by the malfunctioning of measurement devices or during transmission, reception and processing [18]. The GEC is the preliminary check for examining if the measurements observed at individual gauges for each sensor are not less than 0 mm and not more than a physically acceptable limit [1]. The upper limit was determined based on analysis of the highest long-term values of 10-minute precipitation accumulations measured in the Polish network of meteorological stations and is 80 mm per 10 minutes. In the case that a measurement at any sensor fails the GEC, the data is considered as an error and rejected from further processing.
The Range Test Check (RTC) is the second level of quality control procedure and is also performed on a single measurement. The range test compares measurements for each sensor with a threshold value determined based on the climatological limit of precipitation totals for a specific location. In cases where the examined data exceeds the threshold value, the data is treated as suspicious.
In practice, the limit can be determined on the basis of long-term observational data of maximal values or from the statistical distribution of measurement data. Taylor and Loescher (2013) [16] state that the thresholds defined on statistical distributions are more effective than simple using climatological maxima. In the developed QC procedure, the threshold G p,t is defined as precipitation accumulation for t minutes with the probability of exceeding p (herein t = 10 min, p = 1%). These values were calculated for each telemetric gauge location based on the formula developed by Cebulak et al. (1986) [19] for the territory of Poland: where: a, b, n, y p are the empirical parameters determined by Cebulak et al. (1986) [19].
The Spatial Consistency Check (SCC) is applied to identify outliers based on a comparison to neighbouring gauges. There are several steps in the operational procedure of SCC. The check is performed for each sensor separately: 1 The calculation domain area is divided into basic sub-domains with a spatial resolution of 100 km x 100 km. If a minimum number of available gauges is found (herein: three), the following values are calculated for each sub-domain: 25%, 50%, and 75% percentiles (respectively q 25 (G), q 50 (G), and q 75 (G)), and the median absolute deviation: (2) where: n is the number of telemetric rain gauges; is the value of rainfall in i-gauge; is the median value in the given sub-domain. 2 The criterion for the spatial consistency of i-gauge is implemented based on index I i which is calculated according to the formula of Kondragunta and Shrestha (2006) [20]: The index calculated for each i-gauge within the sub-domain is compared with a threshold value defined by 95% percentile . The rain gauge is identified as an outlier if the > in the basic sub-domain. In that case, the checking is conducted analogically for subdomains moved 25 km away in all four directions. Finally, a given rain gauge is identified as an outlier if the > in the basic sub-domain and all four moved sub-domains.
The Temporal Consistency Check (TCC) can be performed only during the warm season when measurements from both sensors (heated and unheated) are available. This test compares precipitation accumulations from the two sensors of the same rain gauge, i.e., in the same location. The examined measurements are identified as suspect if the two sensors' values significantly differ in precipitation accumulation. This may be cause by a blockage of one of the sensors, for example.
The TCC procedure is performed in the following steps. Precipitation accumulated from the last twelve 10minute measurements is computed for both heated (G i h ) and unheated (G i uh ) sensors. The accumulations are calculated if the data are available from at least 9 measurements during the period and have passed the GEC test. If the difference between the two sensor accumulations is less than the present threshold, then both sensors pass the test. The threshold value results from the value 0.2 mm multiplied by the number of accumulated observations and, in the case of the full availability of observations, it equals 2.4 mm.
After the four tests described above, quality index QI(G i ) values are assigned to the measurements provided by both the sensors of a given rain gauge i in the way described in Table 1. The values of QI(G) range from 1 (good qualityi.e., the data passes all the tests) to 0 (bad qualityi.e., erroneous data). The QI(G) results from errors detected during all the above tests and is attributed a single measurement. Finally, data from the sensor with higher QI is taken for further processing and is marked G i . If the two QI values are equal then data from the heated one -G i his taken as the G i . * If the data failed the SCC and passed the TCC then the quality of the data is increased by 0.10.
The major characteristic feature of precipitation is its high spatial and temporal variability, which causes difficulty in the assessment of the accuracy of rain data based only on one source. Therefore, an additional check of rain gauge data has been developed to compare rain gauge data with multi-sensor data, such as weather radar and satellite data, in order to remove false gaugereported precipitation.

The Radar and Satellite Conformity Check (RSC)
compares every rain gauge value G i which exceeds 0 mm with both radar and satellite observations (based on Meteosat) at a gauge location with the surrounding 3 x 3 pixels. If all radar and satellite pixels within the vicinity with qualities above a preset threshold of 0.95 and 0.99, respectively, indicate "no precipitation" (0 mm), then it is assumed that precipitation measured by the rain gauge is false and, moreover, QI(G i ) is reduced by a factor of 0.7.
Accumulations. The developed above-described scheme of real-time QC of rain gauge data was implemented for operational use in 2016 for 492 tipping-bucket rain gauges covering the entire territory of Poland. The QC procedure is applied to 10-minute rain data. Because 1hour rain accumulations are also required for hydrological purposes, the longer sums are also generated taking the 10-minute data qualities into account. The QI for 1-hour rain data depends on the qualities of particular 10-minute accumulations and the completeness of the measurements.

Case study
The results of QC of precipitation data are presented for rain events on 17 th of June, 10 th and 11 th of August and 9 th of September 2017. The quality-controlled data are evaluated against radar rainfall estimates for the 1 km x 1 km pixels corresponding to all the rain gauge locations taking radar-gauge pairs, if at least one observation is greater than 0 mm. The performance of the gauge QC scheme was quantified using the following statistical measures: the root mean square error (RMSE) and the correlation coefficient (CC).
On 10 th August 2017 the weather conditions in Poland were characterised by small and moderate cloudiness, in some regions periods of high cloudiness also occurred. Rain showers and storms were observed and there was some intensive local rainfall. The rain measurements were reported by, on average, about 350 telemetric gauges all over Poland. Throughout the day, 4% of the 10-minute measurements did not pass at least one of the four applied QC tests. Figure 2 presented the example based on measurements made on 10 th August 2017. Figure 2a shows a conformity between the two 10-minute accumulations of rain gauge data measured by two sensors (G uh and G h ) at the same locations using the raw dataset, while Figure 2b shows only the data that passed all the applied QC tests. The level of data agreement measured by two sensors was improved after applying the QC procedure. The CC only increased slightly because correlation was not significantly higher after the removal of lower quality gauges, whereas the RMSE was drastically reduced, which means that the removal of lower quality gauges caused the elimination of high values of differences between G uh and G h . This means that the QC procedure efficiently eliminated less reliable data.
The effectiveness of the QC gauge algorithms was also evaluated by comparing 1-hour gauge accumulation (G) datasets to radar rainfall estimates (R) for the 1 km by 1 km pixels corresponding to the rain gauge locations (Fig. 3a, 3b). It should be borne in mind that the radar measurements are indirect and must be treated as independent rainfall estimates. The statistical analysis shows CC and RMSE values using only those measurements with QI(G) values of 0.9 or greater when compared to the whole gauge dataset, for measurements from 10 th August 2017.  For other investigated events the removal of 1-hour gauge accumulation with QI(G) below 0.9 significantly improves the evaluation statistic RMSE, while only slightly improving the CC in some cases (Tab. 2). Generally, the raw data incorporates some poor quality rain gauge data, which significantly affects the RMSE value and results in a poorer agreement between radar rainfall estimates and gauge-observed rainfall accumulations. The impact of the bad data is not so clear on the CC statistic because the correlation depends less on quantitative differences.

Summary and conclusions
Telemetric rain gauges measure the rainfall directly at a given location. However, they may be affected by different source of errorstipping-bucket gauges, for instance, are prone to malfunctioning caused by, for example, blockages caused by biological or mineral fouling. Therefore, the quality control of rain gauge data is a very important step in precipitation analysis and processing in order to identify erroneous or suspicious a) b) Fig. 3. (a) 1-hour accumulations of raw rain gauge data (G) against total radar rainfall estimates (R) at rain gauge location; (b) the same for rain gauge (G) after QC (i.e., data with QI(G) > 0.9). Example for 10 th August 2017.
data. The accuracy of the data has a substantial impact on their numerous applications, especially in operational modes. At IMGW-PIB, the operationally working systems, particularly RainGRS for multi-source quantitative precipitation estimation [21], INCA-PL2 and SCENE for nowcasting and other modules in the frame of the SEiNO system [22], and moreover hydrological rainfall-runoff models and numerical weather prediction models from the COSMO and ALADIN consortia, directly ingest the data. Reliable real-time and high-quality data after careful QC is strongly required for this use.
The procedure developed and implemented at IMGW-PIB for the QC of rain gauge data has been working in real-time in operational mode since 2016. The procedure is capable of the detection of several types of errors, such as gross error, data outside the climatological range, outliers, a stuck gauge, etc. However, the QC algorithms presented here should still be treated as preliminary versions. Work on optimizing these QC algorithms will be continued in 2018  years of the performance of the real-time QC of rain gauge data will be utilised.
The comparison presented above of rain gauge data before and after the QC procedure against radar estimates of precipitation accumulations at rain gauge locations confirms the correctness and usefulness of the developed concepts. This work aims at improving the quality of telemetric rainfall data as an input for a wide range of operational applications.
The quality index QI(G) assigned to each data allows for the characterisation of the quality of rain gauge data quantitatively, which is especially useful in producing QPE operationally by the RainGRS system.
The presented work has been financed in the frame of the statutory activities of IMGW-PIB.