Skip to main content

A toolbox for analyzing hydrological drought

Project description

What is pydat?

The Python Drought Analysis Tool (pydat) is a python package that automatically derives multi-year streamflow deficit Severity-Duration-Frequency (SDF) curves from streamflow data and empowers users to effortlessly create SDF curves. Also, it synthesizes daily-scale streamflow time series called streamflow analogs representing those SDFs. Alongside its core function, pydat offers several other useful commands, including:

  1. Presenting a comprehensive list of the stations in each state or watershed.
  2. Displaying the streamflow time series of each USGS station.

The package has been designed to address the need for streamflow deficit SDFs information and their usage in operational water management amid persistent streamflow drought conditions nationally in the United States (US). The picture below shows a sample of the SDF curves for station 03098600 in the Ohio state.

index

Rainfall and flood frequency analysis methods are well established and widely used in analysis and design studies, including but not limited to stormwater management and design studies and hydraulic structures designs, etc. In contrast, no standard method(s) exist for persistent streamflow drought analysis and guidelines for water planners and managers to use in water supply planning and management studies. Although indices related to streamflow deficits are available in the literature, their limitation in usage in planning and operational way hinders their adaptation and useability among water planning and management agencies and utilities. Pydat has been developed to bridge this research and operations gap.

Methodology

The first step in using the pydat package is to obtain the daily streamflow time series for a given region of interest. By utilizing a service called the National Water Information System (NWIS) it obtains the daily mean stream values of U.S. Geological Survey (USGS) stream gauge data as its default source. The user can specify the state of interest by providing different inputs such as its two-letter abbreviation, after which all relevant USGS station information and their IDs will be displayed. The pydat package builds upon the python USGS dataretrieval package for data retrieval from the USGS website. Furthermore, it should be noted that pydat can also work with other data sources (such as CSV files) with just a few simple tips about the data table and heading columns, as explained in the upcoming sections.

Once a station is selected, pydat develops multi-year streamflow deficit SDFs for that station, allowing the user to specify the SDF duration. The SDFs are then displayed in both tabular and visual forms for the selected duration. It is important to note that the durations are calculated based on the moving average, and the deficit severity is calculated as a departure from the long-term average flow for each duration.

The final step in using pydat is calculating the daily streamflow time series for the points of the developed streamflow deficit SDFs. Since each point on the SDFs represents a specific event of a deficit level, the duration of the deficit, and the return period, a corresponding daily streamflow time series exists for that point. By linking the SDFs with daily resolution streamflow time series, the SDFs can be operationalized, providing water planners and managers with information about the duration, deficit level, and return periods of selected daily streamflow time series. This allows them to test their water supply system’s response to a range of plausible persistent streamflow deficit scenarios. Overall, pydat provides a valuable tool for water planning and management agencies and water researchers in the face of persistent streamflow drought conditions. The figure below shows the steps of the pydat package.

methodology

Installation

To use the package first it is required to clone the repository and install the required packages.

The code needed for doing this part in Google Colab is written in the below cells.

Some basic Git commands are:

!git clone https://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@github.com/savalann/pydat.git

%cd pydat/pydat/

!pip3 install -r requirements.txt

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

pyndat-0.0.2.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

pyndat-0.0.2-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file pyndat-0.0.2.tar.gz.

File metadata

  • Download URL: pyndat-0.0.2.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.3

File hashes

Hashes for pyndat-0.0.2.tar.gz
Algorithm Hash digest
SHA256 26e9db455fd842c2530405a5c281bf84a5e38dddb63021c56b0fcad41ebf2bec
MD5 1a10d9d0c25cc42e111ce5ac40637c74
BLAKE2b-256 3ed66e0d69109f96f0a9fe7857cbdafba8ae54035bbee47f72a1f002527444e1

See more details on using hashes here.

File details

Details for the file pyndat-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyndat-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.3

File hashes

Hashes for pyndat-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 15f5dc6b79417adfa96faaa90a27427579c2b95f84180e5b951a953b67aa5018
MD5 7139c65eabb8d6f510d8ec891059b992
BLAKE2b-256 a9bfb759e24b376ff8047f8cf0e458d1b5f61b935315b8794fd18d70aa1806e6

See more details on using hashes here.

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