-
Notifications
You must be signed in to change notification settings - Fork 4
/
run_resource_analysis.py
47 lines (42 loc) · 1.28 KB
/
run_resource_analysis.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"""
Results from resource analysis can be displayed like this. Due to setting the plotting style to PDF, map plots need to be independent from computing center processing.
"""
import os
import matplotlib.pyplot as plt
from AWERA import config
from AWERA.resource_analysis.resource_analysis import ResourceAnalysis
import matplotlib.pyplot as plt
#from .run_awera import training_settings
#settings = training_settings[5]
import time
from AWERA.utils.convenience_utils import write_timing_info
since = time.time()
settings = {
'Processing': {'n_cores': 3},
'Data': {
'n_locs': 500, # 10,
'location_type': 'europe_ref'},
'Clustering': {
'n_clusters': 8,
'training': {
'n_locs': 5000,
'location_type': 'europe'
}
},
}
print(config.Data.locations)
config.update(settings)
ra = ResourceAnalysis(config)
# ra.single_loc_plot(loc=(52.0, 5.0), # Caubauw
# time_ids=None,
# ceiling=500,
# floor=50)
# ra.plot_all_maps()
ra.height_range_sanity_check()
plt.show()
print('Done.')
print('------------------------------ Config:')
print(ra.config)
print('------------------------------ Time:')
write_timing_info('Run finished.',
time.time() - since)