从奥斯汀政府的“ehyd.gv.at”平台导出和分析>10a降雨时间序列的各种工具。
ehyd-tools的Python项目详细描述
)Institute of Urban Water Management and Landscape Water Engineering、Graz University of Technology和Markus Pichler
ehyd工具
从奥斯汀政府的ehyd.gv.at平台导出和分析10a降雨时间序列的各种工具。
如果您对像(_)kostra这样的统计暴雨分析感兴趣,请查看与此包兼容的我的另一个python包intensity_duration_frequency_analysis。
安装
剧本是用Python写的。
窗口
我建议使用Anaconda在windows上安装python,并在anaconda提示下安装命令行工具。
或者,可以从website安装原始python。 要使用下面用法部分中解释的语法, 必须将python二进制文件的路径添加到环境变量中。 这是安装窗口中的一个选项,如下所示:
- [X]将python 3.7添加到path
Linux/Unix
python是预先安装在大多数操作系统上的。
必需的python包
此程序所需的软件包将在安装过程中与PIP一起安装,并可以在“requirements.txt”文件中看到。
重新安装
pip install ehyd-tools
为特殊选项的命令添加以下标记:
--user
:仅为本地用户帐户安装包--upgrade
:更新包
用法
要启动脚本,请在终端/提示符中使用以下命令
窗口:
python -m ehyd_tools
类Unix:
ehyd_tools
命令行工具
ehyd_tools -h
usage: ehyd_tools [-h] [-id ID] [--input INPUT] [--add_gaps] [--to_csv] [--to_parquet] [--max10a] [--start START] [--end END] [--plot] [--statistics] [--meta] [--unix] optional arguments: -h, --help show this help message and exit -id ID the id number for the station from the ehyd.gv.at platform --input INPUT path to the rain input file including the filename --add_gaps get the gaps in the series as a csv table --to_csv save the data to the current directory --to_parquet save the data to the current directory --max10a consider only 10 years with the most availability --start START custom start time, Format="YYYY-MM-DD" --end END custom end time, Format="YYYY-MM-DD" --plot plot the data --statistics creates a txt file with basic statistics (sum, max & min) --meta add the txt file with the meta data of the ehyd data --unix export the csv files with a "," as separator and a "." as decimal sign.
示例
例1
ehyd_tools -id 100180 --to_csv --max10a --add_gaps
结果将是:
首先,车站的名称将打印到终端上。
You choose the station: "Tschagguns" with the id: "100180".
由于^ {CD8>}参数,该系列将基于最大可用性获得新的开始和结束时间。
Data was clipped to start="1982-04-30" and end="1992-04-30".
输出文件的标准文件名以ehyd\lt;id>;开头。
将在当前目录中创建所有文件。
使用--add_gaps
参数,将创建一个名为ehyd lt;id>;_gaps.csv的序列间隙的csv文件。
使用--to_csv
参数,将创建名为ehyd\lt;id>;.csv的序列的csv文件。
在创建上述两个文件的命令之后:
ehyd_100180.csv
ehyd_100180_gaps.csv
;start;end;gaps in days
8;1961-10-27 06:58:00;1962-05-16 07:00:00;201,001
20;1972-10-19 06:58:00;1973-05-02 07:00:00;195,001
5;1958-11-01 07:01:00;1959-05-15 07:00:00;194,999
2;1955-10-23 07:01:00;1956-05-01 07:00:00;190,999
22;1974-10-27 06:58:00;1975-05-05 07:00:00;190,001
0;1953-11-01 06:59:00;1954-05-06 07:01:00;186,001
13;1966-11-01 06:59:00;1967-05-04 07:00:00;184,001
27;1979-10-31 06:58:00;1980-05-01 07:00:00;183,001
23;1975-10-31 06:58:00;1976-05-01 07:00:00;183,001
12;1965-10-31 06:58:00;1966-05-01 07:00:00;182,001
21;1973-11-01 06:59:00;1974-05-01 07:01:00;181,001
29;1981-11-01 06:59:00;1982-05-01 07:01:00;181,001
26;1978-10-31 06:58:00;1979-04-25 07:01:00;176,002
15;1968-10-31 06:58:00;1969-04-24 07:00:00;175,001
3;1956-10-26 07:01:00;1957-04-19 07:00:00;174,999
7;1960-10-14 06:59:00;1961-04-04 07:00:00;172,001
9;1962-11-01 06:59:00;1963-04-19 07:00:00;169,001
25;1977-11-14 06:58:00;1978-05-01 07:02:00;168,003
10;1963-11-01 06:59:00;1964-04-15 07:00:00;166,001
19;1971-10-31 06:58:00;1972-04-13 07:00:00;165,001
24;1976-11-20 06:59:00;1977-05-01 07:00:00;162,001
1;1954-11-06 06:59:00;1955-04-16 07:00:00;161,001
6;1959-10-26 06:58:00;1960-04-01 07:00:00;158,001
4;1957-10-31 06:58:00;1958-04-01 07:00:00;152,001
14;1967-11-01 07:01:00;1968-04-01 07:00:00;151,999
18;1970-11-01 06:59:00;1971-04-01 07:00:00;151,001
11;1964-11-16 06:59:00;1965-04-01 07:00:00;136,001
17;1970-01-01 00:00:00;1970-04-30 07:00:00;119,292
16;1969-10-31 06:58:00;1970-01-01 00:00:00;61,710
28;1981-01-01 06:59:00;1981-03-01 07:01:00;59,001
例2
ehyd_tools -id 100180 --plot
使用--plot
参数,将创建名为ehyd lt;id>;_plot.png的序列条形图的png文件。
对于超过15年的数据序列,使用年和,否则使用月和。
在创建上述命令之后,将创建这些文件:
ehyd_100180_plot.png
例3
ehyd_tools -id 100180 --meta --statistics
使用--meta
参数,将创建一个包含名为ehyd lt;id>;_meta.txt的元数据的txt文件。
使用--statistics
参数,将创建一个包含名为ehyd lt;id>;_stats.txt的序列统计信息的txt文件。
在执行上述命令后,将创建这两个文件:
ehyd_100180_meta.txt
Messstelle: Tschagguns
HZB-Nummer: 100180
Errichtet: 1921
Sachgebiet: NLV
Dienststelle: HD-Vorarlberg
Messstellenbetreiber: Hydrographischer Dienst
Höhe:
gültig seit: Höhe [m ü.A.]:
01.08.1921 681
Geographische Koordinaten (Referenzellipsoid: Bessel 1841):
gültig seit: Länge (Grad,Min,Sek): Breite (Grad,Min,Sek):
01.08.1921 09 54 57 47 04 03
Messgrößen,-art: seit: bis:
Niederschlag-Ombrometer 1921
Niederschlag-Ombrograph 1953
Schneehöhe 1921
Neuschneehöhe 1921
Temperatur 1922
ehyd_100180_stats.txt
The annual totals of the data series serve as the data basis.
The following statistics were analyzed:
The maximum is 1740 mm and was in the year 1999 (with 100% Data available).
The minimum is 462 mm and was in the year 1959 (with 45% Data available).
The mean is 1030 mm (with 77% Data available in average).
车站
id | station |
---|---|
100180 | Tschagguns |
100370 | Thüringen |
100446 | Lustenau |
100479 | Dornbirn |
100776 | Bregenz |
101303 | Leutasch-Kirchplatzl |
101816 | Ladis-Neuegg |
102772 | Kelchsau |
103143 | St. Johann in Tirol-Almdorf |
103895 | Eugendorf |
104604 | Schlägl |
104877 | Linz-Urfahr |
105445 | Vöcklabruck |
105528 | Wels |
105908 | Flachau |
106112 | Liezen |
106252 | Wildalpen |
106435 | Klaus an der Pyhrnbahn |
106559 | Steyr |
106856 | Weitersfelden-Ritzenedt |
107029 | Lunz am See |
107284 | Melk |
107854 | Hollabrunn |
108118 | Wien (Botanischer Garten) |
108456 | Gutenstein |
108563 | Naglern |
109280 | Waidhofen an der Thaya |
109918 | Neunkirchen |
110064 | Gattendorf |
110312 | Karl |
110734 | Eisenstadt |
111112 | Oberwart |
111435 | Alpl |
111716 | Judenburg |
112086 | Graz-Andritz |
112391 | St.Peter am Ottersbach |
112995 | Ried im Innkreis |
113001 | Sillian |
113050 | Matrei in Osttirol |
113548 | Afritz |
113670 | Waidegg |
114561 | Klagenfurt |
114702 | Wolfsberg |
115055 | Kendlbruck |
115642 | St.Pölten |
120022 | Hall in Tirol |