forked from MAQ-Observations/post-processing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plot_Figures.py
30 lines (24 loc) · 1.12 KB
/
Plot_Figures.py
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
#Load modules
import datetime as dt
from fetch_data import *
from generate_graphs import *
#User defined input, specify your wishes below
start_date = dt.datetime(2024,1,1) #Start date (yyyy,mm,dd)
end_date = dt.datetime(2024,1,31) #End date (yyyy,mm,dd)
site = 1 #Site 1=Veenkampen, 2=Loobos, 3=Amsterdam
variables = ['TA_2_1_1', #Array of variables to download, see https://maq-observations.nl/instruments/ for a full list, use the 'Steam names', column 1
'TA_1_1_1',
'RH_1_1_1',
'SW_IN_1_1_1',
'SW_OUT_1_1_1',
'LW_IN_1_1_1',
'LW_OUT_1_1_1',
'VIS_1_1_1',
'WS_1_1_1',
'WD_1_1_1',
'P_1_1_1']
API_KEY = '<ApiKey>' #Put you API key here as a string, see https://maq-observations.nl/api/
save_files = True #True/False switch to save the generated figures
#Run the request
df = fetch_data(start_date,end_date,site,variables,API_KEY,False,'-')
generate_graphs(save_files,df)