Skip to content

Commit

Permalink
updates readme, setup, and headers before PyPI upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibHlln committed Oct 26, 2018
1 parent 41f4a94 commit 72a82f2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![PyPI Version](https://badge.fury.io/py/hydroeval.svg)](https://pypi.python.org/pypi/hydroeval)

# HydroEval - An open-source evaluator for stream flow time series in Python

HydroEval is an open-source evaluator of stream flow time series in Python. It is licensed under GNU GPL-3.0 (see [licence file](https://github.com/ThibHlln/hydroeval/blob/master/LICENCE.md) provided). The purpose of this evaluator is to compare observed and simulated hydrographs using one or more objective functions. HydroEval is designed to calculate all objective functions in a vectorised way which makes all computations very efficient using [numpy](https://github.com/numpy/numpy) (and hence C code under the hood).
HydroEval is an open-source evaluator for stream flow time series in Python. It is licensed under GNU GPL-3.0 (see [licence file](https://github.com/ThibHlln/hydroeval/blob/master/LICENCE.md) provided). The purpose of this evaluator is to compare observed and simulated hydrographs using one or more objective functions. HydroEval is designed to calculate all objective functions in a vectorised way (using [numpy](https://github.com/numpy/numpy), and therefore C code in the background) which makes for very efficient computation of the objective functions.

## How to Install

The simplest way to install HydroEval is to use pip and a link to the GitHub repository:
HydroEval is available on PyPI, so you can simply use pip and the name of the package:

python -m pip install hydroeval

You can also use pip and a link to the GitHub repository directly:

python -m pip install git+https://github.com/ThibHlln/hydroeval.git

Expand All @@ -20,7 +25,7 @@ A tutorial in the form of a [Jupyter notebook](https://github.com/ThibHlln/hydro

## Objective Functions Available

The objective functions currently available in HydroEval that evaluate the fit between observed and simulated stream flow timeseries are as follows:
The objective functions currently available in HydroEval to evaluate the fit between observed and simulated stream flow time series are as follows:
* [Nash-Sutcliffe Efficiency](https://doi.org/10.1016/0022-1694(70)90255-6) (`nse`)
* [Original Kling-Gupta Efficiency](https://doi.org/10.1016/j.jhydrol.2009.08.003) (`kge`) and its three components (r, α, β)
* [Modified Kling-Gupta Efficiency](https://doi.org/10.1016/j.jhydrol.2012.01.011) (`kgeprime`) and its three components (r, γ, β)
Expand All @@ -34,7 +39,7 @@ Moreover, KGE and NSE can be calculated in a bounded version following [Mathevet
* Bounded Original Kling-Gupta Efficiency (`kge_c2m`)
* Bounded Modified Kling-Gupta Efficiency (`kgeprime_c2m`)

Finally, any of the objective functions can take an optimal argument `transform`. This argument allows to apply a transformation on the observed and simulated stream flow timeseries prior the calculation of the objective function. The possible transformations are as follows:
Finally, any of the objective functions can take an optimal argument `transform`. This argument allows to apply a transformation on both the observed and the simulated stream flow time series prior the calculation of the objective function. The possible transformations are as follows:
* Inverted flows (using `transform='inv'`)
* Square Root-transformed flows (using `transform='sqrt'`)
* Natural Logarithm-transformed flows (using `transform='log'`)
Expand All @@ -45,7 +50,7 @@ HydroEval requires the popular Python package `numpy` to be installed on the Pyt

## Version History

* 0.0.1 [14 Oct 2018]: First version of HydroEval
* 0.0.1 [26 Oct 2018]: First version of HydroEval

## Acknowledgment

Expand Down
2 changes: 1 addition & 1 deletion hydroeval/hydroeval.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# This file is part of HydroEval: An Evaluator for Hydrological Time Series
# This file is part of HydroEval: An Evaluator for Stream Flow Time Series
# Copyright (C) 2018 Thibault Hallouin (1)
#
# (1) Dooge Centre for Water Resources Research, University College Dublin, Ireland
Expand Down
4 changes: 2 additions & 2 deletions hydroeval/objective_functions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# This file is part of HydroEval: An Evaluator for Hydrological Time Series
# This file is part of HydroEval: An Evaluator for Stream Flow Time Series
# Copyright (C) 2018 Thibault Hallouin (1)
#
# (1) Dooge Centre for Water Resources Research, University College Dublin, Ireland
Expand Down Expand Up @@ -54,7 +54,7 @@ def kge(simulation_s, evaluation):
return np.vstack((kge_, r, alpha[:, 0], beta[:, 0])).T


# Modified kling-Gupta Efficiency (kling et al. 2012 - https://doi.org/10.1016/j.jhydrol.2012.01.011)
# Modified Kling-Gupta Efficiency (Kling et al. 2012 - https://doi.org/10.1016/j.jhydrol.2012.01.011)
def kgeprime(simulation_s, evaluation):
# calculate correlation coefficient
sim_mean = np.reshape(np.mean(simulation_s, axis=1), (simulation_s.shape[0], 1))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

version='0.0.1',

description='HydroEval: An Evaluator for Hydrological Time Series',
description='HydroEval: An Evaluator for Stream Flow Time Series',

url='https://github.com/ThibHlln/hydroeval',

Expand Down

0 comments on commit 72a82f2

Please sign in to comment.