Skip to content

mintproject/FloodSeverityIndex

Repository files navigation

PyPI license

FloodSeverityIndex

Flood index based on Gumbel distribution of annual maxima of volumetric flow.

Table of contents

This Python routine calculates a flood severity index based on the annual maxima of volumetric flow for the period 1981-2017. The thresholds were estimated from a Gumbel distribution using the methods of L-moments. The severity is based on a 2-yr return period (medium), 5-yr return period (high), and 20-yr return period (severe).

This routine requires data from GloFAS.

  • v0.0.1: Support for severity index for South Sudan and Ethiopia.

Command line implementations:

python FloodSeverityIndex.py data thresholds bounding_box year fig

or

docker run -ti mintproject/floodseverityindex:latest bash
python FloodSeverityIndex.py data thresholds bounding_box year fig

where:

  • data: Either:
    • Path to the folder containing the GloFAS data. Data should be organized in folders per year.
    • Path to single netcdf file with concatenated data for South Sudan and Ethiopia
  • thresholds: path to the file containing the flood threshold from the Gumbel distribution.
  • bounding_box: List of [min_lon,max_lon,min_lat,max_lat]. Note that only South Sudan and Ethiopia are currently supported. Therefore the maximum extent of the box is: [23,48,3,15]
  • year: The year of interest. Should be provided as a list to support for multiple years.
  • fig: whether to return a movie

Note:

  • The outputs are in netcdf format. The index is a boolean corresponding to the severity of the flood:
    0: None
    1: Medium (2-yr return period)
    2: high (5-yr return period)
    3: severe (20-yr return period)

Examples: python FloodSeverityIndex.py ./ GloFAS_FloodThreshold.nc [23,48,3,15] [2016,2017] True

Tested under Python 3.7

Package requirements:

  • xarray = 0.12.1 (Do not update to the latest version)
  • numpy
  • cartopy
  • panda
  • matplotlib
  • imageio

Note: To use mp4, after installing imegeio, pip install imageio-ffmpeg

  • FloodSeverityIndex.py: Executable
  • GloFAS_FloodThreshold.nc: Files containing the thresholds

Please report issues to khider@usc.edu

The project is licensed under the Apache v2.0 License. Please refer to the file call license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages