地球信息科学学报 ›› 2020, Vol. 22 ›› Issue (3): 505-515.doi: 10.12082/dqxxkx.2020.190500

• “数字地形分析”专栏 • 上一篇    下一篇

基于CUDA的地表水动态模拟并行方法

吴钱娇, 陈玉敏*()   

  1. 武汉大学资源与环境科学学院,武汉 430079
  • 收稿日期:2019-09-06 修回日期:2019-12-11 出版日期:2020-03-25 发布日期:2020-05-18
  • 通讯作者: 陈玉敏 E-mail:ymchen@whu.edu.cn
  • 作者简介:吴钱娇(1990— ),女,安徽铜陵人,博士生,主要从事数字地形分析方面的研究。E-mail:qianjiaowu@whu.edu.cn
  • 基金资助:
    国家自然科学基金项目(41671380)

A Parallel Method of Surface Flow Dynamics Simulation based on CUDA

WU Qianjiao, CHEN Yumin*()   

  1. School of Resource and Environment Science, Wuhan University, Wuhan 430079, China
  • Received:2019-09-06 Revised:2019-12-11 Online:2020-03-25 Published:2020-05-18
  • Contact: CHEN Yumin E-mail:ymchen@whu.edu.cn
  • Supported by:
    National Natural Science Foundation of China(41671380)

摘要:

如何高效地动态监测、模拟和预测地表水过程是防灾减灾中亟待解决的问题,也是科学化的国土整治、区域规划、环境保护和水资源管理的基础。因此,本文利用统一计算设备架构(CUDA)对基于不规则三角网(TIN)的地表水动态模拟算法进行并行化改进,提出了一种基于CUDA的地表水动态模拟并行方法,旨在对任意时刻的地表水进行快速、高精度的动态模拟,从而满足实际的应用需求。该算法从高精度的数字高程模型(DEM)中提取地形特征点和流域线,生成受流域线约束的TIN。在此基础上,根据TIN表面的三角面坐标数据获取水流方向,再结合任意位置的降雨源点追踪得到流水线网络。基于曼宁公式,利用流水线流速计算核函数得到每条流水线上雨滴的流速,结合预设的时间,利用汇流量统计核函数得到该时刻的地表汇流量。具体的并行化过程包括数据的传输,CUDA中线程的划分和流水线流速计算核函数和汇流量统计核函数的实现。本文选取位于加拿大新布伦瑞克西北部的BBW(Black Brook Watershed)流域作为实验样区,将该算法与改进前的方法进行对比表明,该模型在保持精度的同时,大幅提高了模拟效率,加速比达到11.2;另外,通过与SWAT(Soil and Water Assessment Tool)模型进行对比,结果表明,该并行方法的Nash系数提高了88%,相关系数提高了5%。

关键词: 数字高程模型(DEM), 统一计算设备架构(CUDA), 不规则三角网(TIN), 地表水动态模拟, 汇流量, 流水线, 流速, 加速比

Abstract:

Simulating the surface flow dynamics is of great importance in disaster prevention and mitigation, which could benefit the land remediation, regional planning, environmental protection and water resource management. Therefore, in this paper the Compute-Unified-Device-Architecture (CUDA) is embedded into the TIN-based surface flow dynamic simulation algorithm to get a parallel method for simulating the surface flow discharge. The aim of this study is to rapidly and accurately perform the surface flow dynamic simulation at any position and any time to meet the actual application requirements. First, the proposed algorithm extracts the critical points and drainage network from a high-precision Digital Elevation Model (DEM) to generate a drainage-constrained Triangulated Irregular Network (TIN). Second, the flow direction of each triangular facet over the TIN is calculated by the coordinate data of the triangular facets. Third, the flow path network is traced by the flow direction and rainfall source points. Fourth, the flow velocity of rain dropsover the flow paths is obtained by the flow velocity calculation kernel function based on the manning formula. Finally, by combing the flow velocity with the pre-set time, the algorithm can rapidly simulate the flow discharge at any location by usingthe flow discharge count kernel function. The specific paralle lization process consists of the transmission mode of data, partition model of thread and implement ation of the flow velocity calculation kernel function and flow discharge count kernel function. Data transmission in the paralle lization process includes the input and output of data. It inputs the data of the DEM, rainfall source points and flow path network from the CPU to GPU and outputs the data of the flow discharge calculated by the above two kernel functions from the GPU to CPU. The two kernel functions are parallelized by the flow paths. Each thread handles a single flow path. As a result, flow paths are divided by the partitioning method to obtain numerous thread blocks and the number of the thread in each thread block is allocated by the computing power of the GPU. The Black Brook Watershed (BBW) located in the north-eastern of New Brun swick was selected as the study area. To validate its accuracy and efficiency, the proposed method was compared with TIN-based surface flow dynamic simulation method. The experimental results demonstrate that the proposed algorithm can greatly improve the simulation efficiency while maintaining the accuracy simultaneously and its acceleration ratio can reach up to 11.2. In addition, the parallel algorithm was compared with the Soil and Water Assessment Tool (SWAT) model to verify its precision. The experimental results indicate that the Nash coefficient of the parallel method is increased by 88% and the correlation coefficient is increased by 5%.

Key words: Digital Elevation Model (DEM), Compute-Unified-Device-Architecture (CUDA), Triangulated Irregular Network (TIN), surface flow dynamic simulation, flow discharge, flow path, flow velocity, acceleration ratio