Dataset and algorithms for the Bayesian framework to assess and create risk maps of groundwater flooding
This repository is part of the research "A Bayesian Framework to Assess and Create Maps of Groundwater Flooding", written by Pablo Merchán-Rivera, Alexandra Geist, Markus Disse, Jingshui Huang, and Gabriele Chiogna. The algorithms and scripts apply the framework to create maps of groundwater flooding susceptibility in a numerical model that simulates the groundwater flood event. The algorithm includes the application of the elementary effects method, a Markov Chain Monte Carlo inference using the DREAM algorithm, and the exploration of the predictive posterior distributions of the groundwater heads. The simulation performed in the research can be run using this repository to reproduce the research results.
Steps to reproduce
For reproducing the results of the research, run the files in the following order: 1. Elementary effects (Morris method): - Open the folder: ./Experiments/1_elementary_effects - Copy the folder ./Experiments/1_elementary_effects/inputs and paste within the folder of the experimental combination of the elementary effects you want to reproduce (e.g., ee-p4-r10). The names of the folders denote the combination of p and m. Please, refer to the published article for details and explanations related to the selected parameters. - Open the folder of the experimental combination of the elementary effects (e.g., ee-p4-r10) - Open the file morris_run.py and run the script. - The elementary effects parameters and conditions are defined in the files: morris_init.py, morris_run.py and morris_results.py. - To evaluate all the morris evaluation you can use the file ./Experiments/1_elementary_effects/eval_all_valid_morris. To do it, copy all the outputs from the experimental combinations within the folder inputs_all. 2. Bayesian inference (DREAM algorithm): - Open the folder: ./Experiments/2_bayesian_inference_and_maps - Open the file dream_run.py and run the script. - Open the file dream_results.py and run the script. - The Bayesian inference parameters and conditions are defined in the files: dream_init.py, dream_modflow.py, dream_run.py and dream_results.py. 3. Probability maps: - Open the folder: ./Experiments/2_bayesian_inference_and_maps - Open the file sim_post_modflow.py and run the script. This file will call all the required internal modules and the raw data. - Open the file sim_flood_maps.py and run the script. This file will call all the required internal modules and the raw data. - The maps will be created and will appear after running this file. The scripts are written in Python 3. We recommend using Spyder (IDE). Please, install the following external repositories to be able to run the code: Numpy, Scipy, Pandas, Matplotlib, Time, SALib, Spotpy, and Datetime. Also, MODFLOW-2005 must be previously installed to run these experiments. We recommend saving the executable file of MODFLOW (mf2005dbl.exe) in the following path: C:/Modflow/MF2005.1_12/bin/ Otherwise, the MODFLOW batch file MODFLOW_mod.bat must be modified with the proper path where the executable file was located. Final considerations: Be aware that the average unit simulation is 200 seconds, and this time varies depending on the characteristics of the computer. Both the elementary effects method and the DREAM algorithm require to run several evaluations to obtain the results. Between 35 and 40 GB of memory are required to store all the results. Due to this storage requirement, not all the result arrays are included but they can be requested by contacting the authors. Refer to the research article for contact details. You can check the progress of the simulation by opening the log files within the log folders.