-
Notifications
You must be signed in to change notification settings - Fork 0
/
Henna_Maria - 2021-06-22T150549.633.ipynb.txt
53 lines (53 loc) · 1.67 KB
/
Henna_Maria - 2021-06-22T150549.633.ipynb.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "Henna Maria",
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "code",
"metadata": {
"id": "mTNdWJHnErLQ"
},
"source": [
"if __name__ == \"__main__\":\n",
" # Define file path\n",
" dataDir = r\"G:\\2020\\weather data\\2019\\EVP\" \n",
" dataDir_out = r\"G:\\2020\\weather data\\2019\\EVP\"\n",
" \n",
" sidArr = [\"53463\"] # Station number list\n",
" fields = [\"TEM\", \"TMN\", \"TMX\", \"PRE\", \"RHU\", \"WIN\", \"PRS\", \"SSD\"] # Optional extraction variable list\n",
" START = \"2019-01-01\" # Start date\n",
" END = \"2019-12-31\" # End date\n",
" \n",
" period = [START.split('-')[0] + START.split('-')[1], END.split('-')[0] + END.split('-')[1]]\n",
" period_days = GetDateArr_strdays(START, END)\n",
" days = []\n",
" \n",
" # Extract data site by site\n",
" for sid in sidArr:\n",
" print(sid)\n",
" \n",
" # Calculate the number of initial search lines to improve the extraction speed\n",
" sr = sidArr.index(sid) * 28\n",
" \n",
" c = ClimateData(dataDir, dataDir_out, int(sid), fields, period, days)\n",
" c.ExtractData(sr=sr)\n",
" c.SaveData(period_days, avg=False, d=False)"
],
"execution_count": null,
"outputs": []
}
]
}