Before the Flood
There are multiple steps in this practice, you can already perform before a flood hits your Area of Interest (AOI). This will help you to safe crucial time during the disaster, to ensure a rapid response.
1. Create your AOI on GFM
First, make a user account on GFM: Global Flood Monitoring.
To access the data, you need to create an AOI, which will be stored in your GFM account. You need to assign a name and a description to your AOI. Then click on “Next step”.
In the next step, you can choose between giving the Coordinates to your AOI, drawing the AOI or selecting a region. Most of the time, drawing the AOI is the best idea. Therefore, select the square to the right of the panel, draw the AOI and select Save AOI.
2. Check GloFAS regularly
To know when floods are likely to hit your region, check GloFAS regularly. Check if there are any unusually high precipitations forecasted.
3. Download the FABDEM of your AOI
The FABDEM is a 30m open-access Digital Terrain Model. You can find all necessary information in this Data Application of the Month or in this Scientific Publication: https://iopscience.iop.org/article/10.1088/1748-9326/ac4d4f/meta.
Among other options, FABDEM can be downloaded with Google Earth Engine. With the link below, you can download the FABDEM for your AOI. By clicking on the rectangle tool, you can draw a polygon of your AOI. Then you can click on Run, to run the script. Under tasks, you will see FABDEM popping up. Click on RUN. When the task is finished, you can download the DTM from your Google Drive.
Using other DTMs, for example a high-resolution national DTM or commercial DTMs is also possible. The spatial resolution and accuracy of the DTM is one of the key points to the success of this practice.
https://code.earthengine.google.com/78b037560aa4567b5d950d228531844f
4. Setup Python
This is a step-by-step procedure to setup the Python environment, in which the FLEXTH algorithm will work. If you already have a Python installation on your computer, it still makes sence to follow this guide, to ensure all libraries are installed properly.
We need to install the latest version of Miniforge, which is a light-weight Python distribution. Follow this Link, which leads you to a repository storing the Miniforge3 installers for the different operating sytems (OS). If you are using a Windows 64bit machine, click on „latest“ in the respective row. On the next page look for „Miniforge3-Windows-x86_64.exe“. Click on the link to download the executable.
Double clicks the executable to start the setup. In the setup menu, click on „Next“ , then on „I agree“. Install for „Just Me (recommended)“.
For the Install Location, you can just go with the default folder. Click „next“. For the Advanced Installation Options, you can also go with the default selection. Click „install“.
After the installation click „next“ and then „Finish“. Open the Miniforge Prompt. This is a command line interface. First, we create a new virtual environment for the practice called „flexth_env“. Then we install the necessary libraries into the new environment:
Press Enter after every line of code. You will be asked to confirm some changes with a „Y“ and pressing Enter. Care, that you don‘t adds or miss any spaces in the text.
After activating the environment, you should see the name of the environment in brackets at the beginning of the line. A Python interface called Jupyter Lab will open after the last line of code.
The installation of the libraries will take some time. You will see a progress bar in the terminal window, and it will print „done“ once the installation is terminated.
5. Make yourself familiar with the FLEXTH tool
If everything worked out, you are now able to open Jupyter Lab by writing jupyterlab into the console and executing the command (the last line in the previous code).
The script is divided into 6 sections:
Loading necessary libraries.
Specifying user-specific input and output directories.
Selecting the AOI and DTM sources.
Setting further Parameters
Mosaicing and Reprojecting GFM outputs.
FLEXTH
In Jupyter Lab, on the left side, you can see your directories. Browse to the directory of the FLEXTH script “GFM2FLEXTHnb.ipynb”. Go to the first cell and click on the “Run current Cell” symbol on the task bar.
If the execution of the first cell works without any error messages, you will read “Libraries are loaded” in the console.
Now you are prepared to use the tool in case of a flood.
Troubleshooting
If you don‘t have enough RAM on your machine, you will get the error message: …unable to allocate … for an array with size. Consider tiling your input data, and if you did already, consider reducing the tile size
The code does not overwrite the rasters automatically. You have to delete the mosaics and reprojected rasters before reprocessing the inputs (cell …). Or you move them to another directory.
13. Visualize and Interprete the Output
By executing the last cell 7. Quick Output Summary, the area flooded before FLEXTH, and the area flooded after FLEXTH will be output.
Attachment | Size |
---|---|
Slides: RP_FLEXTH_S1S2.pdf (2.02 MB) | 2.02 MB |