Skip to content Where Legends Are Made
Cooperative Institute for Research to Operations in Hydrology

NWM Code API Workshop

Accessing NWM Forecasts, Retrospectives, and Flood Return Period Flows through the CIROH NWM Code API

Day 2 Session 1 (10:30 AM)

Presenters:

Dan Ames
Sujan Mondol
Jerson Garcia

The National Water Model generates short-, medium-, and long-range forecasts for 2.7 million locations nationwide.  Previously, accessing and using these forecasts, especially archived ones stored as NetCDF files, was challenging.  Recent work to liberate this data through Google BigQuery and a data access API built by BYU and hosted at CIROH has made it much easier to retrieve current and past forecasts, flood return periods, and analysis results from the NWM.  This workshop will focus on the CIROH WNM API and show how to use it. Participants will learn about the data available through the API and how to retrieve historical streamflow forecasts from the CIROH BigQuery database.  Through hands-on Python exercises, participants will compare these historical forecasts with observed data.  Participants will also build a simple flood warning system in Python that compares NWM flow forecasts to statistical return periods, like the 100-year flood.  Finally, participants will see the API used in the NWM Mobile App and other web applications.

Learning Outcomes:

  • Understand the types of data available through the CIROH WNM API.
    • Learn how to use the NWM API to retrieve historical streamflow forecasts from the CIROH BigQuery database
    • Practice writing Python code to explore the historical forecasts in comparison to observed data
    • Build a sample flood warning system in Python that compares NWM flow forecasts to statistical return periods such as the 100 year flood.

Prerequisites:

Knowledge:

  • Basic understanding of the streamflow products of the NWM

Hardware/Software:

  • Laptop with browser installed. Will be used to access Google Colab. Shared API key will be provided for the workshop

Accounts:

None