Skip to main content
fimbox

FIMbox- A Testbed for Flood Inundation Mapping Experimentation

Release Issues License: GPL v3
Ruff Python versions
PyPI version PyPI Downloads

SDML Logo A modular open source testbed framework to standardize Flood Inundation Mapping (FIM) simulations and evaluation with custom datasets and hydrologic parameters in reproducible workflows. fimbox provides a streamlined, user friendly and cloud enabled pipeline to generate operational flood inundation maps using the NOAA Office of Water Prediction (OWP) Height Above Nearest Drainage (HAND) FIM framework, driven by National Water Model retrospective and forecasted streamflow. It is developed under the Surface Dynamics Modeling Lab (SDML) at The University of Alabama.

High-level workflow


fimbox implements an extensive Height Above Nearest Drainage (HAND) based flood inundation mapping workflow. It offers great flexibility to change datasets (e.g. resolution and source of river networks, catchments, DEMs) and to investigate different research questions (e.g. changing Manning's n, better representation of the synthetic rating curve, stream network segmentation, slope improvement and many more terrain conditioning options) to improve FIM extents and depths. The HAND preprocessing logic follows the NOAA OWP HAND FIM framework, whose reference implementation lives at https://github.com/NOAA-OWP/inundation-mapping. Ongoing work expands the modeling capability beyond a single model, integrating different models to enable multimodel FIM extents, and more.

fimbox-workflow

Every module shown above ships its own README with a detailed workflow diagram and step by step usage: what the module does, every class and parameter it exposes, and runnable examples (see the Module documentation table below). Worked end to end examples for each stage live in tests/ and the package documentation in docs/.

Install


fimbox targets Python 3.10–3.12.

git clone https://github.com/sdmlua/fimbox.git
cd fimbox

# uv-based environment (recommended)
pip install uv
uv venv
uv pip install -e .

Activate the virtual environment before running any commands:

Mac / Linux

source .venv/bin/activate

Windows (Command Prompt)

.venv\Scripts\activate.bat

Windows (PowerShell)

.venv\Scripts\Activate.ps1

If you prefer Conda, create and activate the environment first, then run uv pip install -e . inside it.

Quick start: from boundary polygon to flood map


1. Stage AOI inputs

Download the DEM, NHD/NWM hydrography, FEMA NFHL, NLD levees, OSM bridges/roads, and USGS gages into an AOI working directory.

from fimbox import getAllInputData

getAllInputData(
    boundary="path/to/aoi_boundary.gpkg",
    aoi_id="my_basin",
    out_dir="out/my_basin",
)

See the tests/ folder for further detailed steps including HAND processing, SRC generation, calibration, and FIM generation. Users can change different parameters based on requirements.

Module documentation


Each module has its own README documenting what it contains, the full parameter surface (including optional parameters), and usage examples:

Module Documentation Purpose
fimbox.preprocessing README Overview of the preprocessing stages and the combined getAllInputData pipeline.
fimbox.preprocessing.download_data README Download and standardize AOI inputs (DEM, hydrography, NFHL, levees, OSM, gages).
fimbox.preprocessing.huc_test README Validate HUC8 codes against the packaged acceptable lists.
fimbox.preprocessing.process_bridgedem README Per-bridge LiDAR rasters and the bridge/DEM difference raster.
fimbox.preprocessing.calculate_branch README Branch derivation, HAND generation, crosswalk, and SRC/hydroTable build.
fimbox.preprocessing.calibrate_ratingcurve README SRC calibration (bathymetry, bankfull, subdivision, USGS/spatial/manual).
fimbox.streamflow README NWM retrospective/forecast, GEOGLOWS, and USGS retrieval, plots, statistics.
fimbox.fimgeneration README Per-branch inundation and AOI mosaicking from discharge CSVs.
fimbox.fimevaluation README Benchmark FIM query/download (FIMbench) and candidate-vs-benchmark evaluation (FIMeval).
Tests README What each test file demonstrates and how to run the suite.
Workflow diagrams README Editable Mermaid sources + generator script for every module workflow SVG (make workflows).

For more usage notes refer to the tests or docs for the fimbox python package.

Contribution


For contribution guidelines see CONTRIBUTING.md.

Acknowledgements


CIROH Logo Funding for this project was provided by the National Oceanic & Atmospheric Administration (NOAA), awarded to the Cooperative Institute for Research to Operations in Hydrology (CIROH) through the NOAA Cooperative Agreement with The University of Alabama (NA22NWS4320003).

Contact


fimbox is developed at the Surface Dynamics Modeling Lab (SDML) at The University of Alabama.

Sagy Cohen (sagy.cohen@ua.edu), Supath Dhital (sdhital@ua.edu)

NOTE- This repository is still in active development and might contain bugs. Please let us know or create a pull request if you have better ideas. THANK YOU.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fimbox-0.1.10.tar.gz (952.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fimbox-0.1.10-py3-none-any.whl (335.5 kB view details)

Uploaded Python 3

File details

Details for the file fimbox-0.1.10.tar.gz.

File metadata

  • Download URL: fimbox-0.1.10.tar.gz
  • Upload date:
  • Size: 952.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.8

File hashes

Hashes for fimbox-0.1.10.tar.gz
Algorithm Hash digest
SHA256 b158a46b24728d99fce78d070197ca6c82186acb1a10a72f96ea114e7b01729d
MD5 e0ab8000e44e565d392ec9de9ae9d2d5
BLAKE2b-256 d5a861e3578288994b3b3984d5523a89ecf14eb9fe874728417c4f4628f68a80

See more details on using hashes here.

File details

Details for the file fimbox-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: fimbox-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 335.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.8

File hashes

Hashes for fimbox-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 c53be01b2e2bc4b9dd642b6a299eedc7723f11e82655392c1632c3fe6c41a787
MD5 da8b20334ea70c1919209b287973c4a2
BLAKE2b-256 7d31e8141193ffd5a279f97782e1b41a22e75932afe318417a87ec5d4a9e58e0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page