Skip to content

kleok/FLOODPY

Repository files navigation

FLOODPY - FLOOD PYthon toolbox

GitHub license Release contributions welcome Documentation

Introduction

The Flood mapping python toolbox (Floodpy) is a free and open-source python toolbox for mapping the non-urban flooded regions. It exploits the dense Sentinel-1 GRD intensity time series using a statistical or a ViT (Visual Transfomer) approach. Before running Floodpy make use you know the following information of the flood event of your interest

  • Date and time of the flood event
  • Spatial information (e.g. min,max latitude and min,max longitude) of the flood event

This is research code provided to you "as is" with NO WARRANTIES OF CORRECTNESS. Use at your own risk.

1. Installation

The installation notes below are tested only on Linux. Recommended setup: Python 3.9+, SNAP 9.0+

1.1 Install snap gpt including Sentinel-1 toolbox

Please download ESA-SNAP (All Toolboxes) from here and install it using the following commands:

chmod +x esa-snap_all_linux-10.0.0.sh
./esa-snap_all_linux-10.0.0.sh

1.2 Account setup for downloading Sentinel-1 acquisitions

Even though we offer credentials (for demonstration reasons), we encourage you to create your own account in order to not encounter any problems due to traffic.

1.3 Account setup for downloading global atmospheric model data

FloodPy can download meteorological data from based on ERA-5 data. You have to create a new account here if you don't own a user account yet. After the creation of your profile, you will find your Personal Access Token on your User profile page. Create manually a .cdsapirc file under your HOME directory with the following information:

url: https://cds.climate.copernicus.eu/api
key: Your Personal Access Token

1.4 Download FLOODPY

You can download FLOODPY toolbox using the following command: git clone https://github.com/kleok/FLOODPY.git

1.5 Create python environment for FLOODPY

FLOODPY is written in Python3 and relies on several Python modules. We suggest to install them by using conda.

  • Using conda Create a new conda environement with required packages using the the file FLOODPY_gpu_env.yml.
conda env create -f path_to_FLOODPY/FLOODPY_gpu_env.yml

1.6 Set environmental variables (Optional)

Append to .bashrc file

export FLOODPY_HOME= path_of_the_FLOODPY_folder
export PYTHONPATH=${PYTHONPATH}:${FLOODPY_HOME}
export PATH=${PATH}:${FLOODPY_HOME}/floodpy

2. Running FLOODPY

FLOODPY generates a map with flooded regions based on Sentinel-1 GRD products and meteorological data. Sentinel-1 orbits are downloaded using the sentineleof You can run FLOODPY using the following jupyter notebooks as templates.

3. Documentation and citation

Algorithms implemented in the software are described in detail at our publications. If FLOODPY was useful for you, we encourage you to cite the following work:

You can also have a look at other works that are using FLOODPY:

4. Contact us

Feel free to open an issue, comment or pull request. We would like to listen to your thoughts and your recommendations. Any help is very welcome! ❤️