Combining an R-Based Evolutionary Algorithm and Hydrological Model for Effective Parameter Calibration
Abstract
:1. Introduction
2. Combining the R-Based SCE Algorithm and GRM
2.1. Shuffled Complex Evolution Algorithm
2.2. Grid-Based Rainfall–Runoff Model
2.3. Combination of the GRM and the SCE Algorithm
- First, users download the hydromad package from the website (http://hydromad.catchment.org) and install it. Users then use the “library” function to load the hydromad package. After that, users read the observed flow time series data for parameter calibration using R. The SCE algorithm adjusts the parameter values so that the simulated flow time series is as close as possible to this observed flow time series.
- Second, users set a range of parameters for the hydrological model using the R script in the second step. Since the SCE algorithm finds optimal parameter values within selected ranges of parameters, careful consideration should be given to whether the ranges of parameters are physically valid. Users can create a parameter list using the R script in the second step (see “parlist”) and set the upper, lower and initial values of the parameters for parameter calibration.
- Third, users can control the options of the SCE algorithm, such as the number of complexes and the maximum number of iterations. In this study, we used 20 number of complexes and 5 maximum number of iterations by considering the complexity of GRM. Users must select a function scale of −1 (see “control”) to ensure that the parameters have the optimal values when the value of the objective function is maximum. Users can also use the trace option to check the parameter tracking process in real time (see “control$trace”).
- The fourth step is the step of linking the EXE file of the GRM with the R-based SCE algorithm. Users can perform this process by modifying the source code of the R-based SCE algorithm in the hydromad package. For a detailed description of this step, first set the initial best model (“bestModel” that is a model simulation) and best objective function values (“bestFunVal”) using the R script (see “Set best model and best objective function values”). Then we modified the “do_sce” function in the hydromad package to update the GRM’s 9 initial parameter values to the GRM project file (.gmp) (see “Update GRM parameters” and “Read ‘.gmp’ file that contains information including parameter values and location of geophysical input data”). After that, we used the updated GRM parameters (ds500_E201107.gmp) and the EXE file of the GRM (GRM.exe) for GRM simulation by “system” function (see “Run GRM”). The result of GRM simulation is stored in “thisMod”. Then, the observed flow time series (Q) and simulated flow time series by GRM (X) are used to calculate the objective function value (“r.squared” that is the NSE of this study) by “hmadstat” function in the hydromad package. The calculated objective function value is stored in “thisVal”. If “thisMod” and “thisVal” are best values for each iteration, they are updated as “bestModel” and “bestFunVal”, respectively.
- Finally, the modified do_sce function, upper limit, lower limit, initial parameter values, and control option are put into the SCEoptim function and the optimal parameter values are estimated through the evolution process.
3. Catchments and Input Data
3.1. Catchments
3.2. Geographical and Hydrological Data
4. Results and Discussion
5. Conclusions
Author Contributions
Funding
Conflicts of Interest
Appendix A
## Load Hydromad package in R library(hydromad) ## Read observed flow data for calibration (e.g., observed flow of Event 1 for Danseong catchment) qdat <- read.csv(“q_ds500_E201107.csv”, sep = “,”)
## Set GRM parameter range IniSaturation <- c(0, 1) MinSlopeOF <- c(0.0001, 0.01) MinSlopeChBed <- c(0.0001, 0.01) ChRoughness <- c(0.008, 0.2) CalCoefLCRoughness <- c(0.6, 1.3) CalCoefPorosity <- c(0.9, 1.1) CalCoefWFSuctionHead <- c(0.25, 4) CalCoefHydraulicK <- c(0.05, 20) CalCoefSoilDepth <- c(0.8, 1.2) ## Generate parameter list parlist <- list(IniSaturation = IniSaturation, MinSlopeOF = MinSlopeOF, MinSlopeChBed = MinSlopeChBed, ChRoughness = ChRoughness, CalCoefLCRoughness = CalCoefLCRoughness, CalCoefPorosity = CalCoefPorosity, CalCoefWFSuctionHead = CalCoefWFSuctionHead, CalCoefHydraulicK = CalCoefHydraulicK, CalCoefSoilDepth = CalCoefSoilDepth) ## Set lower and upper limits of the parameters lower <- sapply(parlist, min) upper <- sapply(parlist, max) ## Select initial parameter values initpars <- sapply(parlist, mean)
## Set SCE control option for numbers of complex and maximum iterations
control = list(trace = 1, ncomplex = 20, maxit = 5)
## Set function scale, maximization by default
control = modifyList(list(fnscale = -1), control)
## Set trace option, 1 represents trace implementation
if (isTRUE(hydromad.getOption(“trace”)))
control$trace <- 1
## Set best model and best objective function values bestModel <- NULL bestFunVal <- Inf*control$fnscale ## Modified do_sce function for GRM parameter optimization do_sce <- function(pars) { ## Update GRM parameters update_IniSaturation <- pars[1] update_MinSlopeOF <- pars[2] update_MinSlopeChBed <- pars[3] update_ChRoughness <- pars[4] update_CalCoefLCRoughness <- pars[5] update_CalCoefPorosity <- pars[6] update_CalCoefWFSuctionHead <- pars[7] update_CalCoefHydraulicK <- pars[8] update_CalCoefSoilDepth <- pars[9] ## Read ’.gmp’ file that contains information including parameter values and location of geophysical input data dat_gmp <- readLines(“ds500_E201107.gmp”) dat_gmp[72] <- paste(“<IniSaturation>”, update_IniSaturation, “</IniSaturation>”, collapse = “, ”, sep = “”) dat_gmp[73] <- paste(“<MinSlopeOF>”, update_MinSlopeOF, “</MinSlopeOF>”, collapse = “, ”, sep = “”) dat_gmp[74] <- paste(“<MinSlopeChBed>”, update_MinSlopeChBed, “</MinSlopeChBed>”, collapse = “, ”, sep = “”) dat_gmp[76] <- paste(“<ChRoughness>”, update_ChRoughness, “</ChRoughness>”, collapse = “,”, sep = “”) dat_gmp[79] <- paste(“<CalCoefLCRoughness>”, update_CalCoefLCRoughness, “</CalCoefLCRoughness>”, collapse = “,”, sep = “”) dat_gmp[80] <- paste(“<CalCoefPorosity>”, update_CalCoefPorosity, “</CalCoefPorosity>”, collapse = “,”, sep = “”) dat_gmp[81] <- paste(“<CalCoefWFSuctionHead>”, update_CalCoefWFSuctionHead, “</CalCoefWFSuctionHead>”, collapse = “,”, sep = “”) dat_gmp[82] <- paste(“<CalCoefHydraulicK>”, update_CalCoefHydraulicK, “</CalCoefHydraulicK>”, collapse = “, ”, sep = “”) dat_gmp[83] <- paste(“<CalCoefSoilDepth>”, update_CalCoefSoilDepth, “</CalCoefSoilDepth>”, collapse = “, ”, sep = “”) write(dat_gmp, file = “ds500_E201107.gmp”) ## Run GRM system(“GRM.exe ds500_E201107.gmp”) thisMod <- read.table(“ds500_E201107Discharge.out”) colnames(thisMod) <- “X” ## Calculate objective function value (e.g., NSE) thisVal <- hmadstat(“r.squared”)(Q = qdat$Q, X = thisMod$X) ## For usage of other objective functions such as root mean squared error (RMSE), relative bias (rel.bias), NSE using square-root transformed data (r.sq.sqrt), and NSE using log transformed data (r.sq.log) thisVal <- hmadstat(“RMSE”)(Q = qdat$Q, X = thisMod$X) thisVal <- hmadstat(“rel.bias”)(Q = qdat$Q, X = thisMod$X) thisVal <- hmadstat(“r.sq.sqrt”)(Q = qdat$Q, X = thisMod$X) thisVal <- hmadstat(“r.sq.log”)(Q = qdat$Q, X = thisMod$X) ## Get best model and best objective function value for each iteration if (isTRUE(thisVal*control$fnscale < bestFunVal*control$fnscale)) { bestModel <<- thisMod bestFunVal <<- thisVal } return(thisVal) }
## Optimize parameters by SCEoptim in Hydromad package, which is the main code of SCE algorithm ans <- SCEoptim(do_sce, initpars, lower = lower, upper = upper, control = control)
References
- Abbott, M.B.; Bathurst, J.C.; Cunge, J.A.; O’Connell, P.E.; Rasmussen, J. An introduction to the European Hydrological System—Systeme Hydrologique Europeen, “SHE”, 1: History and philosophy of a physically-based, distributed modelling system. J. Hydrol. 1986, 87, 45–59. [Google Scholar] [CrossRef]
- Refsgaard, J.C.; Storm, B. Construction, calibration and validation of hydrological models. In Distributed Hydrological Modelling; Springer: Dordrecht, The Netherlands, 1990; pp. 41–54. [Google Scholar]
- Eckhardt, K.; Arnold, J.G. Automatic calibration of a distributed catchment model. J. Hydrol. 2001, 251, 103–109. [Google Scholar] [CrossRef]
- Lee, H.; McIntyre, N.; Wheater, H.; Young, A. Selection of conceptual models for regionalisation of the rainfall–runoff relationship. J. Hydrol. 2005, 312, 125–147. [Google Scholar] [CrossRef]
- Sahoo, G.B.; Ray, C.; De Carlo, E.H. Calibration and validation of a physically distributed hydrological model, MIKE SHE, to predict streamflow at high frequency in a flashy mountainous Hawaii stream. J. Hydrol. 2006, 327, 94–109. [Google Scholar] [CrossRef]
- Luo, Q. A distributed surface flow model for watersheds with large water bodies and channel loops. J. Hydrol. 2007, 337, 172–186. [Google Scholar] [CrossRef]
- Naik, M.G.; Rao, E.P.; Eldho, T.I. A kinematic wave based watershed model for soil erosion and sediment yield. Catena 2009, 77, 256–265. [Google Scholar] [CrossRef]
- Pianosi, F.; Ravazzani, G. Assessing rainfall–runoff models for the management of Lake Verbano. Hydrol. Process. 2010, 24, 3195–3205. [Google Scholar] [CrossRef]
- Shih, D.S.; Yeh, G.T. Identified model parameterization, calibration, and validation of the physically distributed hydrological model WASH123D in Taiwan. J. Hydrol. Eng. 2010, 16, 126–136. [Google Scholar] [CrossRef]
- Smith, M.B.; Koren, V.; Zhang, Z.; Zhang, Y.; Reed, S.M.; Cui, Z.; Anderson, E.A. Results of the DMIP 2 Oklahoma experiments. J. Hydrol. 2012, 418, 17–48. [Google Scholar] [CrossRef] [Green Version]
- Andrews, F.T.; Croke, B.F.; Jakeman, A.J. An open software environment for hydrological model assessment and development. Environ. Model. Softw. 2011, 26, 1171–1185. [Google Scholar] [CrossRef]
- Shin, M.J.; Guillaume, J.H.; Croke, B.F.; Jakeman, A.J. Addressing ten questions about conceptual rainfall–runoff models with global sensitivity analyses in R. J. Hydrol. 2013, 503, 135–152. [Google Scholar] [CrossRef]
- Hughes, J.D.; Dutta, D.; Vaze, J.; Kim, S.S.H.; Podger, G. An automated multi-step calibration procedure for a river system model. Environ. Model. Softw. 2014, 51, 173–183. [Google Scholar] [CrossRef]
- Vervoort, R.W.; Miechels, S.F.; van Ogtrop, F.F.; Guillaume, J.H. Remotely sensed evapotranspiration to calibrate a lumped conceptual model: Pitfalls and opportunities. J. Hydrol. 2014, 519, 3223–3236. [Google Scholar] [CrossRef]
- Shin, M.J.; Guillaume, J.H.; Croke, B.F.; Jakeman, A.J. A review of foundational methods for checking the structural identifiability of models: Results for rainfall–runoff. J. Hydrol. 2015, 520, 1–16. [Google Scholar] [CrossRef]
- Oyerinde, G.T.; Wisser, D.; Hountondji, F.C.; Odofin, A.J.; Lawin, A.E.; Afouda, A.; Diekkrüger, B. Quantifying uncertainties in modeling climate change impacts on hydropower production. Climate 2016, 4, 34. [Google Scholar] [CrossRef]
- Badjana, H.M.; Fink, M.; Helmschrot, J.; Diekkrüger, B.; Kralisch, S.; Afouda, A.A.; Wala, K. Hydrological system analysis and modelling of the Kara River basin (West Africa) using a lumped metric conceptual model. Hydrol. Sci. J. 2017, 62, 1094–1113. [Google Scholar] [CrossRef]
- Guo, D.; Westra, S.; Maier, H.R. Impact of evapotranspiration process representation on runoff projections from conceptual rainfall–runoff models. Water Resour. Res. 2017, 53, 435–454. [Google Scholar] [CrossRef]
- Oyerinde, G.T.; Fademi, I.O.; Denton, O.A. Modeling runoff with satellite-based rainfall estimates in the Niger basin. Cogent Food Agric. 2017, 3, 1363340. [Google Scholar] [CrossRef]
- Rossi, R.J.; Bain, D.J.; Elliott, E.M.; Divers, M.; O’neill, B. Hillslope soil water flowpaths and the dynamics of roadside soil cation pools influenced by road deicers. Hydrol. Process. 2017, 31, 177–190. [Google Scholar] [CrossRef]
- Stumpf, F.; Goebes, P.; Schmidt, K.; Schindewolf, M.; Schönbrodt-Stitt, S.; Wadoux, A.; Scholten, T. Sediment reallocations due to erosive rainfall events in the Three Gorges Reservoir Area, Central China. Land Degrad. Dev. 2017, 28, 1212–1227. [Google Scholar] [CrossRef]
- Berezowski, T.; Nossent, J.; Chormański, J.; Batelaan, O. Spatial sensitivity analysis of snow cover data in a distributed rainfall–runoff model. Hydrol. Earth Syst. Sci. 2015, 19, 1887–1904. [Google Scholar] [CrossRef]
- Skinner, C.J.; Bellerby, T.J.; Greatrex, H.; Grimes, D.I. Hydrological modelling using ensemble satellite rainfall estimates in a sparsely gauged river basin: The need for whole-ensemble calibration. J. Hydrol. 2015, 522, 110–122. [Google Scholar] [CrossRef]
- Gyasi-Agyei, Y. Realistic sampling of anisotropic correlogram parameters for conditional simulation of daily rainfields. J. Hydrol. 2016, 556, 1064–1077. [Google Scholar] [CrossRef]
- Hughes, J.D.; Kim, S.S.H.; Dutta, D.; Vaze, J. Optimization of a multiple gauge, regulated river-system model. A system approach. Hydrol. Process. 2016, 30, 1955–1967. [Google Scholar] [CrossRef]
- Guo, D.; Westra, S.; Maier, H.R. An inverse approach to perturb historical rainfall data for scenario-neutral climate impact studies. J. Hydrol. 2018, 556, 877–890. [Google Scholar] [CrossRef]
- Duan, Q.; Sorooshian, S.; Gupta, V. Effective and efficient global optimization for conceptual rainfall–runoff models. Water Resour. Res. 1992, 28, 1015–1031. [Google Scholar] [CrossRef]
- Duan, Q.Y.; Gupta, V.K.; Sorooshian, S. Shuffled complex evolution approach for effective and efficient global minimization. J. Optim. Theory Appl. 1993, 76, 501–521. [Google Scholar] [CrossRef]
- Choi, Y.S.; Choi, C.K.; Kim, H.S.; Kim, K.T.; Kim, S. Multi-site calibration using a grid-based event rainfall–runoff model: A case study of the upstream areas of the Nakdong River basin in Korea. Hydrol. Process. 2015, 29, 2089–2099. [Google Scholar] [CrossRef]
- Nicklow, J.; Reed, P.; Savic, D.; Dessalegne, T.; Harrell, L.; Chan-Hilton, A.; Zechman, E. State of the art for genetic algorithms and beyond in water resources planning and management. J. Water Res. Plan. Manag. 2010, 136, 412–432. [Google Scholar] [CrossRef]
- Serrat-Capdevila, A.; Scott, R.L.; Shuttleworth, W.J.; Valdés, J.B. Estimating evapotranspiration under warmer climates: Insights from a semi-arid riparian system. J. Hydrol. 2011, 399, 1–11. [Google Scholar] [CrossRef]
- Moreno, H.A.; Vivoni, E.R.; Gochis, D.J. Utility of quantitative precipitation estimates for high resolution hydrologic forecasts in mountain watersheds of the Colorado Front Range. J. Hydrol. 2012, 438, 66–83. [Google Scholar] [CrossRef]
- Shin, M.J.; Eum, H.I.; Kim, C.S.; Jung, I.W. Alteration of hydrologic indicators for Korean catchments under CMIP5 climate projections. Hydrol. Process. 2016, 30, 4517–4542. [Google Scholar] [CrossRef]
- Shin, M.J.; Kim, C.S. Assessment of the suitability of rainfall–runoff models by coupling performance statistics and sensitivity analysis. Hydrol. Res. 2017, 48, 1192–1213. [Google Scholar] [CrossRef]
- Nelder, J.A.; Mead, R. A simplex method for function minimization. Comput. J. 1965, 7, 308–313. [Google Scholar] [CrossRef]
- Price, W.L. Global optimization algorithms for a CAD workstation. J. Optim. Theory Appl. 1987, 55, 133–146. [Google Scholar] [CrossRef]
- Holland, J.H. Adaptation in Natural and Artificial System: An Introduction with Application to Biology, Control and Artificial Intelligence; Michigan University Press: Ann Arbor, MI, USA, 1975. [Google Scholar]
- Nash, J.E.; Sutcliffe, J.V. River flow forecasting through conceptual models part I—A discussion of principles. J. Hydrol. 1970, 10, 282–290. [Google Scholar] [CrossRef]
- Legates, D.R.; McCabe, G.J. Evaluating the use of “goodness-of-fit” measures in hydrologic and hydroclimatic model validation. Water Resour. Res. 1999, 35, 233–241. [Google Scholar] [CrossRef]
- Green, W.H.; Ampt, G.A. Studies in soil physics: 1. The flow of air and water through soils. J. Agric. Sci. 1911, 4, 1–24. [Google Scholar]
- Choi, Y.S.; Kim, K.T. Grid Based Rainfall–Runoff Model User’s Manual; Korea Institute of Civil Engineering and Building Technology: Gyeonggi-do, Korea, 2017; pp. 1–39. Available online: https://github.com/floodmodel/GRM (accessed on 20 April 2018).
- Klemeš, V. Operational testing of hydrological simulation models. Hydrol. Sci. J. 1986, 31, 13–24. [Google Scholar] [CrossRef] [Green Version]
- Wi, S.; Ray, P.; Brown, C. A user-friendly software package to ease the use of VIC hydrologic model for practitioners. In AGU Fall Meeting Abstracts; American Geophysical Union: Washington, DC, USA, 2016. [Google Scholar]
Parameter | Lower | Upper | Description |
---|---|---|---|
IniSaturation | 0 | 1 | Initial soil saturation ratio |
MinSlopeOF | 0.0001 | 0.01 | Minimum slope of land surface |
MinSlopeChBed | 0.0001 | 0.01 | Minimum slope of channel bed |
ChRoughness | 0.008 | 0.2 | Channel roughness coefficient |
CalCoefLCRoughness | 0.6 | 1.3 | Correction factor for land cover roughness coefficient |
CalCoefPorosity | 0.9 | 1.1 | Correction factor for soil porosity |
CalCoefWFSuctionHead | 0.25 | 4 | Correction factor for soil wetting front suction head |
CalCoefHydraulicK | 0.05 | 20 | Correction factor for soil hydraulic conductivity |
CalCoefSoilDepth | 0.8 | 1.2 | Correction factor for soil depth |
Data (ASCII Raster) | Usage |
---|---|
DEM | Used in drainage analysis and to obtain the raster data (catchment, flow direction, flow accumulation, stream, and slope) for the GRM |
Land cover map | Used to obtain the land cover data for the GRM |
Detailed soil map | Used to obtain the soil texture and soil depth data for the GRM |
Catchment | Event Number | Period | Rainfall (mm) | Peak Flow (m3/s) |
---|---|---|---|---|
Danseong | 1 | 3 July 2011 20:00–5 July 2011 12:00 | 43 | 687 |
2 | 14 July 2012 15:00–16 July 2012 15:00 | 63 | 1232 | |
Seonsan | 1 | 11 August 2010 00:00–12 August 2010 20:00 | 66 | 1361 |
2 | 9 July 2011 11:00–12 July 2011 20:00 | 154 | 1814 |
Catchment | Period | NSE | CC | nRMSE | |||
---|---|---|---|---|---|---|---|
Par. Event 1 | Par. Event 2 | Par. Event 1 | Par. Event 2 | Par. Event 1 | Par. Event 2 | ||
Danseong | Event 1 | 0.994 | 0.688 | 0.997 | 0.841 | 0.021 | 0.158 |
Event 2 | 0.831 | 0.993 | 0.922 | 0.997 | 0.124 | 0.024 | |
Seonsan | Event 1 | 0.966 | 0.904 | 0.988 | 0.965 | 0.052 | 0.087 |
Event 2 | 0.953 | 0.973 | 0.978 | 0.986 | 0.053 | 0.040 |
Parameter | Danseong | Danseong | Seonsan | Seonsan |
---|---|---|---|---|
Event 1 | Event 2 | Event 1 | Event 2 | |
IniSaturation | 0.29 | 0.49 | 0.94 | 0.83 |
MinSlopeOF | 0.0027 | 0.0044 | 0.0068 | 0.0057 |
MinSlopeChBed | 0.0044 | 0.0073 | 0.0058 | 0.0073 |
ChRoughness | 0.076 | 0.127 | 0.139 | 0.174 |
CalCoefLCRoughness | 1.06 | 0.78 | 0.97 | 0.94 |
CalCoefPorosity | 1.07 | 0.93 | 0.99 | 1.00 |
CalCoefWFSuctionHead | 0.43 | 3.02 | 1.73 | 2.37 |
CalCoefHydraulicK | 19.96 | 16.64 | 1.78 | 2.22 |
CalCoefSoilDepth | 0.89 | 0.97 | 0.96 | 0.81 |
Catchment | Number of Cells | Event Number | Period of Event (h) a | Time Required (1) (h) b | Time Required (2) (h) c | Computational Resources |
---|---|---|---|---|---|---|
Danseong | 6944 | 1 | 40 | 8.4 | 5.1 |
|
2 | 48 | 7.8 | 3.9 | |||
Seonsan | 4024 | 1 | 44 | 6.6 | 3.6 | |
2 | 81 | 9.8 | 2.9 |
© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Shin, M.-J.; Choi, Y.S. Combining an R-Based Evolutionary Algorithm and Hydrological Model for Effective Parameter Calibration. Water 2018, 10, 1339. https://doi.org/10.3390/w10101339
Shin M-J, Choi YS. Combining an R-Based Evolutionary Algorithm and Hydrological Model for Effective Parameter Calibration. Water. 2018; 10(10):1339. https://doi.org/10.3390/w10101339
Chicago/Turabian StyleShin, Mun-Ju, and Yun Seok Choi. 2018. "Combining an R-Based Evolutionary Algorithm and Hydrological Model for Effective Parameter Calibration" Water 10, no. 10: 1339. https://doi.org/10.3390/w10101339
APA StyleShin, M. -J., & Choi, Y. S. (2018). Combining an R-Based Evolutionary Algorithm and Hydrological Model for Effective Parameter Calibration. Water, 10(10), 1339. https://doi.org/10.3390/w10101339