IHEWAwapor

This is the documentation of IHEWAwapor.

Howto use

from IHEWAwapor import WPdownload as WaPOR

APIToken    = 'Your WaPOR API token'
latlim      = [7.89, 12.4]
lonlim      = [37.95, 43.35]
Startdate   = '2009-01-01'
Enddate     = '2009-02-01'

arg = {
    'APIToken': APIToken,
    'Dir':      dir_path,
    'Startdate':Startdate,
    'Enddate':  Enddate,
    'latlim':   latlim,
    'lonlim':   lonlim,
    'version':  2,
    'level':    1
}

print('\n===== WaPOR.AET =====')
WaPOR.AET_dekadal(**arg)
WaPOR.AET_monthly(**arg)
WaPOR.AET_yearly(**arg)

print('\n===== WaPOR.I =====')
WaPOR.I_yearly(**arg)

print('\n===== WaPOR.LCC =====')
WaPOR.LCC_yearly(**arg)

print('\n===== WaPOR.NPP =====')
WaPOR.NPP_dekadal(**arg)

print('\n===== WaPOR.PCP =====')
WaPOR.PCP_daily(**arg)
WaPOR.PCP_monthly(**arg)
WaPOR.PCP_yearly(**arg)

print('\n===== WaPOR.RET =====')
WaPOR.RET_monthly(**arg)
WaPOR.RET_yearly(**arg)

Development

$ git clone https://github.com/wateraccounting/IHEWAwapor.git

From the root of the project

$ python setup.py --version

Format scripts by PEP8

$ autopep8 --in-place --aggressive src/IHEWAwapor/WPdownload/download/WaporAPI.py

Unit test

$ python setup.py test

Read the Docs

$ python setup.py doctest

$ python setup.py docs

PyPI upload, run setup.py:

1. Commit -> Git - tag - add - v0.0.1 -> ``setup.py`` -> push
2. Github - Release - new release v0.0.1
$ python setup.py sdist bdist_wheel

$ twine check dist/*.tar.

$ twine upload dist/*

Indices and tables