DOI QR코드

DOI QR Code

Weather Radar Image Gener ation Method Using Inter polation based on CUDA

  • Yang, Liu (Department of IT Convergence and Application Engineering, Pukyong National University) ;
  • Jang, Bong-Joo (Korea Institute of Civil Engineering and Building Technology) ;
  • Lim, Sanghun (Korea Institute of Civil Engineering and Building Technology) ;
  • Kwon, Ki-Chang (Dept. of IT Cooperative System, Gyeongbuk Provincial College) ;
  • Lee, Suk-Hwan (Department of Information Security, Tongmyong University) ;
  • Kwon, Ki-Ryong (Department of IT Convergence and Application Engineering, Pukyong National University)
  • Received : 2014.11.12
  • Accepted : 2015.04.09
  • Published : 2015.04.30

Abstract

Doppler weather radar is an important tool for meteorological research. Through several decades of development, Doppler weather radar has enormous progress in understanding, detection and warning of meso and micro scale weather system. It makes a significant contribution to weather forecast and weather disaster warning. But the large amount of data process limits the application of Doppler weather radar. This paper proposed for fast weather radar data processing based on CUDA. CDUA is a powerful platform for highly parallel programming developed by NVIDIA. Through running plenty of threads, radar data can be calculated at same time. In experiment, CUDA parallel program can significantly improve weather data processing time.

Keywords

1. INTRODUCTION

Radar detecting technology is gradually introduced into meteorological fields since the early ‘50s. So far, weather radar has become one of the important observation equipment, it plays an influential role in weather forecast and severe weather warning. Statistical results show that the reasons of most of flood disaster are because of meso and micro scale rainstorm. So an accuracy, real time forecast and description of severe convection weather are meaningful for people to reduce and prevent weather disasters. The development of radar technology is briefly divided into three phases, conventional weather radar, digital weather radar and Doppler weather radar. Meanwhile there are three corresponding researching phases. The key point of meteorological radar researching is area precipitation estimation and wind field information by radar wave.

Until ‘80s conventional radar was still being used in meteorological study. It can show the intensity of precipitation but not accurate as Doppler radar, because besides measuring the precipitation, Doppler radar can measure the wind field information, like speed and direction. A new generation weather radar network named CASA (the Collaborative Adaptive Sensing of the Atmosphere) has utilized a kind of X-band short range radar, unlike conventional weather radar networks usually use high-power, long-range radars. The new Doppler weather radar networks overcome the weaknesses of conventional radar which are high frequency attenuation and observation at the lower parts of the atmosphere. The acquired information by Doppler radar is much more than conventional radar, therefor the data from Doppler radar can be processed in time becomes an important factor for practical application in the future.

Recently, Many Radar applications are developing in various fields(as [1]), so fast processing of radar data for end-users or service-providers is required. For improving the process time of weather radar imaging; Paper proposes a radar retrieval system from the radar source data files to radar images. Radar source data cannot be directly read by people, it needs be transformed to image, convenient for future study with geographic information system and others. Usually, radar source data is an “.uf” or “.nc”file. Following the compressed format, people can extract the specific data and write as a matrix, use normalization, the raw matrix data can be expressed as gray scale images. As we known radar data is acquired the data of circle around, take PPI for example, if assimilate radar detecting area to an umbrella, the radar site locates the center of umbrella cover. Each radar ray is like rib, and panel of umbrella would denote the no detecting data area. In practice, the reflected intensity data on “ribs” can be found on raw radar gray images. But for the “panel” area, radar image does not have direct data, it is kind of data gaps, so people use different interpolation algorithm to fill these parts. This is the most computationally expensive step in radar imaging. But CUDA technique can much improve this situation. CUDA technique provides by NVIDIA for writing highly parallel programs. It is based on GPU, as we known GPU contains large amount of ALUs, by providing a large number of threads, memories, and synchronization, CUDA program will reduce much computing time. And paper’s experiment proved the effect of CUDA as well.

 

2. RELATED WORKS

Weather Radar can get the surrounding meteorological information of radar site, through analyzing the radar signal. Skolnik[2] and Richards[3] have explained the physical and geometry principle, and talked fundamental knowledge of radar in detail. This paper only focuses on digital processing part of radar imaging. Doppler radar uses the model of continuous volume scanning to detect 3D structure of clouds, one time scanning needs 6~10 minutes. Doppler radar can get the information of wind field, but a single Doppler radar can only get an average radial velocity. If require 2D or 3D structure of wind field, multi-Doppler radar joint detection is needed.

