Skip to main content

CATCHMOD is widely used rainfall runoff model in the United Kingdom. It was introduced by Wilby (1994). This version is developed in Python and utilises Cython to allow efficient execution of long time series.

https://travis-ci.org/pywr/pycatchmod.svg?branch=master

Features

pycatchmod includes the following features:

  • Core CATCHMOD algorithm written in Cython for speed,

  • Simultaneous simulation of multiple input timeseries with the same catchment parameters, and

  • Integration with numpy arrays.

  • Implementation of Oudin (2005) PET formula to calculate PET from temperature.

  • A command line interface

Installation

The module is primarily written in Cython and will need a C compiler installed to build. The code has been tested successfully with GCC (Linux), MSVC (Windows) and clang (OS X).

To install, use setup.py as you normally would:

python setup.py install

Once installed, tests can be run using the py.test command:

py.test tests

Command line interface

A command line interface has been written for convenience. This is installed as the pycatchmod command. See:

pycatchmod --help

You can access the help for each of the sub-commands using the --help switch, e.g.:

pycatchmod run --help

To run a model, use the run sub-command:

pycatchmod run --parameters thames.json --rainfall thames_rainfall.csv --pet thames_pet.csv --output thames_flow.csv

The command line interface also provides some tools for working with the Excel implementation of CATCHMOD. The parameters from a model can be extracted from an Excel file using dump e.g.:

pycatchmod dump --filename thames.xls

The parameters are printed in JSON format to the standard output (STDOUT). An example of this format can be found in the tests directory. This data can be redirected into a file using a pipe:

pycatchmod dump --filename thames.xls > thames.json

You can use the compare command to compare the results of pycatchmod and an Excel model. Any (significant) differences between the outputs is considered a bug (and should be reported via GitHub).

pycatchmod compare --filename thames.xls --plot

Changes

Version 1.1.0

  • Added feature to output flow per area.

Version 1.0.0

  • Initial release

Licence

This work is licenced under the GNU General Public Licence Version 3 (GNU GPLv3). Please see LICENCE for details.

Authors

Acknowledgements

This work was funded by the University of Manchester, United Kingdom.

References

Wilby, R., Greenfield, B., Glenny, C., 1994. A coupled synoptic-hydrological model for climate change impact assessment. Journal of Hydrology. 153. p265-290.

Release files for pycatchmod 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycatchmod 1.1.0
File Size Uploaded
pycatchmod-1.1.0.tar.gz 49.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pycatchmod 1.1.0
File Interpreter ABI Platform
pycatchmod-1.1.0-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details
pycatchmod-1.1.0-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details

Total release size: 1.3 MB

Release files / pycatchmod-1.1.0.tar.gz

Download URL pycatchmod-1.1.0.tar.gz
Size 49.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4744494dcf09b44bc2623968313a1c515cd37c1243a417bfa731a6270f3aa669
BLAKE2b-256 checksum
How to use checksums
51b825de345ba024a4cbd18ac312eb465aa3cab0535ca5bbf8cbfc28c4f1dd2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

Release files / pycatchmod-1.1.0-cp36-cp36m-win_amd64.whl

Download URL pycatchmod-1.1.0-cp36-cp36m-win_amd64.whl
Size 254.8 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
24433243e265820e23e914d1e4f81c27a0100926ef0e11cd88ad47f531dee2fd
BLAKE2b-256 checksum
How to use checksums
9432a03cdd06609246cd1045be93907bf002a0d8fe3988fef9a52c6ba83c4977
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

Release files / pycatchmod-1.1.0-cp36-cp36m-manylinux1_x86_64.whl

Download URL pycatchmod-1.1.0-cp36-cp36m-manylinux1_x86_64.whl
Size 996.5 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
8f770fe1c5a7abf244401bb7b0353462f37877032fb5acde2036e74cd17d11a4
BLAKE2b-256 checksum
How to use checksums
76574b092cf1c0bf6c947f50d5e82ad0c380b3daf6fb56fcb7ba04f28722f49d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.7.1

Release history Release notifications | RSS feed

This release

1.1.0 This release

3 release files

1.0.0

3 release files

0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page