Skip to main content

Python implementation of Tank Hydrologic Model, a conceptual rainfall-runoff model proposed by Sugawara and Funiyuki (1956)

Project description

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 using the following commands

$ pip install https://github.com/nzahasan/tank-model/zipball/master

after successful installation tank_cmd.py 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.py --help

# get help text of subcommand
$ tank_cmd.py 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.py 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.py hms2tank -bf hechms_basin_file -of output_tank_basin_file_path

Computing tank model

$ tank_cmd.py compute -pf project_name.project.json

Automatic optimization of tank model

$ tank_cmd.py 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tank_model-3.0.0b3.tar.gz (21.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tank_model-3.0.0b3-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

Details for the file tank_model-3.0.0b3.tar.gz.

File metadata

  • Download URL: tank_model-3.0.0b3.tar.gz
  • Upload date:
  • Size: 21.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tank_model-3.0.0b3.tar.gz
Algorithm Hash digest
SHA256 0c20c66286422fe5156b1eaf5103f9eead8e6b58b30e3b242b3ac420b6d2cf04
MD5 b214424b3f01c07c173ab4b9a0607d9e
BLAKE2b-256 1404c931f880b0b7923fa064b87250e15f84921416da0dcf8f000fc524eed524

See more details on using hashes here.

Provenance

The following attestation bundles were made for tank_model-3.0.0b3.tar.gz:

Publisher: test-build-package-upload-pypi.yml on nzahasan/tank-model

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tank_model-3.0.0b3-py3-none-any.whl.

File metadata

  • Download URL: tank_model-3.0.0b3-py3-none-any.whl
  • Upload date:
  • Size: 27.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tank_model-3.0.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 e0557b6f1a2d427a563743c9592f09df56e4f7b05d640cb682a379ab511574aa
MD5 98659565e2f8c72cc0a7a31784b59772
BLAKE2b-256 16076e4b0ffc8a3c34e7bf715b504bcf922dacac2db8aa1f9917597a6672b8dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for tank_model-3.0.0b3-py3-none-any.whl:

Publisher: test-build-package-upload-pypi.yml on nzahasan/tank-model

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page