-
Notifications
You must be signed in to change notification settings - Fork 0
/
CombineFuelFlows.py
78 lines (58 loc) · 2.3 KB
/
CombineFuelFlows.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 11 11:05:54 2022
@author: mathi
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import rc
from formplot import *
from scipy.optimize import curve_fit
import os
style = 'ppt'
if style == 'report':
plt.style.use('default')
fc = 'white'
elif style == 'ppt':
plt.style.use('dark_background')
fc = 'none'
##% ----------------------------- ###
### Auto ###
### ----------------------------- ###
# SC = 'HUB_FullBio'
# p = r'C:\Users\mathi\Danmarks Tekniske Universitet\Master Thesis at Sustainability Division - Documents\Codes\Electrolysis Infrastructure\.spinetoolbox\items\fuelflows\output'
# if SC != '':
# p = p + "\\" + SC + "\\"
# i = 0
# for file in os.listdir(p):
# if (file != 'FuelFlows.csv') & (file != 'FuelFlowsYearly.csv') & (file != 'TransportYearly.csv'):
# if i == 0:
# f = pd.read_csv(p + file)
# print(f)
# else:
# f = f.append(pd.read_csv(p + file))
# i += 1
# f.to_csv(p + 'FuelFlows.csv', index=False)
#%% ----------------------------- ###
### Manual ###
### ----------------------------- ###
i = 0
for SC in ['Base_ExportOnly2050', 'H2B_ExportOnly2050', 'HUB_ExportOnly2050',
'Base_4h', 'H2B_4h', 'HUB_4h']:
p = r'C:\Users\mathi\Danmarks Tekniske Universitet\Master Thesis at Sustainability Division - Documents\Codes\Electrolysis Infrastructure\.spinetoolbox\items\fuelflows\output'
if SC != '':
p = p + "\\" + SC + "\\"
if i == 0:
f = pd.read_csv(p + 'FuelFlows.csv')
else:
f = f.append(pd.read_csv(p + 'FuelFlows.csv'))
i += 1
## To last
p = r'C:\Users\mathi\Danmarks Tekniske Universitet\Master Thesis at Sustainability Division - Documents\Codes\Electrolysis Infrastructure\.spinetoolbox\items\fuelflows\output'
# f = f.append(pd.read_csv(p + '\FuelFlows_Sensitivities.csv'))
# f = f[f['Scenario'] != 'HUB_IT__SpineOpt@2022-06-01T15:09:16']
# f = f[f['Scenario'] != 'H2B_IT__SpineOpt@2022-06-01T15:09:16']
# f = f[f['Scenario'] != 'LBP_IT__SpineOpt@2022-06-01T16:12:13']
# f = f[f['Scenario'] != 'Base_IT__SpineOpt@2022-06-01T20:21:57']
f.to_csv(p + '\FuelFlows_ExportOnly2050.csv', index=False)