OWP HAND-FIM is a national-scale operational flood forecasting framework (https://github.com/NOAA-OWP/inundation-mapping). It is a terrain-based fluvial flooding model that uses model-predicted streamflow and reach-averaged Synthetic Rating Curves (SRCs) to generate inundation extent and depth rasters at HUC-8 scale (Hydrologic Unit Code-8). The model can produce FIMs for all order streams within the watershed at a very low computational cost. This notebook streamline the FIM generation process or the OWP HAND-FIM framework on the cloud. It allow users to run over mutiple HUC-8s simultaneously. This model can run using any temporal resolution available from the input streamflow data (hourly, daily, monthly etc).
This version () of code is available on PyPI.
fimserve/
├── docs/(contain the code usage))
├── GeoGLOWS/(contain the streamflow download using GeoGLOWS hydrofabrics))
├── src/fimserve/
│ ├── streamflowdata/
├── nwmretrospectivedata.py
└── forecasteddata.py
│ ├── plots/ (Contains different plotting functionality)
├── FIMsubset/
├── xycoord.py
└── shpsubset.py
├── statistics/
├── calculatestatistics.py (calculates statistics between NWM and USGS gauge data)
├── datadownload.py (Includes all HUC8 raster things)
├── runFIM.py (OWPHAND model)
├── vizualization.py (In the Local jupyter notebook, it can be used to vizualize the user defined any inundation file interactively.)
└── tests/(includes test cases for each functionality)
The structure of the framework consisting its applications and connection between different functionalities. The right figure, b), is the directory structure used in this package (for e.g. after using this code by following docs/code_usage.ipynb) to download and process one or multiple hucs.
Figure: Flow chart of the framework (a) complete workflow demonstrating how the framework is designed, and (b) the directory structure on the user's end after runing the code.
Although not mandatory, we strongly recommend users create a virtual environment and install this package on that virtual environment to avoid the conflict between system dependencies and package dependencies.
#creating a virtual environment using conda
conda create --name fimserve python==3.10
#Activate environment
conda activate fimserve
OR user can directly install it without a virtual environment
#Using pip
pip install fimserve
#OR add using poetry to your framework deployment
poetry add fimserve
Once it is installed, import it like
import fimserve as fm
#to download HUC8
fm.DownloadHUC8(HUC) #Like this it contains multiples functionality.
Then there are a lot of different modules, call it to work. For reference to run, Here (docs/code_usage.ipynb) is the sample usage of this code and different functionality.
For quick usage: Use Google Colab. Here is fimserve in google colab:
Different HUC8 IDs, USGS gauge stations and flowline information that might be required to further understand/running this framework can be found in this ArcGIS Instant App.
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 (#Funding ID). | |
We would like to acknowledge the TEEHR script developed by RTI International (https://github.com/RTIInternational/teehr). We use this script to get NWM discharge quickly. |
Dr. Sagy Cohen ([email protected]), Dr Anupal Baruah,([email protected]), Supath Dhital ([email protected])