event_container

Result structure

The computed indices are returned as attributes of the object that is used to call the method. They are inserted in the predefined dictionary that has the following structure:

{
    "api": {
        "name": "Antecedent Precipitation Index",
        "general_description":
                "The API is an index of moisture stored within a drainage basin before a storm. It is a weighted summation of daily precipitation amounts, used as an index of soil moisture (https://doi.org/10.1080/02626660903546175)",
        "data": {
            "api_index": {
                "type": "scalar",
                "description": "Primitive value representing the mean antecedent precipitation index for the catchment",
                "value": null, 
                "data_type": "float",
                "unit": null
                },
            "api_map": {
                "type": "map",
                "description": "Map representing the antecedent precipitation index for each pixel in the catchment",
                "value": null,
                "data_type": "xarray.core.dataarray.DataArray",
                "unit": null
                }
            },
        "method": {
            "name": "compute_event_api",
            "module": "floodsimilarity.event_container",
            "class": "EventContainer"
        }
    },
    "ep_max": {
        "name": "Event Precipitation",
        "general_description":
                "Event Precipitation is considered the rainfall event that triggered the flood",
        "data": {
            "epm": {
                "type": "scalar",
                "description": "Primitive value representing the maximum event precipitation for the catchment during the event",
                "value": null, 
                "data_type": "float",
                "unit": "mm"
                }
        },
        "method": {
            "name": "compute_event_precip_max",
            "module": "floodsimilarity.event_container",
            "class": "EventContainer"
        }
    },
    "ep_vol": {
        "name": "Total event Precipitation",
        "general_description":
                "Event Precipitation is considered the rainfall event that triggered the flood",
        "data": {
            "epv": {
                "type": "scalar",
                "description": "Primitive value representing the total volume of the event precipitation for the catchment",
                "value": null, 
                "data_type": "float",
                "unit": "mm"
                }
            },
        "method": {
            "name": "compute_event_precip_vol",
            "module": "floodsimilarity.event_container",
            "class": "EventContainer"
        }
    },
    "ed": {
        "name": "Event duration",
        "general_description":
                "Duration of the runoff events in days",
        "data": {
            "ed": {
                "type": "scalar",
                "description": "Days between the event start and event end",
                "value": null,
                "data_type": "int",
                "unit": "days"
                }
            },
        "method": {
            "name": "default",
            "module": "floodsimilarity.event_container",
            "class": "EventContainer"
        }
    },
    "epfp": {
        "name": "Event peak flow properties",
        "general_description": "Properties of the event peak flow",
        "data": {
            "epf": {
                "type": "scalar",
                "description": "Event peak flow",
                "value": null,
                "data_type": "float",
                "unit": "m^3 / s"
                },
            "nepf": {
                "type": "scalar",
                "description": "Event peak normalized with catchment area in square kilometers",
                "value": null,
                "data_type": "float",
                "unit": "m^3 / s * km^2"
                },
            "eph": {
                "type": "scalar",
                "description": "Event peak height",
                "value": null,
                "data_type": "float",
                "unit": "mm / day"
                },
            "epd": {
                "type": "date",
                "description": "Event peak date",
                "value": null,
                "data_type": "str",
                "unit": "%Y-%m-%d"
                }
            },
        "method": {
            "name": "get_event_peak_properties",
            "module": "floodsimilarity.event_container",
            "class": "EventContainer"
        }
    },
    "esfp": {
        "name": "Event start flow",
        "general_description": "Stream flow at the event start",
        "data": {
            "esf": {
                "type": "scalar",
                "description": "Stream flow at the event start",
                "value": null,
                "data_type": "float",
                "unit": "m^3 / s"
                },
            "nesf": {
                "type": "scalar",
                "description": "Stream flow at the event start normalized with catchment area in square kilometers",
                "value": null,
                "data_type": "float",
                "unit": "m^3 / s * km^2"
                },
            "esh": {
                "type": "scalar",
                "description": "Event start discharge height",
                "value": null,
                "data_type": "float",
                "unit": "mm / day"
                }
            },
        "method": {
            "name": "get_event_start_flow",
            "module": "floodsimilarity.event_container",
            "class": "EventContainer"
        }
    },
    "eprp": {
        "name": "Event peak return period",
        "general_description":
                "Return period at the event peak or maximum return period during the event",
        "data": {
            "eprp": {
                "type": "scalar",
                "description": "Maximum event return period",
                "value": null,
                "data_type": "int",
                "unit": null
                }
            },
        "method": {
            "name": "get_event_peak_rp",
            "module": "floodsimilarity.event_container",
            "class": "EventContainer"
        }
    },
    "sm": {
        "name": "Soil-moisture at the event start",
        "general_description":
                "Soilmoisture modelled via mHM at the event start",
        "data": {
            "sm": {
                "type": "scalar",
                "description": "Spatially aggregated mean soilmoisture",
                "value": null, 
                "data_type": "float",
                "unit": "mm / mm"
                },
            "sm_map": {
                "type": "map",
                "description": "Map representing the soilmoisture at the event start" ,
                "value": null,
                "data_type": "xarray.core.dataarray.DataArray",
                "unit": "mm / mm"
                }
            },
        "method": {
            "name": "get_event_start_sm",
            "module": "floodsimilarity.event_container",
            "class": "EventContainer"
        }
    }
}
class floodsimilarity.event_container.EventContainer(gid, event_start, event_end, function_list)[source]

A class that is defined by a “gid” (the unique number for a gauging station) and a start and end date that defines the event.

compute_event_api(days=10, k=0.95)[source]

A method that computes the antecedent precipitation index.

Parameters
  • days (int, optional) – Number of days to be considered prior the event - {“default”: 10, “min”: 1, “max”: 30}

  • k (float, optional) – Decay factor between 0 and 1 - {“default”: 0.95, “min”: 0, “max”: 1}

Returns

API as a real number and api as spatial distributed value at event start date

Return type

compute_event_api

compute_event_precip_max(days=3)[source]

A method that computes the event precipitation as the maximum of accumulated precipitation in a x-day period.

Parameters

days (int, optional) – Number of days for accumulated precipitation - {“default”: 3, “min”: 1, “max”: 10}

Returns

Maxium x-day sum as a real number representing the event precipitation in mm.

Return type

compute_event_precip_max