Usually In radar imaging field, Radar image has three display modes, PPI (Plan Position Indicator), RHI (Range Height indicator) and CAPPI (Constant Altitude Plan Position Indicator). Radar wave is not continuous; it is a few rays even distributed on an entire circumference surface. So the rays are tightness nearby radar station and sparse far away from radar station. With the distance between adjacent rays increasing, the no data area will occur. Therefore an important step in radar imaging is needed, radar image interpolation. Different radar display modes can be seen as different grid frames, the job of radar imaging is that find the matching data fill the frame from source data, and estimate the super-resolution parts by using interpolation algorithm.

As previous mentioned, many grids in radar image needs to been interpolated. In practical applications, there are several methods; thereinto bilinear interpolation is the most common interpolation algorithm[4]. The weakness is that two adjacent sampling sites get far, with the radial distance increasing. Then the difference of radar reflectivity will be big, and lead to discontinuity echo. It is not like Barnes interpolation etc. methods, which have better continuity. But the bilinear interpolation is still acceptable. On the other hand, radar idata interpolation is a time consuming task. Because of having the simplest operator, bilinear interpolation is the fast interpolation algorithm. This paper try to improve the processing time, so paper still chooses to simulate bilinear interpolation method for radar imaging.

Years ago, Shinozawa et al[5]. proposes the method to improve processing time by using parallel algorithm. Using Parallel method is proactive way to save time. Recently, CUDA technique provides a convenience platform, GPU program. Based on having plenty ALUs GPU, CUDA can run multi-threads on same time, and compute many complex computational problems[6]. It has already applied in many areas, like video and audio processing, physics simulation, product design and medical imaging etc. and yielded significant results. Then the CUDA program is introduced here for improving radar imaging.

 

3. PROPOSED WEATHER RADAR IMAGING BASED ON CUDA

3.1 Weather radar image format and generation

Weather radar is used to detect the position, intensity and variation of rainfall in atmosphere. Because it is fast and accuracy to provide the information of weather around the radar station, in mesoscale and smaller disastrous weather survey and short time weather forecasting, weather radar plays an important role.

When radar collects radar with stereoscopic form, radar raw data is in a spherical coordinate system which is centered in radar station. So when people need to synthetically analyze radar data and do some further processes, the raw radar data needs be transformed to radar image. In the simulation, there are three main steps: firstly read raw radar data following compressed format and draw a raw image, secondly transform raw image from spherical coordinate to Cartesian coordinate system, thirdly interpolate radar image with estimated intensity value. In this paper the whole process will follow a flowchart like Fig. 1. Involved key steps will be described in detail.

Fig. 1.Radar data retrieval flowchart.

The radar raw data is stored in ‘.uf’ file. UF is short for ‘Universal Format’. Original contents are presented by Barnes[7] in 1980. It is specifically created for Doppler radar data. The specific structure of files can be found from the IRIS manual[8]. One file contains a complete volume scan. Within the file is a series of stand-alone rays. For single ray has the structure as following Fig. 2. Each ray belongs which sweep and volume is organized by the header’s information. Within a ray, the data is basically all 16 bits words.

Fig. 2.UF file structure.

The information of rays can be read a word by a word follow uf structure. Include the recoded time, location and setting information, and there are two kinds of reflected wave information which we are interested. They are labeled by CZ (Corrected reflectivity factor) and VT (Velocity thresholded on NC), respectively represent rainfall and wind velocity. These data are extracted from raw file and present by a gray image, each line presents a ray, and each pixel presents a gate value. The value of radar data need to be normalized matching the intensity of pixel. Then a raw radar image can be drawn like Fig. 3.

Fig. 3.Raw radar reflection image (483*996).

3.2 Weather radar imaging steps

As we known, radar sends off radar wave to surrounding airspace. When radar finishes a round of scanning, a sweep record can be gotten. The track of sweep is a side surface of circular cone. For further analysis, the data need to be mapped to a flat surface (Fig. 4). The mapping functions are as following:

Fig. 4.Coordiante mapping from spheroidal coordinate to Cartesian coordinate.

(x,y) is the location in Cartesian coordinate system, A denotes the azimuth, E denotes the elevation angle. After calculating 360 degrees around the radar site, a intuition display way for these data is the PPI. PPI is short for plan position indicator. It is the most common type of radar display model. As the radar antenna rotates, in PPI radar site is in the center of display, a radial trace on the sweep is presented.

