-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexampleSetup.py
More file actions
196 lines (169 loc) · 6.5 KB
/
Copy pathexampleSetup.py
File metadata and controls
196 lines (169 loc) · 6.5 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
from scripts.rawFileProcessing.fileInventory import fileInventory
from scripts.rawFileProcessing.rawFile import rawFile
from scripts.traceAnalysis.firstStage import firstStage
from scripts.newProject import createProject
import shutil
import os
reset = True
drive = 'E:'
if not os.path.isdir(drive):
drive = '/mnt/d'
# projectPath = f'{drive}/GSC_Work/deltaFluxes'
projectPath = 'testing/myProject'
if reset:
if os.path.exists(projectPath):
shutil.rmtree(projectPath)
if not os.path.isdir(projectPath):
createProject(projectPath=projectPath,sitesList=[
'configurationFiles/SCL_template.yml', # Template from preexisting metadata file for SCL
'configurationFiles/RDEC1_Seep_template.yml', # Template from preexisting metadata file for RDEC1
{'siteID': 'BSP','lat_lon': [69.319431, -135.478286],'startDate':'2026-06-01'}, # Template from dict for BSP
'FIL', # Generic template for site FIL and ILL
'ILL'
])
# inspect the traces in raw files
Met2024 = rawFile(
fileName=f"{drive}/data-dump/SCL/2024/20240912/Met_Data120.dat",
fileID='Met2024',
siteID='SCL',
fileNameMatch='Met_Data*.dat',
fileFormat='TOB3',
projectPath=projectPath,
mode='identifyTraces'
)
MetWx2024 = rawFile(
templateFile=f"{drive}/data-dump/SCL/2024/20240914/OverWinter.DEF",
fileName=f"{drive}/data-dump/SCL/2024/20240914/WX_data.dat",
fileID='MetWx2024',
siteID='SCL',
fileNameMatch='WX_data.dat',
fileFormat='MixedArray',
projectPath=projectPath,
mode='identifyTraces'
)
# inspect the traces in raw files
Flux2024 = rawFile(
fileName=f"{drive}/data-dump/SCL/2024/eddypro_t_full_output_2025-05-02T224906_exp.csv",
fileID='Flux2024',
siteID='SCL',
fileNameMatch='eddypro_t_full_output*.csv',
fileFormat='EddyProOutput',
projectPath=projectPath,
mode='identifyTraces',
ignore=['DOY','motor_failure_LI-7700','motor_spinning_LI-7700','daytime','x_peak','x_offset','x_10%','x_30%','x_50%','x_70%','x_90%','daytime','model','amplitude_resolution_hf','drop_out_hf','h2o_def_timelag','co2_def_timelag','ch4_def_timelag','bad_aux_tc1_LI-7700','bad_aux_tc2_LI-7700','bad_aux_tc1_LI-7700']
)
Met2025 = rawFile(
fileName=f"{drive}/data-dump/SCL/2025/20250806/57840_Flux_CSFormat_19.dat",
fileID='Met2025',
siteID='SCL',
fileNameMatch='57840_Flux_CSFormat_*.dat',
fileFormat='TOB3',
projectPath=projectPath,
mode='identifyTraces',
ignore=['*!','TA_1_1_3','RH_1_1_2','SW_IN','FC_mass','H']
# ignore=['hour_angle','FETCH_MAX','FETCH_90','FETCH_80','FETCH_70','FETCH_FILTER','FETCH_INTRST','FP_FETCH_INTRST','FP_FETCH_INTRST','FP_EQUATION']
)
Flux2025 = rawFile(
fileName=f"{drive}/data-dump/SCL/corrected/recalc/eddypro_corrected_v4_full_output_2026-06-14T195313_exp.csv",
fileID='Flux2025',
siteID='SCL',
fileNameMatch='eddypro_corrected_v4_full_output*.csv',
fileFormat='EddyProOutput',
projectPath=projectPath,
mode='identifyTraces',
ignore=['DOY','motor_failure_LI-7700','motor_spinning_LI-7700','daytime','x_peak','x_offset','x_10%','x_30%','x_50%','x_70%','x_90%','daytime','model','amplitude_resolution_hf','drop_out_hf','h2o_def_timelag','co2_def_timelag','ch4_def_timelag','bad_aux_tc1_LI-7700','bad_aux_tc2_LI-7700','bad_aux_tc1_LI-7700']
)
SSM = rawFile(
fileName=f"{drive}/data-dump/SCL/2024/20240914/20750528-SHSC.SSM.SGT.240720_240913readout.csv",
fileID='SSM_TS',
siteID='SCL',
fileNameMatch='20750528-SHSC.SSM.SGT*.csv',
fileFormat='HOBOcsv',
projectPath=projectPath,
mode='identifyTraces',
dataIntervalSeconds=3600.0 # were temporarily set to half-hourly, can just drop those data
)
WSM = rawFile(
fileName=f"{drive}/data-dump/SCL/2024/20240914/20750527-SHSC.WSM.SGT.240720_240913readout.csv",
fileID='SSM_TS',
siteID='SCL',
fileNameMatch='20750527-SHSC.WSM.SGT*.csv',
fileFormat='HOBOcsv',
projectPath=projectPath,
mode='identifyTraces',
dataIntervalSeconds=3600.0 # were temporarily set to half-hourly, can just drop those data
)
Met2024 = fileInventory(
fileID=Met2024.fileID,
siteID=Met2024.siteID,
fileFormat=Met2024.fileFormat,
projectPath=projectPath).fileSearch(f"{drive}/data-dump/SCL/2024")
MetWx2024 = fileInventory(
fileID=MetWx2024.fileID,
siteID=MetWx2024.siteID,
fileFormat=MetWx2024.fileFormat,
projectPath=projectPath)
MetWx2024.fileSearch(f"{drive}/data-dump/SCL/2024/20240914")
MetWx2024.fileSearch(f"{drive}/data-dump/SCL/2025/20250414")
MetWx2024.fileSearch(f"{drive}/data-dump/SCL/2025/20250619")
Flux2024 = fileInventory(
fileID=Flux2024.fileID,
siteID=Flux2024.siteID,
fileFormat=Flux2024.fileFormat,
projectPath=projectPath).fileSearch(f"{drive}/data-dump/SCL/2024")
Flux2025 = fileInventory(
fileID=Flux2025.fileID,
siteID=Flux2025.siteID,
fileFormat=Flux2025.fileFormat,
projectPath=projectPath)
Flux2025.fileSearch(f"{drive}/data-dump/SCL/corrected/recalc")
# breakpoint()
Met2025 = fileInventory(
fileID=Met2025.fileID,
siteID=Met2025.siteID,
fileFormat=Met2025.fileFormat,
projectPath=projectPath)
Met2025.fileSearch(f"{drive}/data-dump/SCL/2025")
Met2025.fileSearch(f"{drive}/data-dump/SCL/2026")
SSM = fileInventory(
fileID=SSM.fileID,
siteID=SSM.siteID,
fileFormat=SSM.fileFormat,
projectPath=projectPath)
SSM.fileSearch(f"{drive}/data-dump/SCL/2024/20240914")
SSM.fileSearch(f"{drive}/data-dump/SCL/2025/20250718")
WSM = fileInventory(
fileID=WSM.fileID,
siteID=WSM.siteID,
fileFormat=WSM.fileFormat,
projectPath=projectPath)
WSM.fileSearch(f"{drive}/data-dump/SCL/2024/20240914")
WSM.fileSearch(f"{drive}/data-dump/SCL/2025/20250718")
NARR_SCL = rawFile(
fileName=f"{drive}/data-dump/ncFiles/deltaClimateSeries.csv",
fileID='NARR',
siteID='SCL',
fileNameMatch='deltaClimateSeries.csv',
fileFormat='NARRcsv',
projectPath=projectPath,
mode='identifyTraces'
)
fileInventory(
fileID=NARR_SCL.fileID,
siteID=NARR_SCL.siteID,
fileFormat=NARR_SCL.fileFormat,
projectPath=projectPath).fileSearch(f"{drive}/data-dump/ncFiles")
NARR_BSP = rawFile(
fileName=f"{drive}/data-dump/ncFiles/interpolatedTimeSeries.csv",
fileID='NARR',
siteID='BSP',
fileNameMatch='interpolatedTimeSeries.csv',
fileFormat='NARRcsv',
projectPath=projectPath,
mode='identifyTraces'
)
fileInventory(
fileID=NARR_BSP.fileID,
siteID=NARR_BSP.siteID,
fileFormat=NARR_BSP.fileFormat,
projectPath=projectPath).fileSearch(f"{drive}/data-dump/ncFiles")