{'fraction_non_alphanumeric': 0.029068909546997198, 'fraction_numerical': 0.014755791648221927, 'mean_word_length': 4.555122950819672, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An Efficient Practical Post-Processing Algorithm for the Quality Control of Dual-pulse Repetition Frequency Doppler Velocity Data

This paper presents an efficient, practical post-processing algorithm for the quality control of dual-pulse repetition frequency (dual-PRF) Doppler velocity data observed in Plan Position Indicator (PPI) mode. Quality control refers to the enhancement of the quality of the Doppler velocities through the reassignment of an appropriate Nyquist interval number to an erroneous velocity datum and the elimination of unreliable data. The proposed algorithm relies on the local continuity of velocity data, as do most of the preexisting algorithms. Its uniqueness, however, lies both in the preparation of more reliable reference velocity data and its applicability to PPI data at higher elevation angles. The performance of the proposed algorithm is highlighted by its application to observed data from Cand X-band Doppler radars. This algorithm is practical, efficient, and not time-consuming. It may be of great help in the derivation of accurate wind information from dual-PRF Doppler velocities.


Introduction
Doppler radars provide valuable wind information at high temporal and spatial resolutions in operational and research fields. Pulsed Doppler radars have, however, a limitation resulting from the existence of the unambiguously measurable maximum velocity, called the Nyquist velocity v a . This velocity is given as: v a = λ•PRF/4, where λ is the transmitted wavelength and PRF is the pulse repetition frequency. The measured Doppler velocities are then ambiguous by 2n v a , where n is an integer called the Nyquist interval number. Because of the so-called Doppler dilemma, most pulsed Doppler radars are operated around v a in the range of 10 -20 m s −1 to ensure a sufficient detection range. For such values of v a , the measured Doppler wind fields are often contaminated by folding or aliasing. An appropriate Nyquist interval number n should thus be assigned to each velocity datum before analyzing Doppler velocities.
Folding effects can be alleviated through the use of the dual-pulse repetition frequency (dual-PRF) technique (e.g., Doviak and Zrnić 1993), which extends the unambiguous velocity interval. A practical implementation of this technique for Plan Position Indicator (PPI) scanning is to collect velocity data by a beamby-beam alternation of two PRFs during antenna rotation, assuming that the same space is probed at two different PRFs simultaneously. The dual-PRF method is now commonly used for operational Doppler radars, including the C-band Doppler radars operated by the Japan Meteorological Agency (JMA) (Tsukamoto et al. 2016) and the X-band multiparameter Doppler radars deployed by the Ministry of Land, Infrastructure, Transport, and Tourism (MLIT) (Maesaka et al. 2011).
Doppler velocities from the dual-PRF technique are not, however, free from dealiasing errors and/or statistical (random) errors. Thus, post-processing algorithms have been developed (e.g., Holleman and Beekhus 2003;Joe and May 2003;Altube et al. 2017). Hereafter, the algorithm developed by Holleman and Beekhus is denoted as HB03, the algorithm by Joe and May is called JM03, and the algorithm by Altube et al. (2017) is called AL17. These three algorithms are all based on the local continuity of Doppler velocities collected in PPI mode. HB03 uses a median velocity as a reference, computed in a window centered at the target point being considered, while JM03 employs the Laplacian operator for the detection and correction of erroneous data. In contrast to these two methods, AL17 processes the correction in the phase space instead of the velocity space. These three algorithms have shown good performance in correcting dual-PRF velocity errors in PPI scans at low elevation angles less than 10 degrees. It is nevertheless very difficult to perfectly correct all errors in the velocity data. Furthermore, it is also not clear how these three methods function for velocity data in PPI scans at higher elevation angles of about 20 -40 degrees, which are commonly employed in VAD analysis (Browning and Wexler 1968) and multiple-Doppler wind synthesis. No concrete theories or perfect methods exist for the correction of dual-PRF velocity errors up to the present date. It is therefore worth developing efficient and high-performance algorithms for the correction of the errors in the dual-PRF velocities that are applicable to Doppler velocities collected in PPI, which is currently a major observation mode, to facilitate deriving reliable wind information.
This paper presents an efficient, practical postprocessing method for the quality control of dual-PRF Doppler velocity data in PPI mode, regardless of the cause of the errors. Quality control refers to the overall process that is used to enhance the quality of Doppler velocities by the reassignment of an appropriate Nyquist interval number to an erroneous datum and the elimination of false data. The proposed algorithm, processed in velocity space, relies on local continuity, as do HB03, JM03, and AL17. Its uniqueness, however, lies both in the preparation of the reference data and its applicability to PPI data at higher elevation angles. Section 2 will describe the principle of the quality control, followed by an application of the method to observed data in Section 3. A discussion of the results is presented in Section 4, and conclusions are given in Section 5.

Principle of quality control
The principle of the proposed algorithm is based on the combination of a gap check and a subsequent correction at each range gate with an observed datum. This combination is applied to each of the observed data in a PPI scan of interest, and the processing of all of the data of concern in the scan will be repeated for several cycles until the unreliable data and/or errors are completely corrected or removed. A flowchart of this algorithm is shown in Fig. 1, in which the symbols in parentheses indicate important processes that are referred to in the text. Without the presence of extended Nyquist aliasing, the algorithm requires no supplementary wind information. Prior to the application of this algorithm, it is assumed that classical quality control based on reflectivity and/or Doppler width thresholds, for example, is performed. This paper does not refer to the quality control measures for meteorologically unimportant velocity data, such as those that have been severely contaminated by ground clutter and those caused by radio wave interference.

Gap check step
The algorithm starts from the gap check at every range gate with an observed datum. This step is conducted to detect the existence of "unnaturally" large gaps in the velocity field in a PPI scan of interest because such large gaps are mostly associated with erroneous and/or false data. The gap check step in the first round is, however, not accompanied by the correction step (G-10) because of a lack of the necessary parameters for correction.
To detect large discontinuities at each range gate, the deviations of the datum considered in terms of nearby velocities are investigated. For this purpose, we define a small region, or window, which is centered at each range gate (G-1), as in HB03 and JM03. When the window contains at least a minimum number of observed data (denoted as N 0 ) (G-2), the detection of large gaps is processed in this window through examining the deviations (denoted as δV r ) of all velocities from the datum located at its center (G-3). If the number of data is less than N 0 , the processing moves to the gap check at the next range gate. The | δV r | larger (equal to or smaller) than a prescribed threshold value (denoted as δ 1 ) is regarded as a large (small) gap. During this gap check, a datum with a small gap is marked "without gap", while a datum related to a large gap is labeled "with gap". In addition, the number of occurrences of "without gap" and "with gap" is counted separately. When no large gaps are detected in the window being considered (G-4), this window is regarded as being gap-free, and all data in this window are marked as "good" (G-5). Furthermore, a mean Doppler velocity (denoted as V m ), defined at the center of this window, is computed with all of the available data in the window using a distance-weighted averaging (G-6). The weight has a form of 1/(1 + R 1/2 ), where R is the distance from the range gate at the center of the window and is computed from the relative differences in gate and beam numbers. This V m may have a higher degree of reliability as a mean value near the target range gate, as long as the dual-PRF technique functions properly, and it will be a candidate for a reference value in the correction. No correction is made for this gap-free window, and the gap check is resumed at the next range gate. In contrast, when at least one large gap is detected in the window (G-3), this window is marked as "with-gap" (G-4), and all data in the window are labeled as being "doubtful" (G-7). In addition, one of the following two procedures is performed, depending on the number of occurrences of large gaps (G-8).
(1) When the ratio of the small gap occurrences to the total number of observed data is larger than a prescribed threshold (denoted as R 0 ), a provisional mean velocity (denoted as V pm ), defined at the center of the window, is computed (G-9) in a similar manner to G-6, using only velocities marked "without gap". This V pm will be used to determine an appropriate reference velocity among the V m s nearby, computed from the gap-free windows. The correction of doubtful data described in the next subsection is subsequently processed for this with-gap window, as shown by a gray bold solid line in Fig. 1.
(2) Otherwise, no V pm is computed for this window, and the processing immediately returns to the gap check at the next range gate.

Correction step
When a with-gap window with V pm is detected at a range gate under examination, the correction of unreliable data is immediately made for this window from the second round on (G-10). This procedure may enhance the performance of the proposed algorithm, because the reduction in numbers of unreliable data instantly exerts a beneficial influence on the process-ing of the remaining doubtful data. To correct "doubtful" velocities in this window, a reliable reference velocity (denoted as V ref ) will be explored with the aid of V pm . For this purpose, we define another window of a certain size, centered at the target data point being considered (C-1). A reliable reference value will then be selected among the V m s computed for the gap-free windows, whose centers are located in this window (defined in C-1), such that the reference minimizes the magnitude of the deviation from V pm (C-2). If no such reference velocity exists (C-3), the processing quickly returns to the gap check step at the next range gate, as indicated by a gray bold dotted line in Fig. 1. When such a reference is found (C-3), V pm is corrected with the local continuity using V ref . If the magnitude of the difference (denoted as δV 2 ) between the resultant corrected value and V ref is less than a threshold (denoted as δ 2 , which is given as αv ah , where α is the same value as in C-7, explained later, and v ah is a higher Nyquist velocity) (C-4), the V pm at this range gate is replaced by V ref , which is treated as the mean velocity from the gap-free window (C-5).
The correction of all unreliable data in the window defined at this point is subsequently made using the local continuity (C-6), employing V ref as a reference. The quality of the corrected datum is further checked by the method described in Yamada and Chong (1999) (C-7). This check helps remove low-quality data that cannot be detected by the classical tests, based on the thresholds of reflectivity and/or the Doppler widths. If the difference (denoted as δV 3 ) between the corrected datum and V ref falls within ± αv a , where α (< 1) is a predetermined positive constant that should be appropriately set depending on the case in question, the corrected datum is relabeled as "good" (C-8). The values of α of approximately 0.3 -0.4 are commonly used. On the contrary, if δV 3 does not satisfy the above condition, no correction is made for the datum, and the datum remains "doubtful" (C-9). This correction processing is repeated for all doubtful data in the window of interest.
After the correction is completed for all doubtful data in the window being considered, the processing returns to the gap check at the next range gate (C-10). Since the correction step does not process "doubtful" velocity data at the range gates without V pm , the above point-by-point processing, based on the gap check and followed by the correction, will be repeated several times for data in a PPI scan. If the number of iterations exceeds a predetermined maximum count, all of the data that remain doubtful are finally deleted.
One advantage of the present algorithm, relative to HB03 and JM03, is the determination of a more reliable reference velocity through a combination of the corresponding provisional mean velocity and the mean velocities computed for the gap-free windows neighboring the target point. HB03 and JM03 make the correction using data that is, principally, in a window of small size, e.g., 3 × 3 points, centered at the range gate. The resultant small number of data would cause a performance degradation in their algorithms in the presence of relatively high contamination by noise and/or erroneous data, for example. In contrast, the proposed algorithm determines a reference value among the mean velocities computed for the respective gap-free window, whose center is inside the window defined in C-1. Since this reference has the mean character of a chunk of "smoothed" velocities existing near the target grid point, it will be more suitable and reliable for correcting the doubtful datum at the range gate considered.

Application of the proposed algorithm to observed velocity data
This section will demonstrate the performance of the proposed algorithm through its application to observed dual-PRF velocities in PPI mode for three cases. Two of the cases are for data from C-band Doppler radars operated by the JMA, and the other is for data from an X-band Doppler radar operated by the MLIT. For the three cases, the reflectivity threshold of 10 dBZ was applied to the Doppler velocities to remove undesirable data before the quality control using the proposed algorithm is made.
The first example is a correction of velocity data from a C-band Doppler radar operated at Tokyo International Airport (Haneda Airport) for a case of heavy local rainfall in central Tokyo on September 4th, 2005. This radar is located at 139.7561°E and 35.5561°N and was operated at two PRFs of 840 Hz and 1120 Hz, corresponding to Nyquist velocities of 11.92 m s −1 and 15.90 m s −1 , respectively. The extended Nyquist velocity thus becomes 47.7 m s −1 . The radar collects data with spatial resolutions from 0.15 km up to 128 km in the radial direction and 0.7° in the azimuthal direction. The numbers of the beam and gate are 512 and 800, respectively. Figure 2a shows an observed Doppler velocity in a PPI scan at an elevation angle of 2.1° at 2307 JST 1 . Contamination by errors and/or noises spreading across the data is easily identified in this figure. When the present algorithm is applied, the size of the window for the gap check defined at each range gate is 7 points in the azimuthal direction and 7 points in the 1 JST: Japan Standard Time. JST = UTC + 9 hours. radial direction. The gap check process is performed for the window that contains the number of observed data equal to or larger than 12, that is, N 0 = 12. The threshold of the velocity difference (δ 1 ) for the gap detection was set to 18 m s −1 . Such a large value helps us detect erroneous data without confusing it for "real" gaps in Doppler velocities. The provisional mean velocity is computed in each window when R 0 is equal to or larger than 0.9 and 0.75, respectively, for the first gap check and afterward. The more severe condition imposed on the first gap detection step is to prepare more reliable reference velocities. To correct velocity data labeled "doubtful" in the subsequent correction step, an appropriate reference velocity is selected in a window of the same size (C-1) for the gap check process (G-1).
The corrected velocity field in Fig. 2b was finally obtained through four cycles of the combination of the gap check and correction steps for this case. In the correction step, α = 0.45 was employed for the quality of the corrected datum in C-7. Using the same value of α, δ 2 is set equal to αv ah . The quality of the velocities in this figure is excellent. In addition, a comparison of Figs. 2a and 2b indicates that the "good" data remain unaffected during quality control processing. This is a common feature of the cases illustrated in Figs. 3 and 4. The respective values of N 0 , δ 1 , R 0 , and α as well as the determination of δ 2 for this example are also employed in the following two examples. Additionally, the same size of the window for the gap check (G-1) and the determination of a reference velocity (C-1) are used.
The second example is a correction of data from a JMA C-band Doppler radar (located at 141.6767°E and 42.7961°N), operated at the New Chitose Airport (CTS) in Hokkaido, Japan. This example will also demonstrate that the proposed algorithm has the potential to correct data with a relatively high degree of contamination by unreliable data in a PPI scan, even at higher elevation angles. The spatial resolutions of this radar and the two PRFs are the same, respectively, as in Fig. 2. The high and low PRFs correspond to Nyquist velocities of 15.90 m s −1 and 11.92 m s −1 , respectively, and the extended Nyquist velocity is then 47.7 m s −1 . Figure 3a displays velocity data in PPI at an elevation angle of 32.1°, collected for a precipitation system producing heavy rainfall on August 27th, 2013, in and around the city of Tomakomai, located to the south-southwest of CTS at a distance of about 15 km. The readily discernible false data, or outliers, are scattered in a wider area. The cause of such erroneous data is unclear. After the gap check and correction steps were repeated four times, the quality of the Doppler velocities is successfully refined, as shown in Fig. 3b.
The final example is an application to data from an X-band Doppler radar of the Ushio site (located at 132.5500°E and 34.5050°N), part of the Extended Radar Information Network (XRAIN) operated by the MLIT. The maximum detection range of this radar is 80 km, and the numbers of the gates and beams are 534 and 300, respectively. Its spatial resolution is 0.15 km in the radial direction and 1.2° in the azimuthal direction. The PRFs of this radar are 1500 Hz and 1200 Hz, corresponding to Nyquist velocities of 11.54 m s −1 and 9.24 m s −1 , respectively. The extended unambiguous maximum velocity is then 46.2 m s −1 . Figure 4a shows velocity data in PPI at an elevation angle of 4.9°. This data was associated with a precipitation system producing torrential rainfall in Hiroshima Prefecture on July 6th, 2018. Erroneous velocity data are identified in the regions enclosed by yellow lines. Figure   Fig. 4. (a) As in Fig. 2a, but for the Ushio radar data at 1801 JST at an elevation angle of 4.9°. Data are shown up to the gate number of 500, beyond which no data were observed. The beam number 1 corresponds to 0.60°, and the beam number 300 corresponds to 359.4°. Erroneous data are present in regions enclosed by yellow lines. The velocity data in the green rectangle are enlarged in Fig. 4b. An enlarged view of a portion enclosed in the bright magenta frame is also displayed in the mini-window of the red frame to clearly show erroneous data located in the yellow circle. This mini-window is placed in a portion without observed data. For these two frames, the left and right sides correspond to the beam number of 190 and 210, respectively, while the bottom and top sides correspond to the gate number of 275 and 295, respectively. Note that the aspect ratio differs between these frames. (b) Enlarged view of velocity data clipped from the region in the green rectangle in Fig. 4a. Errors and/or noise are enclosed by a circle and oval in yellow. The pink rectangle indicates the window size employed for the gap check process. (c) As in Fig. 4a, but for data after quality control is performed by the present algorithm. (d) As in Fig. 4b, but for the data after correction.
4b depicts an enlarged view of the portion indicated in Fig. 4a and also represents the size of the window used in the gap check step relative to the areal extent of erroneous data. Four cycles of the gap check and correction steps successfully completed the quality control of the Doppler velocities as displayed in Fig. 4c. Figure 4d shows the velocity field in Fig. 4b after correction, emphasizing the performance of the proposed method for correcting errors located at and around the boundary of echoes.

Discussions
The algorithm proposed in the paper is based on the combination of the detection of "unnatural" gaps and the subsequent correction step relying on the local continuity, as in HB03 and JM03. Unlike the algorithms in these studies, the present algorithm is designed to select a more reliable reference velocity among the mean velocities computed for the surrounding gapfree windows close to the range gate considered, for which a provisional mean velocity is computed. This process enhances the performance of the algorithm using a more suitable reference value and may correct even velocity data contaminated by a relatively large number of erroneous velocities, as shown in Figs. 2a and 3a. In addition, the advantage of the present method is its applicability to data in PPI at higher elevation angles. Most previous studies did not address this point. Several repetitions of gap check and correction cycles are sufficient for quality control.
HB03 and JM03 are based on the median velocity and the Laplacian operator, respectively. The use of a median velocity in the window as a reference appeared to be insufficient because the median value may be susceptible to the presence of unreliable data. Indeed, when applied to data contaminated by a relatively large number of erroneous data in Fig. 3a, the proposed method did not give a satisfactory result when the median velocity was chosen as a reference. The basis of JM03 is the modified Laplacian discrimination parameter, which is given as a weighted summation of Doppler velocities in a window of size 3 × 3 points centered at the range gate being considered. This method appears to have difficulty detecting and correcting errors if inappropriate Nyquist interval numbers are assigned to all observed data of similar values in this window.
The size of the window in the radial direction should be adjusted when the method is applied to PPI data at higher elevation angles under high vertical shear conditions. High vertical shear may result in large differences in velocities in the window con-sidered, so that it is possible that the algorithm may regard such "natural" gaps as errors.
The method introduced in this paper can also be applied to velocity data without PRF information in the recorded data, as in HB03 and JM03. In this case, the correction was first made using each of the Nyquist velocities corresponding to high/low PRFs to compute the respective tentatively corrected values. Then, an appropriate corrected datum will be a datum that has a smaller deviation from the reference. The resultant corrected velocity is, of course, checked for its appropriateness.
The performance of the method presented in this paper is highlighted in the three examples, two of which are highly contaminated cases. It has, however, the following three limitations, similar to the preexisting methods. First, there is a difficulty in correcting an isolated cluster of erroneous data, regardless of their size, because large gradients are hardly detected there. If its areal extent is small, such data would be meteorologically unimportant. Next, there is a difficulty in the correction of a clump of embedded false data that has a horizontal extent much wider than the window size employed. Such data would, however, be rare, so long as the dual-PRF technique is functioning properly, except for cases of very strong typhoon-associated winds exceeding the extended Nyquist velocity, for example. The last limitation is the correction of velocities corresponding to the wind components falling outside the extended unambiguous velocity interval. The present method requires other techniques for global dealiasing prior to its application for such a case, as do HB03 and JM03.
Regardless of these limitations, the proposed algorithm is found to perform well without any subsidiary wind information. Furthermore, the algorithm is not time-consuming. It serves as a practically useful and efficient tool for the quality control of dual-PRF Doppler velocity data, contributing to the extraction of accurate wind information.

Conclusions
This paper has presented a practical, efficient postprocessing algorithm for the quality control of dual-PRF Doppler velocity data collected in PPI mode and demonstrated its high performance through its application to observed data, even to PPI data collected at higher elevation angles and contaminated by a relatively large number of errors. The algorithm is composed of a combination of the gap detection step and the following correction step. The principle of the algorithm is based on the local continuity of Doppler velocities, like most of the existing methods. The uniqueness of the proposed method lies in the preparation and determination of a reference velocity for correction and its applicability to data collected in PPI scans at higher elevation angles. It requires no auxiliary wind information in these steps, except for data contaminated by extended Nyquist aliasing. The repetition of the above detection and correction steps several times will be sufficient to completely remove unnatural gaps in velocity fields for most cases.
Since the algorithm is not time-consuming, it is practically very useful for deriving accurate wind information from dual-PRF Doppler velocities. In particular, it may be a valuable tool for the accurate determination of three-dimensional wind fields from multiple-Doppler wind synthesis, in which velocity data in many PPI scans from at least two Doppler radars should be processed efficiently and accurately.
The algorithm has limitations, as do the preexisting methods. Since no methods exist at present for the "perfect" quality control of dual-PRF Doppler velocities, it is still necessary and worthwhile to elaborate efficient and high-performance methods to derive accurate wind information from dual-PRF Doppler velocities.