A characteristic of PPI display is that the radar records are tightness nearby radar station and sparse far away from radar station. Because the time of radar recording is not continuous, the records are not continuous neither in the space. And after coordinate transformation this kind of discontinuous will appear. For observing, these vacancies need to be filled. This is next step radar data interpolation.

3.3. Interpolation process–high computation time

Radar data interpolation is an important step in radar retrieval process. As the most computationally expensive and radar image quality determining step, many algorithms have been proposed like nearest neighbor mapping[9], bilinear interpolation [10] and Barnes interpolation[11] etc. After coordinate transformation there are only a few grids can find mapping value from raw radar image like Fig. 5. All of interpolating algorithms try to estimate the rest no value grids by different methods. In this paper, the bilinear interpolation is simulated. Bilinear interpolation is a frequently used and fast method for two dimensional data interpolation. Assume that we try to estimate a value at the unknown point P = (x,y), there are four nearest known points (x1,y1), (x1,y2),(x2,y1),(x2,y2), from two neighbor rays. Then bilinear interpolation estimate of the unknown value is given as:

Fig. 5.Ray distribution sample in the first quadrant of Cartesian coordinate system, blue line though grids are known grid, the rest are not.

3.4 Apply to CUDA interpolation process

From previous contents mentioned, interpolation process needs process amount of repetitively computation. For instance, if a raw image with 1000*500 size is transformed to transform to PPI, without scale transformation, there will be more than 2.6 × 106 grids need to be reconstructed. In our experiments, 80~95 percentage of processing time is spent by interpolation process. An efficient way for interpolating processing time is bringing in a kind of massively parallel processing method, CUDA program. CUDA is short for compute unified device architecture. It is a kind of software architecture for data parallel process developed by NVIDIA and use GPU as computing device. NVIDIA’s CUDA architecture provides a powerful platform for writing highly parallel programs[12]. Look over the inside of GPU structure, GPU has more transistors area devoted to data processing rather than data caching and flow control. Unlike CPU is in charge of logical transaction and serial computation, GPU is well suited for compute-intensive, highly parallel computation. Just like what radar data retrieval system is about.

Before using CUDA program, with hardware part a NVDIA’s GPU at least after G80 architecture. CUDA program model is like Fig. 7. CPU is the host, GPU is the device, and these two parts work together, respectively in charge of logical parts and parallel computing tasks. CPU and GPU have their own memory and independent of each other. After assign the tasks, the parallel parts will be handed over to GPU. The CUDA function which runs on GPU is named with kernel. A complete CUDA program consists of a series of kernels from device and serial processing from host. Before the kernel is executed some configuration information are needed, like size of memory, number of thread blocks and number of threads in block.

Fig. 6.The GPU Devotes more transistors to data processing [13].

Fig. 7.CUDA program model.

In theory, with single core CPU, the processing time for every sweep costs like T=vmRay×vmGate×t. But in GPU, amount of repetitive data can be processed at same time. A lot of time can be reduced through parallel processing. The sweep processing time can become like T∝log(vmRay×vmGate)×t.

In radar retrieval process, there are two parts programed by CUDA code: data normalization and data interpolation. Because in the developing step, radar reflection intensity range is not clear, a classic parallel application is used to find data range, the reduction algorithm. Not like CPU which compares input data one by one, GPU can finish the same function by comparing multithread at a same time (Fig. 8).

Fig. 8.Find radar data range by CUDA multi-threaded parallel process.

On one level many threads will be processed at same time, the bigger one will be copy to interval i×2n+1 (i=0,1,...N) location; n is the number of comparing level. At the last the extreme value of a series of numbers will be copied to the front.

In radar data interpolation process, there are a variety of methods, Barnes interpolation, bilinear interpolation and the nearest neighbor interpolation etc. Each of them has different implement procedure, but when converts them to parallel process by CUDA, there is a basic processing model:1. Allocate video memory on device; 2. Copy the image data from host memory to device memory; 3. Configure kernel function, set number of threads and thread blocks; 4.run kernel function; 5. Copy output from device to host memory; 6. Output results and release memory space. The task of parallel code is charge of the specific interpolation algorithm, which is realized function by kernel.

