Abstract

Hydrologists use a number of tools to compare model results to observed flows. These include tools to pre-process the data, data frames to store and access data, visualization and plotting routines, error metrics for single realizations, and ensemble metrics for stochastic realizations to calibrate and evaluate hydrologic models. We present an open-source Python package to help characterize predicted and observed hydrologic time series data called hydrostats which has three main capabilities: Data storage and retrieval based on the Python Data Analysis Library (pandas), visualization and plotting routines using Matplotlib, and a metrics library that currently contains routines to compute over 70 different error metrics and routines for ensemble forecast skill scores. Hydrostats data storage and retrieval functions allow hydrologists to easily compare all, or portions of, a time series. For example, it makes it easy to compare observed and modeled data only during April over a 30-year period. The package includes literature references, explanations, examples, and source code. In this note, we introduce the hydrostats package, provide short examples of the various capabilities, and provide some background on programming issues and practices. The hydrostats package provides a range of tools to make characterizing and analyzing model data easy and efficient. The electronic supplement provides working hydrostats examples.

Highlights

  • This short note introduces the hydrostats python package and the associated HydroErr error metric library

  • We have found that the major challenges in our model evaluation are a method to store and reference observed and predicted times series; a way to select data from specific time periods; a standard set of easy to use visualization tools; and easy access to the various error functions

  • Hydrostats [5,6] has many capabilities including: Data storage and retrieval based on the Python Data Analysis Library [7]; visualization and plotting routines using Matplotlib [8]; the HydroErr library [9,10,11]; and ensemble forecast metrics

Read more

Summary

Introduction

This short note introduces the hydrostats python package and the associated HydroErr error metric library. We have found that the major challenges in our model evaluation are a method to store and reference observed and predicted times series; a way to select data from specific time periods; a standard set of easy to use visualization tools; and easy access to the various error functions. To assist in these tasks, we implemented several tools using the Python language. We include a Jupyter notebook [14] as an electronic supplement to this article that contains usage and code examples of both hydrostats and HydroErr routines in Supplementary Materials

Background
Methods and Approach
Hydrostats
Forecast Error Metrics
Code Optimization
Three different coding approaches to to implementing thethe
Conclusions
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call