/topoflow36

TopoFlow is a component-based, spatial hydrologic model along with a large collection of utilities for data preparation, visualization and so on. Distributed as a Python package and version 3.6 has been updated to run in Python 3.*.

Primary LanguageJupyter NotebookMIT LicenseMIT

topoflow36

TopoFlow version 3.6 is an update to version 3.5 that runs in Python 3.7 and contains over 98,000 lines of Python code. TopoFlow 3.5 is in the "topoflow" repository and runs in Python 2.7. (Over 75,000 lines of code.)

The best way to learn about TopoFlow --- including its history, capabilities, input data preparation and an example application --- is to read the paper in the "docs" folder called: "Peckham_et_al_2017_GPF.pdf", along with its appendices "Peckham_et_al_2017_GPF_Appendices.pdf". One of the appendices explains how to install the Python package and run a test. It is convenient to first install the Anaconda Python distribution, create a conda environment like "tf36", and then install the netCDF4 package dependency in that environment.

Detailed information on each TopoFlow model component --- including its variables and the equations used --- can be found on the CSDMS wiki website at: https://csdms.colorado.edu/wiki/Model:TopoFlow. Each component has its own very detailed HTML Help Page. Links to these can be found near the bottom of the main CSDMS page for TopoFlow. For example, the HTML Help Page for the TopoFlow Meteorology component can be found here: https://csdms.colorado.edu/wiki/Model_help:TopoFlow-Meteorology. One of the components is actually a self-contained, fluvial landscape evolution model (LEM) called Erode.

TopoFlow versions 3.5 and 3.6 each provide a plug-and-play, component-based modeling framework for spatial hydrologic modeling. Both use the EMELI framework to couple a set of user-selected components into a functioning model. The EMELI framework is included in the topoflow "framework" folder. A paper on EMELI is included in the "docs" folder, called: "Peckham_2014_EMELI_FINAL.pdf". Another paper in that folder, "Jiang_et_al_2018.pdf", describes EMELI-Web, a version of EMELI that couples and runs a set of TopoFlow components all running as web services on different servers.

Model components are in the topoflow "components" folder and each have a Basic Model Interface (BMI). Details on BMI can be found here: https://csdms.colorado.edu/wiki/BMI_Description. They all inherit from BMI_base.py in the "utils" folder. Each model component has its own configuration file, a text file with extension ".cfg". Components may get their input data from other components in a component set (passed by reference), or directly from input files. By editing model CFG files, users specify which output variables are to be saved to files (and at what "sampling timestep) and values of variables are then written to netCDF files (and optionally to some other file formats).

The "utils" folder has a large collection of utilities that are used to create and read input files, write output files and provide other low-level functionality to all components. It also includes a complete toolkit for computing a D8 flow direction grid and all related variables (like slope and total contributing area) from a DEM. The "examples" folder contains several data sets for testing, including the Treynor watershed in Iowa with input data for two historic rainfall events both from June 1967. Included in these examples are folders showing correct output files that can be used for testing.

CSDMS (csdms.colorado.edu) uses an older version of TopoFlow and also provides a graphical user interface via its Web Modeling Tool. See: https://csdms.colorado.edu/wiki/CSDMS_Web_Modeling_Tool (and https://csdms.colorado.edu/wiki/HydrologyExecutorBlanca). Incomplete efforts to create a wizard-style GUI for TopoFlow in Python --- similar to the GUI used in the old IDL version of TopoFlow 1.6b --- can be found in the "gui_old" folder.