This release is a pre-release and may not be stable for production use.
Tank Hydrologic Model
Python implementation of Tank Hydrologic Model, a conceptual rainfall-runoff model proposed by Sugawara and Funiyuki (1956)
Installation
Tank-Model can be installed as a python package from PyPI
$ pip install tank-model
Alternatively, it can be installed directly from git
$ pip install https://github.com/nzahasan/tank-model/zipball/main
after successful installation tank_cmd should be available which can be used for setting up new project, optimizing the project and computation.
# get help text command line utility
$ tank_cmd --help
# get help text of subcommand
$ tank_cmd new-project --help
Setting up a new model:
New project can be created using the following command. This command creates a folder in working directory with a json formatted project definition inside it.
$ tank_cmd new-project project_name
A sample project definition looks like this
{
"interval": 24.0,
"basin": "sample_project.basin.json",
"precipitation": "sample_project.pr.csv",
"evapotranspiration": "sample_project.et.csv",
"discharge": "sample_project.q.csv",
"result": "sample_project.result.csv",
"statistics": "sample_project.stats.json",
"start": "2020-01-01T00:00:00",
"end": "2020-12-31T00:00:00"
}
here interval is the time step of simulation in hours. The other attributes are file locations; precipitation, evapotranspiration and discharge are CSV files containing time-series data. These files should be formatted according to the file format mentioned here file-format-spec.md
start and end are optional and restrict compute, optimize and plot-result to the given date range (format %Y-%m-%dT%H:%M:%S, matching the time-series files). If omitted, the full period available in the input files is simulated; either one can be given on its own, in which case the other side of the range is left unbounded.
precipitation & evapotranspiration serve as input data for the model simulation and resulting output is stored in the result file following the time-series CSV format mentioned earlier. Data in the discharge is used for model calibration. And performance matrices are stored in the statistics file.
Converting HEC-HMS basin to tank model basin
$ tank_cmd hms2tank -bf hechms_basin_file -of output_tank_basin_file_path
Computing tank model
$ tank_cmd compute -pf project_name.project.json
Automatic optimization of tank model
$ tank_cmd optimize -pf project_name.project.json
Known Limitions
- Currently there is no way to optimize for multiple root node
References:
1. Paik K., Kim J. H., Kim H. S., Lee D. R. (2005) A conceptual rainfall-runoff model considering seasonal variation.
2. Aguilar C., Polo M. J. (2011) Generating reference evapotranspiration surfaces from the Hargreaves equation at watershed scale.
3. Taib A. T. M., Tahir W., Ramli S., Mohtar I. S. A. (2022) Hydro-Meteorological Flood Forecasting Using Tank Model With Satellite-Based Rainfall Input For Kemaman River Catchment.
4. D. N. Moriasi, J. G. Arnold, M. W. Van Liew, R. L. Bingner, R. D. Harmel, T. L. Veith (2007) Model Evaluation Guidelines For Systematic Quantification Of Accuracy In Watershed Simulations.
Metadata
Release files for tank-model 3.0.0b5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tank_model-3.0.0b5.tar.gz | 21.5 MB | With provenance | Details for tank_model-3.0.0b5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tank_model-3.0.0b5-py3-none-any.whl | Python 3 | none | any | Details for tank_model-3.0.0b5-py3-none-any.whl |
Total release size: 21.6 MB
Release files / tank_model-3.0.0b5.tar.gz
| Download URL | tank_model-3.0.0b5.tar.gz |
|---|---|
| Size | 21.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
870c158a03e111f6454dd16619460d20eb5dba9bf494ae82e58d90d92e49b13d
|
|
BLAKE2b-256 checksum How to use checksums |
52a64e7861782a5731dfbb61407fb960295eabfe42fa6954c1aba3ecc6ce169c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logRelease files / tank_model-3.0.0b5-py3-none-any.whl
| Download URL | tank_model-3.0.0b5-py3-none-any.whl |
|---|---|
| Size | 26.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c68bbdfe91e5d047a03b43b5764392f03698c99d5939a71f0efa2c068e55cbae
|
|
BLAKE2b-256 checksum How to use checksums |
693c0240064c03586c3ce6687639569f19b1ceb91c48bd8c0a80d870b8fc6c3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logSecurity for tank-model 3.0.0b5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for tank_model-3.0.0b5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.