All parallel function is realized in kernel, so kernel’s code is directly related with the performance of program. Different interpolation algorithm may need different number of kernels, but the number should be reduced as few as possible for avoiding the data transmission between host and device. So in order to design a high efficient program, there are three issues should be thought: 1. avoid the data transmission between different memory spaces; 2. maximize the use of all kinds of bandwidth, and make sure data alignment; 3. appropriately assign threads. Besides, after run a kernel function, the synchronous function need be executed. That can make sure all thread of device is end of run, make thread of CPU and GPU synchronous. About specific contents of realized kernel is the previous interpolation part.

 

4. EXPERIMENTAL RESULTS

According to the head information of source data, the input UF file was recorded by an X-band Doppler radar. The radar site locates Rush springs city, Oklahoma, USA. The record time is on May 14th 2009. The source file contains 10 sweeps data of a volume, and the sweep model is PPI. File recoded the corrected reflectivity factor CZ and velocity thresholded VE, which respectively reflect the possible rainfall intensity and wind speed. Paper takes the first seep for example, retrieves the CZ factor on radar image.

The experiment platform is Intel Core i5 CPU with 4 cores 2.8 GHz, 3 GB ram. The graphic card is NVIDIA GeForce GT 220. The final retrieval result is like Fig. 9. This presents the radar image before and after interpolation process. In the circle area of before interpolation image, the black pixels are no data parts. Comparing with these two images, we can find that a huge number of pixels need to be interpolated. For instance, the experimental image is 1000*1000 pixels; there are more than 2.6*106 pixels (grids) need to be reconstructed. That means the interpolation operator needs to be run 2.6*106 times. If this process can be run by parallel pattern, lots of time will be reduced [14]. So it is the most effective part for using CUDA program.

Fig. 9.Radar data interpolation (a) before interpolation, (b) after interpolation.

In the experimental step, there are two size raw image have been processed; respectively are No.1 (147 × 426) and No.2 (483 × 996). We briefly divide whole processing time into calculation time, draw image and I/O and others. In CPU cases, the time distribution of each part is like Fig. 10. From Fig. we can find that the vast majority of time is taken by interpolation process. If this part time could be reduced, the whole performance of program would be much improved.

Fig. 10.Radar retrieval times with different size raw data (a) 147×426 raw image, (b) 483x996 raw image.

The interpolation step uses same function to calculate different data. Paper re-codes this part in CUDA program. In CUDA process, the interpolation function is coded as the kernel; Kernel is the parallel processing function in CUDA. The parallel process runs on two levels, the parallel between blocks of grid and the parallel between threads of block. Data is processed on thread; thread block is a number of threads which work together synergistically. Threads have the same lifetime in block, and all thread blocks have shared memory visible to each thread in the block. The number of threads in thread block is limited, but thread blocks which process a same kernel, and have same dimensionality and size can merge to a grid of thread block. Program can assign grids with arbitrary size of two-dimensional array. Then before running program, the parallel structure needs to be initially set. At that the kernel can be run on GPU. In radar interpolation case, Fig. 11 is the time comparison, from experiment results the processing time is reduced almost 4 times and with the image size increasing the speedup ratio is also increased.

Fig. 11.Compare radar retrieval time base on CPU and GPU.

In CDUA simulation, paper mainly applied to the radar image interpolation step, as the previous mentioned, because it is the most computationally expensive step. Actually several other steps can also apply CUDA program. In data normalization and threshold step, paper normalized input gate values and classify to different color, this part contains logical operation. CUDA is not good at logical operation, but now GPU which has “1.1” compute capability[13] can process like “and, or, XOR”. And the GPU with more than “2.0” compute capability supports function pointer. It is much convenient for program. The rests can also be programed by GPU like coordinate transformation step. But computation is not as complex as interpolation, because the latter has contained IDW (Inverse distance weighting), and a large amount of calculation times of operator. So paper only applied CUDA technology on data interpolation step. And for convenience, paper used OpenCV for noise remove and radar image drawing etc.

 

5. CONCLUSIONS

This paper realized an interpolation method based on CUDA for fast weather radar data. Since the radar data file has a lot of data volume and many variables, weather radar retrieval and its interpolation processing are time consuming tasks, especially for dual polarization weather radars. Then in the first step, paper simulated weather radar imaging process by using "uf" radar file. next step, for improving processing speed, paper introduced CUDA program to calculate the dense parallel computation parts. The experiment showed performance by using CUDA platform in radar imaging processing. Paper briefly contains three parts for weather radar imaging: raw radar data reading, coordinate transformation and radar data interpolation. Through experiment in the past, people find that most of radar imaging time is spent on the third step, radar data interpolation. So paper introduced CUDA parallel programming into radar retrieval process, which is good at compute-intensive, highly parallel computation. With the help of CUDA’s parallel computing, weather radar imaging time has been much reduced, as the paper experiment achieved the desired aims. The whole processing time is improved about 4 times. As the mentioned in paper, CUDA programming only apply to the data interpolation step. Throughout the whole implementation process, several processing parts can also be calculated by using parallel model, there is still room for improvement. The future work is that applies CUDA technique in more parts and optimizes the memory coalescing of GPU, the distribution of blocks and threads, for better performance.

