No project description provided
Project description
Peatland Time Series
This Python library contains functions which make it possible to analyze the water retention in a peatland from time series of precipitation and water table depth.
Installation
pip install peatland-time-series
Usage
Calculating the Specific Yield (Sy)
The calculate_sy
function allows you to calculate the specific yield (Sy)
from a time series of precipitation and the water table depth.
Lets take the example of a CSV file ./data/time-series.csv
, a time-series of precipitation and water table depth. The table must have at least the columns "date", "data_prec" and "data_wtd". There is an example of CSV file:
date,data_prec,data_wtd
2011-06-16 12:00:00,-0.098,0
2011-06-16 13:00:00,-0.103,0
2011-06-16 14:00:00,-0.109,10.3
2011-06-16 15:00:00,-0.089,0
2011-06-16 16:00:00,-0.084,0
To calculate the Sy with other pertinent information:
import pandas
from peatland_time_series import calculate_sy
time_series = pandas.read_csv('./data/time-series.csv')
result = calculate_sy(time_series)
print(results.head())
Output:
date_beginning date_ending precision_sum max_wtd min_wtd durations intensities delta_h depth sy idx_max idx_min accuracy_mean accuracy_std
0 2011-06-16 14:00:00 2011-06-16 14:00:00 10.3 -0.084 -0.109 0.5 20.6 0.025 -0.0965 0.412000 2011-06-16 16:00:00 2011-06-16 14:00:00 0.001333 0.003317
1 2011-06-16 20:00:00 2011-06-16 21:00:00 3.7 -0.072 -0.100 1.0 3.7 0.028 -0.0860 0.132143 2011-06-16 23:00:00 2011-06-16 20:00:00 0.000000 0.000000
2 2011-06-18 04:00:00 2011-06-18 05:00:00 1.2 -0.067 -0.084 1.0 1.2 0.017 -0.0755 0.070588 2011-06-18 04:00:00 2011-06-18 09:00:00 0.000000 0.000000
3 2011-06-18 12:00:00 2011-06-18 12:00:00 0.4 -0.085 -0.094 0.5 0.8 0.009 -0.0895 0.044444 2011-06-18 12:00:00 2011-06-18 15:00:00 0.001556 0.002603
4 2011-06-18 17:00:00 2011-06-18 17:00:00 1.6 -0.077 -0.087 0.5 3.2 0.010 -0.0820 0.160000 2011-06-18 18:00:00 2011-06-18 17:00:00 0.000667 0.001000
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for peatland_time_series-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8db3b8f65007ca421007a2ebf483de499c200499f97dbfacb2f4c6e0fb5d8f9a |
|
MD5 | a447b9e8d0b259e1230474715020e99b |
|
BLAKE2b-256 | 7e6a905f35f726eb9ac730f722cd1e7e7d5d792f19209df150f9a12e0fe69b1b |
Close
Hashes for peatland_time_series-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82e537e45b42744850f96a2eb41486d7fe142b7f9f5a1c3633f4a5ec682676cc |
|
MD5 | 77bd3f41f046a1b319ffd8d0d1046680 |
|
BLAKE2b-256 | 9852d64b15aa236bd138de622b43e420d81a762143df569c21b41194290d892c |