GithubHelp home page GithubHelp logo

gregcocks-noaa / t-route Goto Github PK

View Code? Open in Web Editor NEW

This project forked from noaa-owp/t-route

0.0 0.0 0.0 147.74 MB

Tree based hydrologic and hydraulic routing

License: Other

Jupyter Notebook 32.77% Fortran 25.40% Python 41.10% C 0.22% Makefile 0.38% Shell 0.06% CMake 0.08%

t-route's Introduction

GREG COCKS - Fork

NWM Tree-based Inland Hydraulic Routing Project

Fast, flexible, modular channel routing for the National water model:

Scaling the hydraulic routing problem to the size of the U.S. National Water Model required a new approach. The existing routing algorithm does not allow for incorporation of downstream conditions in the calculation of stream flow and depth. A hydraulic model which explicitly considers these influences is required for simulation of regional flooding where waterways begin to influence one another as well as when a major flood causes backwater flooding into a tributary. The program under development here seeks to effectively manage the traversal of a network of streams with defined hydraulic properties specifically for the purpose of hydraulic routing in an operational flood and water resources forecasting system. The principles of graph development and traversal as they are applied (imperfectly) here are possibly applicable to problems in other areas.

In particular, given the observation that the routing of independent river networks may be completely decoupled, we have worked to create a framework for the routing computation which uses a knowledge of the topological relationship of segments, reaches, and junctions within a river network to separate the computation into parallelizable portions, as shown in the following image.

The project and program contain the following elements.

  • Technology stack: The hydrofabric pre-processor, river network traversal framework, and time series data model are all written in python. The routing model engines are primarily written in fortran, but we are also experimenting with ML-based methods and can imagine any number of options called from within the network traversal framework.
  • Status: The project is currently in development phase 2 -- we are making the first connections of the various components within a single module. Phase 3 shoulud begin around July 2020 and we will be working demonstrations of the framework with operational outputs bootstrapped from the current national water model. For additional detail on versions, please see the CHANGELOG.
  • Demos: The notebooks folder has a number of python notebooks, many of which can be executed from within the Google colaboratory environment, which demonstrate various aspects of the project.

In general, as with all things related to the National Water Center, our goal is to save more lives and prevent more property damage by more accurately forecasting the state of the nations rivers and other water resources, especially with respect to floods and by getting that information more quickly and understandably to people who can and will do something useful with it to those ends.

The purpose in sharing this via GitHub is to efficiently make possible collaborative editing -- because there are certainly those who have more experience and expertise who might comment on how this has been done or how it might be better done here.

Configuration and Dependencies

This program uses the following system packages:

python3
python3-devel
gcc-gfortran

... and the following non-default python modules:

geopandas 
numpy 
pandas 
xarray 
netcdf4 
tqdm # for a download progress bar when pulling test datasets from the NOAA site.

Installation

please see usage and testing below. Standby for docker container instructions in the near future.

Configuration

Presently, there are no specific configuration details. Stand by.

Usage and Testing

The following sequence of commands should provide a sense of the operation of the routing scheme:

pip3 install geopandas numpy pandas xarray netcdf4 
git clone --progress --single-branch --branch master http://github.com/NOAA-OWP/t-route.git
cd src/fortran_routing/mc_pylink_v00/MC_singleCH_singleTS/
f2py3 -c varSingleChStime_f2py.f90  MCsingleChStime_f2py_clean.f90  -m mc_sc_stime
cd -
cd src/python_routing_v02/
# Execute a serial (~2.5 minutes) and a parallel test (~0.5 minutes)
# times from 6 cores (x2 threads per core), 3.7GHz
python3 compute_nhd_routing.py; python3 parallel_compute_nhd_routing.py

In addition, the notebooks in the notebooks folder represent experiments to demonstrate the base classes and basic functionality of libraries contained in rest of the repoository. Collectively they are intended to support incorporation of evaluation of the dynamic routing codes and related utilities being considered and prepared as potential candidates for use as the base dynamic hydraulic engine for the NWM.

Most of the notebooks may be opened in either Jupyter or with Google Colaboratory.

Known issues

We are constantly looking to improve. Please see the Git Issues for additional information.

Getting help

If you have any questions, please contact [email protected] or [email protected], the technical maintainers of the repository.

Getting involved

Among other things, we are working on preparing more robust I/O capability for testing and on improving the speed of the parallel tree traversal. We welcome your thoughts, recommendations, comments, and of course, PRs.

Please feel free to fork the repository and let us know if you will be issuing a pull request. More instructions will eventually be documented in CONTRIBUTING.


Open source licensing info

  1. TERMS
  2. LICENSE

Credits and references

A great deal of credit is owed to Drs. Ehab Meslehe and Fred Ogden, and as well to the entire NCAR WRF-Hydro development team.


t-route's People

Contributors

jameshalgren avatar jhrehanoaa avatar awlostowski-noaa avatar groutr avatar hellkite500 avatar jdmattern avatar gregcocks-noaa avatar donaldwj avatar jdhondia-noaa avatar kumdonoaa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.