References

  1. J. G. Qiao, M. Song, and Y. Q. Wang, "Freeway Guidance System Design Based on Meteorological information," International Conference on Future Computer Sciences and Application (ICFCSA), pp. 97-100, Jun. 2011.
  2. M. I. Skolnik, Introduction to Radar System, 3th ed. New Delhi, ND: McGraw-Hill, 2001.
  3. M. A. Richards, Fundamentals of Radar Signal Processing, New York, NY: McGraw-Hill, 2005.
  4. D. Flores-Tapia, G. Thomas, and S. Pistorius, “A Comparison of Interpolation Methods for Breast Microwave Radar Imaging,” Engineering in Medicine and Biology Society, pp. 2735-2738, Sep. 2009.
  5. K. Shinozawa, M. Fujii, and N. Sonehara, “A Weather Radar Image Prediction Method in Local Parallel Computation,” IEEE World Congress on Computational Intelligence Neural Networks, Vol. 7, pp. 4210-4215, Jun. 1994.
  6. H. Y. Guo, J. P. Dai, and Y. F. Dai, "GPU Acceleration of Propeller MRI Using CUDA," Bioinformatics and Biomedical Engineering, pp. 1-4, Jun. 2009.
  7. S. L. Barnes, “Report on a Meeting to Establish a Common Doppler Radar Data Exchange Format,” The Bulletin of the American Metrological Society, Vol. 61, No. 11, pp. 1401-1404, 1980.
  8. IRIS Programmer’s Manual, Vaisala Oyj, Inc., Helsinki, Finland, 2013.
  9. J. Zhang, H. Ken, W. W. Xia, and J. J. Gourley, “Comparison of Objective Analysis Schemes for the WSR-88D Radar Data,” 31th International Conference on Radar Meteorology, pp. 907-910, Aug. 2003.
  10. R. Kvasov, S. Cruz-Pol, J. Colom-Ustariz, L. Leon Colon, and P. Rees, “Weather Radar Data Visualization Using First-Order Interpolation,” IEEE International on Geoscience and Remote Sensing Symposium, pp. 3574-3577, Jul. 2013.
  11. M. A. Askelson, J. P. Aubagnac, and J. M. Straka, "An Adaptation of the Barnes Filter Applied to the Objective Analysis of Radar Data," Monthly Weather Review, Vol. 128, No. 9, pp. 3050-3082, Sep. 2000. https://doi.org/10.1175/1520-0493(2000)128<3050:AAOTBF>2.0.CO;2
  12. M. J. Thurley, S. Lulea, and V. Danell. "Fast Morphological Image Processing Open-Source Extensions for GPU Processing With CUDA," IEEE Journal of Selected Topics in Signal Processing, Vol. 6, pp. 849-855, Jun. 2012. https://doi.org/10.1109/JSTSP.2012.2204857
  13. CDUA C programming Guide V6.0, NVIDIA Corporation, 2014.
  14. G. S. Song, Y. I. Yun, and W. H. Lee, "Analysis on Digital Image Composite Using Interpolation," Journal of Korea Multimedia Society, Vol. 13, No. 3, pp. 457-466, Mar. 2010.

Cited by

  1. Study about Real-time Total Monitoring Technique for Various Kinds of Multi Weather Radar Data vol.19, pp.4, 2016, https://doi.org/10.9717/kmms.2016.19.4.689
  2. Weather radar data processing on graphic cards vol.74, pp.2, 2018, https://doi.org/10.1007/s11227-017-2166-8
  3. A Case Study of the Base Technology for the Smart Grid Security: Focusing on a Performance Improvement of the Basic Algorithm for the DDoS Attacks Detection Using CUDA vol.19, pp.2, 2016, https://doi.org/10.9717/kmms.2016.19.2.411
  4. The 3D Neural Network for Improving Radar-Rainfall Estimation in Monsoon Climate vol.12, pp.5, 2015, https://doi.org/10.3390/atmos12050634