In early 2024, Brazil skilled heavy rainfall, significantly within the south and northeast areas, resulting in floods that broken cities, destroyed crops, and triggered fatalities. As local weather change will increase the frequency of maximum climate situations, akin to droughts and floods, contingency planning and danger evaluation have gotten more and more essential for managing such occasions.
This text presents a Python and Jupyter Pocket book workflow for Flood Threat evaluation in rural and small-city areas of a northeastern Brazilian state. The method begins with a digital elevation mannequin (DEM) and ends with a visualization of the chance of inundation of various areas utilizing the Peak Above Nearest Drainage (HAND) mannequin. The tactic goals to evaluate flood danger in inner-city areas in actual time and with little information and computational sources.
Overview
- How do you discover and obtain DEM information for flood inundation danger evaluation?
- How do you set the programming atmosphere with the mandatory packages for the evaluation?
- How do information preparation and pre-processing steps for DEM information for drainage extraction be carried out?
- Learn how to use the HAND mannequin to establish the danger of inundation of various areas and label them as “very excessive danger”, “excessive danger”, “reasonable danger”, “low danger”, and “very low danger”.
Setting the Setting
The workflow used for the evaluation offered on this research is out there right here. The workflow is a Jupyter Pocket book that runs on Python 3.12 and makes use of the next packages:
- Numpy – array manipulation.
- Whiteboxtools – Geospatial evaluation and manipulation.
- GDAL – Geospatial information manipulation.
- RichDEM – DEM and hydrological evaluation instruments.
- Matplotlib – Knowledge Visualization.
Knowledge Preparation and Acquisition
For Flood Threat evaluation, listed below are the information preparations and acquisition steps:
Step 1: Knowledge Acquisition
Step one is buying elevation information for the realm of curiosity. This research makes use of DEM information from FABDEM (Forest and Buildings Eliminated Copernicus DEM), that are publicly obtainable on the College of Bristol’s web site [1]. FABDEM is a world elevation map that removes constructing and tree peak biases from the Copernicus GLO-30 Digital Elevation Mannequin (DEM). The information is supplied at a decision of 1 arc second (roughly 30 meters on the equator) for the complete globe.
As beforehand talked about, this research’s space of curiosity is Brazil’s northeast area. The DEM file covers a 1º-by-1º space, starting from 6ºS 39ºW to 5ºS 38ºW, utilizing the WGS84 coordinate system (EPSG: 4326). This area is illustrated in Determine 1 beneath.
The highlighted space lies inside one among Brazil’s most arid biomes. It’s characterised by an irregular and sparse rainfall sample, with rain usually falling just a few months per yr. Nonetheless, in 2024, this area suffered from an unusually excessive quantity of rainfall concentrated over a brief interval, considerably impacting the realm.
Step 2: Knowledge Preparation
The information preparation consists of filling the DEM file’s sinks. Sinks are areas the place elevation information kinds a melancholy; in different phrases, they’re pixels or units of pixels which have neighbouring pixels with increased elevation. In hydrology evaluation, water is collected in sinks as a substitute of flowing.
Whereas sinks are pure options, like lakes and basins, they are often created by DEM errors, akin to low decision or information assortment. Due to this fact, these depressions or sinks are “crammed” throughout preprocessing to make sure clean water stream by both eradicating them or elevating their elevation in order that the hydrological modelling stays unaffected. This is a vital step in performing Flood Threat Evaluation, amongst different hydrological research.
This step will use Python libraries akin to WhiteboxTools and RichDEM to make sure the DEM is processed to signify a clean floor appropriate for precisely calculating stream path and stream accumulation.
Additionally learn: Geospatial Evaluation for Flood Resilience
Circulate Course and Circulate Accumulation
Calculating Circulate Instructions
The subsequent step includes figuring out the stream path for every pixel within the DEM. This creates a brand new raster the place every pixel’s worth represents the stream path. There are three strategies: D8, A number of Circulate Course (MFD), and D-Infinity (DINF).
This research makes use of the D8 technique, which fashions stream path by discovering the steepest downslope neighbour for every pixel. The ensuing raster accommodates values between 1 and 128, indicating stream path primarily based on the steepest descent. For instance, if the steepest slope is to the best, the pixel’s worth might be 1, and if it’s towards the upper-right nook, the worth might be 128, as proven within the diagram beneath.
Calculating Circulate Accumulation
As soon as the stream path has been calculated, the following step is to compute the stream accumulation. Circulate accumulation identifies the areas the place water is prone to acquire primarily based on the stream path. That is achieved by figuring out the variety of upstream pixels contributing to every pixel’s stream.
The output is a brand new raster the place the worth of every pixel represents the full accrued stream at that location. Pixels with excessive accumulation values usually correspond to streams, rivers, or drainage networks as they collect stream from a number of upstream areas. Conversely, pixels with low accumulation values point out areas akin to ridges or elevated terrain with minimal water accumulation, as illustrated in Determine 3.
With Python, stream accumulation could be calculated with the WhiteboxTools utilizing the d8_flow_accumulation technique.
Utilizing the stream accumulation raster, it’s doable to establish areas representing watercourses, akin to rivers, streams, and drainage networks. That is achieved by making use of a threshold to the buildup values, the place any pixel with a worth above the edge is taken into account a part of the stream community.
The selection of the edge worth depends upon a number of elements, such because the hydrological situations of the research space and the decision of the DEM. On this case, the area is predominantly semi-arid, and the DEM has a spatial decision of 30 meters. After some trial and error, a threshold worth of 15 was thought of best suited for capturing broader drainage networks.
HAND Mannequin Evaluation
HAND (Peak Above Nearest Drainage) evaluation, first launched by NOBRE et al. (2011), is a technique used to evaluate an space’s susceptibility to flood inundation. That is finished by using a DEM (Digital Elevation Mannequin) and a stream community raster to find out how excessive every DEM pixel is above the stream community’s nearest pixel. The result’s a brand new raster the place every pixel worth represents the vertical distance between the pixel’s elevation and the elevation of the closest drainage level, as illustrated in Determine 4.
The pixel values within the ensuing HAND raster signify the relative peak above the closest drainage level. Larger values point out areas farther from the drainage, that are much less prone to flood, whereas decrease values signify areas nearer to the drainage, making them extra vulnerable to flooding.
This evaluation generated the HAND raster utilizing the WhiteboxTools Python library and the elevation_above_stream technique. The ensuing raster accommodates pixel values starting from 0 to 330 meters, representing the peak of every DEM pixel above the closest drainage level within the research space.
Classifying Flood Threat With HAND Mannequin
Based mostly on the pixel values from the HAND raster, danger lessons could be outlined, with decrease values indicating the next danger of inundation in comparison with areas with better elevation. Desk 1 beneath presents the thresholds (in meters) used to categorise areas into completely different danger ranges.
Desk 1: Intervals used to categorise danger ranges.
Threat Stage | Threshold (m) | Class Worth |
---|---|---|
Very Excessive | 0 – 1 | 5 |
Excessive | 1 – 2 | 4 |
Medium | 2 – 6 | 3 |
Low | 6 – 10 | 2 |
Very Low | 10 | 1 |
The thresholds offered in Desk 1 had been decided by means of empirical testing. Utilizing the NumPy bundle, class values could be assigned to completely different areas of the unique DEM, and a brand new raster file could be generated with the classification outcomes.
The thresholds offered in Desk 1 had been decided by means of empirical testing. Utilizing the NumPy bundle, class values could be assigned to completely different areas of the unique DEM, and a brand new raster file could be generated with the classification outcomes.
Outcomes and Discussions
With all of the processing steps accomplished, it’s time to visualise the outcomes and attain some conclusions. The Matplotlib Python bundle lets you visualize the outcomes of the danger classification of the HAND raster file, as offered in Determine 5.
To higher perceive which areas are extra vulnerable to flooding, the GDAL Python library can be utilized to export the categorized array as a GeoTIFF file. This file can then be loaded into GIS software program, akin to QGIS, to visualise the higher-risk areas, as illustrated in Determine 6 beneath.
In Determine 6, a rural space is proven with a small metropolis situated within the centre. On the best aspect of the determine, high-risk areas (highlighted in yellow) and really high-risk areas (highlighted in crimson) are indicated. The stream community, represented in blue, reveals the extent of areas close to the streams susceptible to inundation.
Conclusion
The HAND mannequin could be very helpful for assessing the danger of inundation of areas rapidly and computationally effectively. Utilizing solely a DEM file from an space of curiosity, it’s doable to map (Flood Threat evaluation) areas vulnerable to inundation and facilitate the event of contingency plans to mitigate the impacts. The workflow proposed within the current research can be utilized for various areas and conditions, and it’s advantageous for civil safety businesses.
The Jupyter Pocket book with all of the steps, detailed explanations, and necessities is out there right here.
References
- Nathan, Smiti & Harrower, Michael. (2023). Mapping spatial patterning of Bronze Age towers in Oman in response to water stream accumulation. Arabian Archaeology and Epigraphy. 34. n/a-n/a. 10.1111/aae.12237.
- Hu, Anson & Demir, Ibrahim. (2021). Actual-Time Flood Mapping on Consumer-Aspect Internet Programs Utilizing HAND Mannequin. Hydrology. 8. 65. 10.3390/hydrology8020065.
- Nobre, A.D., Cuartas, L.A., Hodnett, M., Rennó, C.D., Rodrigues, G., Silveira, A., Waterloo, M., Saleska, S., Peak above the Nearest Drainage, a hydrologically related new terrain mannequin, Journal of Hydrology (2011), doi: 10.1016/j.jhydrol.2011.03.05.1
- Lindsay, J.B. (2023). Introduction to WhiteboxTools: A Person Information for the WhiteboxTools Command-Line Interface and Python API. Whitebox Geospatial Inc. Retrieved from Whiteboxgeo.
- Barnes, R. (2023). RichDEM: Excessive-performance Terrain Evaluation Library for Digital Elevation Fashions. Retrieved from RichDEM — Excessive-Efficiency Terrain Evaluation.
- Esri. (2024). Understanding Drainage Programs. ArcGIS Professional. Retrieved from Understanding drainage methods—ArcGIS Professional.
Steadily Requested Questions
Ans. The current research used FABDEM with a decision of 30 meters. Whereas it’s helpful for bigger areas, lower-resolution DEMs are likely to generalize terrain options, resulting in inaccuracies within the stream extraction step and, consequently, misclassification of areas regarding flood danger.
Ans. On this research, we examined numerous choices to decide on the edge worth for stream community extraction. Larger threshold values create smaller drainage areas, making the extracted stream community look completely different from satellite tv for pc imagery. Due to this fact, it’s essential to pick out a threshold that produces a drainage community carefully matching the water options seen within the imagery of the realm of curiosity.
Ans. The HAND mannequin signifies that high-risk (yellow) and really high-risk (crimson) areas are extra flood-prone as a consequence of their proximity to the drainage community. Nonetheless, classifying an space as flooded additionally requires contemplating elements like land use, precipitation patterns, and historic flood information.
Ans. The proposed workflow allows real-time mapping of flood-prone areas, enhancing situational consciousness, mitigation, and emergency response. The HAND mannequin presents a sensible, scalable resolution utilizing solely DEM information and open-source Python libraries, making it very best for areas with restricted technological sources to evaluate flood dangers reliably.