地球信息科学学报 ›› 2020, Vol. 22 ›› Issue (3): 505-515.doi: 10.12082/dqxxkx.2020.190500
收稿日期:
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
基金资助:
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:
摘要:
如何高效地动态监测、模拟和预测地表水过程是防灾减灾中亟待解决的问题,也是科学化的国土整治、区域规划、环境保护和水资源管理的基础。因此,本文利用统一计算设备架构(CUDA)对基于不规则三角网(TIN)的地表水动态模拟算法进行并行化改进,提出了一种基于CUDA的地表水动态模拟并行方法,旨在对任意时刻的地表水进行快速、高精度的动态模拟,从而满足实际的应用需求。该算法从高精度的数字高程模型(DEM)中提取地形特征点和流域线,生成受流域线约束的TIN。在此基础上,根据TIN表面的三角面坐标数据获取水流方向,再结合任意位置的降雨源点追踪得到流水线网络。基于曼宁公式,利用流水线流速计算核函数得到每条流水线上雨滴的流速,结合预设的时间,利用汇流量统计核函数得到该时刻的地表汇流量。具体的并行化过程包括数据的传输,CUDA中线程的划分和流水线流速计算核函数和汇流量统计核函数的实现。本文选取位于加拿大新布伦瑞克西北部的BBW(Black Brook Watershed)流域作为实验样区,将该算法与改进前的方法进行对比表明,该模型在保持精度的同时,大幅提高了模拟效率,加速比达到11.2;另外,通过与SWAT(Soil and Water Assessment Tool)模型进行对比,结果表明,该并行方法的Nash系数提高了88%,相关系数提高了5%。
吴钱娇, 陈玉敏. 基于CUDA的地表水动态模拟并行方法[J]. 地球信息科学学报, 2020, 22(3): 505-515.DOI:10.12082/dqxxkx.2020.190500
WU Qianjiao, CHEN Yumin. A Parallel Method of Surface Flow Dynamics Simulation based on CUDA[J]. Journal of Geo-information Science, 2020, 22(3): 505-515.DOI:10.12082/dqxxkx.2020.190500
"
算法 1 流水线流速计算核函数 |
---|
Input: number of the flow lines (e.g. flineNum), the location of the flow line (e.g. flineTrackSize[]), the break points of the flow line (e.g. flowTrack[]),range of the DEM (e.g. xMin, Ymax), the resolution of the DEM (e.g. dx, dy), the width of the DEM (e.g. imgWidth), the runoff of the rainfall source points (e.g. rVal) 1: idx = blockIdx.x * blockDim.x + threadIdx.x 2: idy = threadIdx.y 3: id= idy*(gridDim.x * blockDim.x) + idx 4: ifid>flineNum 5: terminate 6:ifid > 0 7: Calculate the index of the flow line over flow track network (e.g. flineStart = flineTrackSize[id-1]) 8: Calculate the start point of the flow line over flow track network (e.g. sP = flowTrack[flineStart) 9: Calculate the column and row of the start point (e.g. col = (sP.x-xMin)/dx, row = (yMax-sP.y)/dy) 10: Calculate the runoff of the start point (e.g. pRVal = rVal[row*imgWidth+col]) 11:ifpRVal> 0 12:Calculate the flow velocity by the Manning’s equation 13: Calculate the discharge of the start point’s location after time interval (e.g. fVal[]=pRVal) |
Obtain: the discharge of all of the start points after everytime interval(e.g. fVal[]) |
"
算法 2 汇流量统计核函数 |
---|
Input: number of the flow lines (e.g. flineNum), the location of the flow line (e.g. flineTrackSize[]),the width of height of the DEM (e.g. imgWidth, imgHeight),range of the DEM (e.g. xMin, Ymax), the resolution of the DEM (e.g. dx, dy), the width of the DEM (e.g. imgWidth), the discharge of all of the start pointsafter every time interval(e.g. fVal[]) 1: idx = blockIdx.x * blockDim.x + threadIdx.x 2: idy = threadIdx.y 3: id = idy*(gridDim.x * blockDim.x) + idx 4: if id >flineNum 5: terminate 6: Calculate the index of the flow line over flow track network (e.g. flineStart = flineTrackSize[id-1]) 7: Calculating the index of all of the raindrops (e.g. runP=flowTracks[flineStart+rainIdx[]]) 8: Calculate the row and height of all the raindrops(e.g. col= (runP.x-xMin)/dx, row= (yMax-runP.y)/dy) 9: Calculate the discharge of all grid cells (e.g. pOutDis[]+=fVal[]) |
Output: the discharge of all grid cells (e.g. pOutDis[]) |
表2
BBW流域出口水汇流量模拟精度的评价对比结果"
阈值/m | 算法 | 模型 | 降雨源点尺度/m | ||||
---|---|---|---|---|---|---|---|
10 | 15 | 20 | 25 | 30 | |||
0.5 | 基于TIN的地表 水动态模拟算法 | N | 0.77 | 0.77 | 0.77 | 0.77 | 0.77 |
R | 0.91 | 0.91 | 0.91 | 0.91 | 0.91 | ||
B | 1.30 | 1.31 | 1.31 | 1.30 | 1.30 | ||
基于CUDA的地表水动态模拟并行方法 | N | 0.77 | 0.77 | 0.77 | 0.77 | 0.77 | |
R | 0.91 | 0.91 | 0.91 | 0.91 | 0.91 | ||
B | 1.30 | 1.31 | 1.31 | 1.30 | 1.30 | ||
1.0 | 基于TIN的地表 水动态模拟算法 | N | 0.77 | 0.77 | 0.77 | 0.77 | 0.77 |
R | 0.91 | 0.91 | 0.91 | 0.91 | 0.91 | ||
B | 1.31 | 1.31 | 1.31 | 1.31 | 1.31 | ||
基于CUDA的地表水动态模拟并行方法 | N | 0.77 | 0.77 | 0.77 | 0.77 | 0.77 | |
R | 0.91 | 0.91 | 0.91 | 0.91 | 0.91 | ||
B | 1.31 | 1.31 | 1.31 | 1.31 | 1.31 | ||
1.5 | 基于TIN的地表 水动态模拟算法 | N | 0.77 | 0.77 | 0.77 | 0.77 | 0.77 |
R | 0.91 | 0.91 | 0.91 | 0.91 | 0.91 | ||
B | 1.31 | 1.31 | 1.32 | 1.32 | 1.31 | ||
基于CUDA的地表水动态模拟并行方法 | N | 0.77 | 0.77 | 0.77 | 0.77 | 0.77 | |
R | 0.91 | 0.91 | 0.91 | 0.91 | 0.91 | ||
B | 1.31 | 1.31 | 1.32 | 1.32 | 1.31 | ||
2.0 | 基于TIN的地表 水动态模拟算法 | N | 0.77 | 0.77 | 0.77 | 0.77 | 0.77 |
R | 0.91 | 0.91 | 0.91 | 0.91 | 0.91 | ||
B | 1.31 | 1.32 | 1.31 | 1.32 | 1.31 | ||
基于CUDA的地表水动态模拟并行方法 | N | 0.77 | 0.77 | 0.77 | 0.77 | 0.77 | |
R | 0.91 | 0.91 | 0.91 | 0.91 | 0.91 | ||
B | 1.31 | 1.32 | 1.31 | 1.32 | 1.31 | ||
2.5 | 基于TIN的地表 水动态模拟算法 | N | 0.77 | 0.77 | 0.77 | 0.77 | 0.77 |
R | 0.91 | 0.91 | 0.91 | 0.91 | 0.91 | ||
B | 1.31 | 1.31 | 1.32 | 1.32 | 1.32 | ||
基于CUDA的地表水动态模拟并行方法 | N | 0.77 | 0.77 | 0.77 | 0.77 | 0.77 | |
R | 0.91 | 0.91 | 0.91 | 0.91 | 0.91 | ||
B | 1.31 | 1.31 | 1.32 | 1.32 | 1.32 |
表4
BBW流域出口水汇流量模拟的运行时间统计结果"
阈值/m | 算法 | 降雨源点尺度/m | ||||
---|---|---|---|---|---|---|
10 | 15 | 20 | 25 | 30 | ||
0.5 | 基于TIN的地表水动态模拟算法 | 953.82 | 425.37 | 278.18 | 213.77 | 169.77 |
基于CUDA的地表水动态模拟并行方法 | 93.16 | 43.49 | 28.34 | 22.72 | 19.00 | |
1.0 | 基于TIN的地表水动态模拟算法 | 912.16 | 407.40 | 278.21 | 203.25 | 159.87 |
基于CUDA的地表水动态模拟并行方法 | 86.32 | 42.75 | 27.72 | 21.23 | 18.47 | |
1.5 | 基于TIN的地表水动态模拟算法 | 899.07 | 395.99 | 267.96 | 196.33 | 159.60 |
基于CUDA的地表水动态模拟并行方法 | 80.51 | 41.88 | 27.23 | 20.74 | 17.88 | |
2.0 | 基于TIN的地表水动态模拟算法 | 893.92 | 396.22 | 270.80 | 198.07 | 159.21 |
基于CUDA的地表水动态模拟并行方法 | 86.14 | 43.86 | 28.01 | 21.39 | 17.95 | |
2.5 | 基于TIN的地表水动态模拟算法 | 892.59 | 400.38 | 260.40 | 199.60 | 164.56 |
基于CUDA的地表水动态模拟并行方法 | 85.61 | 43.60 | 27.77 | 20.80 | 17.29 |
[1] | Beven K J, Warren R, Zaoui J . SHE: Towards a methodology for physically-based distributed forecasting in hydrology[J]. Hydrological Forecasting (IAHS Publication), 1980,129:133-137. |
[2] | Abbott M B, Bathurst J C, Cunge J A , et al. An introduction to the European hydrological system-systemehydrologiqueEuropeen, ‘SHE’, 1: History and philosophy of a physically-based, distributed modelling system[J]. Journal of Hydrology, 1986,87:45-59. |
[3] | Bathurst J C, Wicks J M, Connell P E. The SHE/SHESED basin scale water flow and sediment transport modelling system. In: V.P. Singh, eds. Computer models of watershed hydrology[J]. Highlands Ranch, CO: Water Resources Publication , 1995: 563-594. |
[4] | Refsgaard J C, Storm B, Mike S, Singh. Computer models of watershed hydrology[C]. Highlands Ranch, CO: Water Resources Publication, 1995: 809-846. |
[5] |
Beven K J, Kirkby M J . A physically based, variable contributing area model of basin hydrology[J]. Hydrological Sciences Bulletin, 1979,24:43-69.
doi: 10.1016/j.scitotenv.2006.12.013 pmid: 17258794 |
[6] | Arnold J G, Srinivasan R, Muttiah R R , et al. Large area hydrologic modeling and assessment part I: model development[J]. Journal of American Water Resources Association, 1998,34(1):73-89. |
[7] | Bates P D, DE ROO A P J. A simple raster-based model for flood inundation simulation[J]. Journal of Hydrology, 2000,236(1-2):54-77. |
[8] | 王纲胜, 夏军, 谈戈 , 等. 潮河流域时变增益分布式水循环模型研究[J]. 地理科学进展, 2002,21(6):573-582. |
[ Wang G S, Xia J, Tan G , et al. A research on distributed time variant gain model: A case study on Chaoheriver basin[J]. Progress in Geography, 2002,21(6):573-582. ] | |
[9] | Lopez-Vicente M, Perez-Bielsa C, Lopez-Montero T , et al. Runoff simulation with eight different flow accumulation algorithms Recommendations using a spatially distributed and open-source model[J]. Environmental Modelling & Software, 2014,62:11-21. |
[10] | Chen Y, Zhou Q, Li S , et al. The simulation of surface flow dynamics using a flow-path network model[J]. International Journal of Geographical Information Science, 2014,28(11):2242-2260. |
[11] | Romanowicz R, Beven K, Moore R . GIS and distributed hydrological models[J] //Mather P. Geographical information handling-research and applications Chichester[C]. UK: John Wiley & Sons, 1993: 197-205. |
[12] | Shoemaker L, Dai T, Koenig J . TMDL Model Evaluation and Research Needs[M]. Newyork: The US Environmental Protection Agency, 2005. |
[13] | Kumar N, Singh SK, Srivastava PK , et al. SWAT Model calibration and uncertainty analysis for streamflow prediction of the Tons River Basin, India, using Sequential Uncertainty Fitting (SUFI-2) algorithm[J]. Modeling Earth Systems and Environment, 2017,3(1):30. |
[14] | Das B, Jain S, Singh S , et al. Evaluation of multisite performance of SWAT model in the Gomti River Basin, India[J]. Applied Water Science, 2019,9(5):134. |
[15] | Van Der Knijff J M, Younis J, De Roo A P J. Lisflood: A GIS-based distributed model for river basin scale water balance and flood simulation[J]. International Journal of Geographical Information Science, 2010,24(2):189-212. |
[16] | 蔡明勇 . DTVGM模型参数的遥感驱动研究与应用[D]. 北京:北京师范大学, 2011: 14-16. |
[ Cai M Y . Remote sensing based DTVGM and its application[D]. Beijing: Beijing Normal University, 2011: 14-16.] | |
[17] | Tucker G E, Lancaster S T, Gasparini N M , et al. The channel-hillslope integrated landscape development (CHILD) model[M]. In: Harmon R S, W Doe. Landscape erosion and evolution modelling. Dordrecht: Kluwer Academic/Plenum Publishers, 2001: 349-388. |
[18] | Vivoni E R, Teles V, Ivanov V Y , et al. Embedding landscape processes into triangulated terrain models[J]. International Journal of Geographical Information Science, 2005,19(4):429-457. |
[19] | Zhou Q, Pilesjö P, Chen Y . Estimating surface flow paths on a digital elevation model using a triangular facet network[J]. Water Resources Research, 2011,47(7):40. |
[20] | Zhou Q, Chen Y . Generalization of DEM for terrain analysis using a compound method[J]. ISPRS Journal of Photogrammetry and Remote Sensing, 2011,66(1):38-45. |
[21] | 陈玉敏, 吴钱娇, 巴倩倩 , 等. 多尺度地表水动态模拟及应用[J]. 测绘学报, 2015,44(S0):36-41. |
[ Chen Y M, Wu Q J, Ba Q Q , et al. Application research of multi-scale simulation of surface flowdynamics[J]. Acta Geodaetica et Cartographica Sinica, 2015,44(S0):36-41.] | |
[22] | Schenk O, Christen M, Burkhart H . Algorithmic performance studies on graphics processing units[J]. Journal of Parallel and Distributed Computing, 2008,68(10):1360-1369. |
[23] | Mielikainen J, Huang B, Wang J , et al. Compute unified device architecture (CUDA)-based parallelization of WRF Kessler cloud microphysics scheme[J]. Computers and Geosciences, 2013,52:292-299. |
[24] | NVIDIA Corporation. NVIDIA CUDA C Best Practice Guide[M]. Santa Clara, California: NVIDIA Corporation, 2010. |
[25] | NVIDIA Corporation. NVIDIA CUDA C Programming Guide[M]. Santa Clara, California: NVIDIA Corporation, 2010. |
[26] | Abouali M, Timmermans J, Castillo J E , et al. A high performance GPU implementation of Surface Energy Balance System (SEBS) based on CUDA-C[J]. Environmental Modelling and Software, 2013,41:134-138. |
[27] | Xia X, Liang Q . A GPU-accelerated smoothed particle hydrodynamics (SPH) model for the shallow water equations[J]. Environmental Modelling and Software, 2016,75:28-43. |
[28] | Zhu H, He L, Leeke M , et al. WolfGraph: The edge-centric graph processing on GPU[J]. Future Generation Computer Systems, 2019. |
[29] | 王浩, 王含宇, 杨名宇 , 等. Retinex图像增强在GPU平台上的实现[J]. 地球信息科学学报, 2019,21(4):623-629. |
[ Wang H, Wang H Y, Yang M Y , et al. Implementation of Retineximage enhancement algorithm on GPU platform[J]. Journal of Geo-information science, 2019,21(4):623-629. ] | |
[30] | Pascal G, Pascal O, Camille D , et al. Ray-tracing of GNSS signal through the atmosphere powered by CUDA, HMPP and GPUs technologies[J]. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 2014,7(5):1592-1602. |
[31] | Chang F, Zhao Y, Liu S . CUDA parallel algorithm for CVA change detection of remote sensing imagery[J]. Journal of Remote Sensing, 2016,20(1):114-128. |
[32] | 刘扬, 付征叶, 郑逢斌 . 高分辨率遥感影像目标分类与识别研究进展[J]. 地球信息科学学报, 2015,17(9):1080-1091. |
[ Liu Y, Fu Z Y, Zheng F B . Review on high resolution remote sensing image classification and recognition[J]. Journal of Geo-information science, 2015,17(9):1080-1091. ] | |
[33] | Qin C, Zhan L . Parallelizing flow-accumulation calculations on graphics processing units from iterative DEM preprocessing algorithm to recursive multiple-flow-direction algorithm[J]. Computers & Geosciences, 2012,43:7-16. |
[34] | Ortega L, Rueda A J . Parallel drainage network computation on CUDA[J]. Computers & Geosciences, 2010,36:171-178. |
[35] | Rueda A J, Jose M N, Adrian L . A comparison of native GPU computing versus OpenACC for implementing flow-routing algorithms in hydrological applications[J]. Computers & Geosciences, 2016,87:91-100. |
[36] | 赵向辉, 苗青, 付忠良 , 等. 基于CUDA的汇流分析并行算法的研究与方法[J]. 计算机应用研究, 2010,27(7):2445-2451. |
[ Zhao X H, Miao Q, Fu Z L , et al. Research and realization in parallel algorithm of confluence analysis based on CUDA[J]. Application Research of Computers, 2016,87:91-100. ] | |
[37] | Carlotto T, da Silva R V, Grzybowski J M V . A GPGPU-accelerated implementation of groundwater flow model in unconfined aquifers for heterogeneous and anisotropic media[J]. Environmental Modelling and Software, 2018,101:64-72. |
[38] | Wu Q, Chen Y, Wilson J P , et al. An effective parallelization algorithm for DEM generalization based on CUDA[J]. Environmental Modelling & Software, 2019,114:64-74. |
[39] |
O’Callaghan J F, Mark D M . The extraction of drainage networks from digital elevation data[J]. Computer Vision, Graphics and Image Processing, 1984,28:328-344.
doi: 10.1186/s40064-016-3207-0 pmid: 27652117 |
[40] | Chen Z, Guevara J. Systematic selection of very important points (VIP) fromdigital terrain model for constructing triangular irregular networks[C]. In: Proc.8th International Symposium on Computer-Assisted Cartography, AutoCarto 8, Baltimore, MD, 1987. |
[41] | Chang K . Introduction to Geographic Information Systems, 4th ed[M]. New York: McGraw-Hill, 2007. |
[42] | 国家测绘局测绘标准化研究所. CH/T1008—2001基础地理信息数字产品1:10 000, 1:50 000数字高程模型[S]. 北京:国家测绘局, 2001. |
[ State Bureau of Surveying and Mapping. 1:10000 and 1:50000 digital elevation model. The Basic Digital Geographical Information Product, Standard CH/T 1008-2001[S]. Beijing: The State Bureau of Surveying and Mapping of China, 2001. ] | |
[43] | 刘学军, 卢华兴, 卞璐 , 等. 基于DEM的河网提取算法的比较[J]. 水利学报, 2006,37(9):1134-1141. |
[ Liu X J, Lu H X, Bian L , et al. Comparison of algorithms for extracting drainage network from grid-based digital elevation model[J]. Journal of Hydraulic Engineering, 2006,37(9):1134-1141. ] | |
[44] | 金鑫, 金彦香, 杨登兴 . SWAT模型在土地利用/覆被变化剧烈地区的改进与应用[J]. 地球信息科学学报, 2018,20(8):1064-1073. |
[ Jin X, Jin Y X, Yang D X . Improved SWAT and its application to a region with severe land use/land cover changes[J]. Journal of Geo-information science, 2018,20(8):1064-1073. ] | |
[45] | Thavhana M P, Savage M J, Moeletsi M E . SWAT model uncertainty analysis, calibration and validation for runoff simulation in the Luvuvhu River catchment, South Africa[J]. Physics and Chemistry of the Earth, 2018,105:115-124. |
[1] | 顾文亚, 孟祥瑞, 朱晓晨, 邱新法. 基于BEMD分解的地貌分类研究[J]. 地球信息科学学报, 2020, 22(3): 464-473. |
[2] | 齐琳, 沈婕, 郭立帅, 周侗. 面向D-TIN并行构建的动态条带数据划分方法与实验分析[J]. 地球信息科学学报, 2012, 14(1): 55-61. |
[3] | 夏清, 刘登忠, 石勇. 遥感图像三维地形景观可视化的实现——以西藏赛利普地区为例[J]. 地球信息科学学报, 2007, 9(5): 121-123. |
[4] | 胡斌, 江南, 邹志强, 邵华, 王鹏. 大规模室外动态场景调度机制研究[J]. 地球信息科学学报, 2007, 9(5): 8-13. |
|