forked from lanl/NEONiso
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_testing_data.R
368 lines (338 loc) · 18.6 KB
/
setup_testing_data.R
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
# setup_testing_data.R
# rich fiorella
rm(list=ls())
library(rhdf5)
# a script to setup data to be bundled with the NEONiso package.
# exists in rbuildignore, so should not be bundled with package.
# requires install and restart w/ NEONiso.
master_file <- "/Volumes/GradSchoolBackup/NEON/DP4_00200_001/ONAQ/NEON.D15.ONAQ.DP4.00200.001.nsae.2019-06.basic.h5"
master_ccalB03_file <- "~/Desktop/NEONcal/210303_CisoEC/ONAQ/NEON.D15.ONAQ.DP4.00200.001.nsae.2019-06.basic.20201020T212232Z.calibrated.h5"
master_ccalLR_file <- "~/Desktop/NEONcal/210303_CisoLR/ONAQ/NEON.D15.ONAQ.DP4.00200.001.nsae.2019-06.basic.20201020T212232Z.calibrated.h5"
#---------------------------------------
# extract co2 data for unit testing:
#---------------------------------------
ciso <- rhdf5::h5read(master_file, "/ONAQ/dp01/data/isoCo2")
ucrt <- rhdf5::h5read(master_file, "/ONAQ/dp01/ucrt/isoCo2")
# from raw file (and quick processing scripts), we need three datasets:
# 1) raw calibration data
# 2) raw calibration data after filtering
# 3) raw ambient data.
# 1) get raw calibration data.
co2RawRefData <- ciso[c("co2High_09m","co2Med_09m","co2Low_09m")]
save(co2RawRefData, file = "tests/testthat/co2RawRefData.Rdata")
# 1b) get raw calibration ucrt.
co2RawRefUcrt <- ucrt[c("co2High_09m","co2Med_09m","co2Low_09m")]
save(co2RawRefUcrt, file = "tests/testthat/co2RawRefUcrt.Rdata")
# 2) get calibration data after filtering.
co2FiltRefData <- extract_carbon_calibration_data(ciso, NULL, "high")
save(co2FiltRefData, file = "tests/testthat/co2FiltRefData.Rdata")
# 3) get raw ambient data - currently from a monthly file, might be better to get from daily file.
co2RawAmbData <- ciso$`000_010_09m`
save(co2RawAmbData, file = "tests/testthat/co2RawAmbData.Rdata")
# GET a few more datasets from the calibrated data file:
#---------------------
# Bowling method
#---------------------
# 4) get the table of Bowling gain and offset parameters.
ciso_cal <- rhdf5::h5read(master_ccalB03_file, "/ONAQ/dp01/data/isoCo2")
co2B03CalTable <- ciso_cal$calData$calGainsOffsets
save(co2B03CalTable, file = "tests/testthat/co2B03CalTable.Rdata")
# 5) Bowling method calibrated reference values.
co2B03CalRefData <- ciso_cal[c("co2High_09m","co2Med_09m","co2Low_09m")]
save(co2B03CalRefData, file = "tests/testthat/co2B03CalRefData.Rdata")
# 6) Bowling method calibrated data file.
co2B03CalAmbData <- ciso_cal$`000_010_09m`
save(co2B03CalAmbData, file = "tests/testthat/co2B03CalAmbData.Rdata")
#---------------------
# Linear regression method
#---------------------
# 4) get the table of Bowling gain and offset parameters.
ciso_cal <- rhdf5::h5read(master_ccalLR_file, "/ONAQ/dp01/data/isoCo2")
co2LRCalTable <- ciso_cal$calData$calRegressions
save(co2LRCalTable, file = "tests/testthat/co2LRCalTable.Rdata")
# 5) Bowling method calibrated reference values.
co2LRCalRefData <- ciso_cal[c("co2High_09m","co2Med_09m","co2Low_09m")]
save(co2LRCalRefData, file = "tests/testthat/co2LRCalRefData.Rdata")
# 6) Bowling method calibrated data file.
co2LRCalAmbData <- ciso_cal$`000_010_09m`
save(co2LRCalAmbData, file = "tests/testthat/co2LRCalAmbData.Rdata")
rm(list = ls(pattern = "^co2"))
rm(ciso, ucrt, ciso_cal)
#---------------------------------------
# extract h2o data for unit testing:
#---------------------------------------
wiso <- rhdf5::h5read(master_file, "/ONAQ/dp01/data/isoH2o")
ucrt <- rhdf5::h5read(master_file, "/ONAQ/dp01/ucrt/isoH2o")
# 1) get raw calibration data.
h2oRawRefData <- wiso[c("h2oHigh_03m","h2oMed_03m","h2oLow_03m")]
save(h2oRawRefData, file = "tests/testthat/h2oRawRefData.Rdata")
# 1b) get raw calibration ucrt.
h2oRawRefUcrt <- ucrt[c("h2oHigh_03m","h2oMed_03m","h2oLow_03m")]
save(h2oRawRefUcrt, file = "tests/testthat/h2oRawRefUcrt.Rdata")
# 1c) get raw calibration data using stackEddy for by_site method:
h2oRawRefDataBySite <- neonUtilities::stackEddy(master_file, level = "dp01", avg = 3)[[1]]
save(h2oRawRefDataBySite, file = "tests/testthat/h2oRawRefDataBySite.Rdata")
# 2) get calibration data after filtering.
#h2oFiltRefData <- extract_carbon_calibration_data(ciso, NULL, "high")
#save(h2oFiltRefData, file = "tests/testthat/h2oFiltRefData.Rdata")
# 3) get raw ambient data - currently from a monthly file, might be better to get from daily file.
h2oRawAmbData <- wiso$`000_010_09m`
save(h2oRawAmbData, file = "tests/testthat/h2oRawAmbData.Rdata")
#_---------------------
# if need to generate a new hdf5 sample file...
fid <- H5Fopen("inst/extdata/NEON.D15.ONAQ.DP4.00200.001.nsae.2019-05.basic.h5")
# delete higher level data products
h5delete(fid, '/ONAQ/dp04/')
h5delete(fid, '/ONAQ/dp03/')
h5delete(fid, '/ONAQ/dp02/')
h5delete(fid, '/ONAQ/dp0p/')
# trim a bunch of unnecessary products.
h5delete(fid, '/ONAQ/dp01/qfqm/')
h5delete(fid, '/ONAQ/dp01/ucrt/')
h5delete(fid, '/ONAQ/dp01/data/co2Stor/')
h5delete(fid, '/ONAQ/dp01/data/h2oStor/')
h5delete(fid, '/ONAQ/dp01/ucrt/h2oStor/')
h5delete(fid, '/ONAQ/dp01/ucrt/co2Stor/')
h5delete(fid, '/ONAQ/dp01/ucrt/co2Turb/')
h5delete(fid, '/ONAQ/dp01/data/co2Turb/')
h5delete(fid, '/ONAQ/dp01/ucrt/h2oTurb/')
h5delete(fid, '/ONAQ/dp01/data/h2oTurb/')
h5delete(fid, '/ONAQ/dp01/data/soni/')
h5delete(fid, '/ONAQ/dp01/data/amrs/')
h5delete(fid, '/ONAQ/dp01/ucrt/amrs/')
h5delete(fid, '/ONAQ/dp01/ucrt/soni/')
h5delete(fid, '/ONAQ/dp01/ucrt/tempAirLvl/')
h5delete(fid, '/ONAQ/dp01/data/tempAirLvl/')
h5delete(fid, '/ONAQ/dp01/data/radiNet/')
h5delete(fid, '/ONAQ/dp01/ucrt/radiNet/')
h5delete(fid, '/ONAQ/dp01/ucrt/tempSoil/')
h5delete(fid, '/ONAQ/dp01/data/tempSoil/')
h5delete(fid, '/ONAQ/dp01/data/h2oSoilVol/')
h5delete(fid, '/ONAQ/dp01/ucrt/h2oSoilVol/')
h5delete(fid, '/ONAQ/dp01/ucrt/fluxHeatSoil/')
h5delete(fid, '/ONAQ/dp01/data/fluxHeatSoil/')
h5delete(fid, '/ONAQ/dp01/data/presBaro/')
h5delete(fid, '/ONAQ/dp01/ucrt/presBaro/')
h5delete(fid, '/ONAQ/dp01/ucrt/tempAirTop/')
h5delete(fid, '/ONAQ/dp01/data/tempAirTop/')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Arch_09m')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Arch_09m')
# start to trim away data in isotope products that aren't necessary
h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2High_30m')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Med_30m')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Low_30m')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Arch_30m')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/h2oHigh_30m')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/h2oMed_30m')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/h2oLow_30m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2High_30m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Med_30m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Low_30m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Arch_30m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/h2oHigh_30m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/h2oMed_30m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/h2oLow_30m')
# remove subproducts of isoH2o and isoCo2
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_010_30m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_020_30m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_030_30m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_040_30m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_010_09m/pres')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_020_09m/pres')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_030_09m/pres')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_040_09m/pres')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/h2oLow_03m/pres')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/h2oMed_03m/pres')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/h2oHigh_03m/pres')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_010_09m/presEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_020_09m/presEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_030_09m/presEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_040_09m/presEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/h2oLow_03m/presEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/h2oMed_03m/presEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/h2oHigh_03m/presEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_010_09m/rhEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_020_09m/rhEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_030_09m/rhEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_040_09m/rhEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/h2oLow_03m/rhEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/h2oMed_03m/rhEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/h2oHigh_03m/rhEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_010_09m/tempEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_020_09m/tempEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_030_09m/tempEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_040_09m/tempEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/h2oLow_03m/tempEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/h2oMed_03m/tempEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/h2oHigh_03m/tempEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_010_09m/temp')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_020_09m/temp')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_030_09m/temp')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_040_09m/temp')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/h2oLow_03m/temp')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/h2oMed_03m/temp')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/h2oHigh_03m/temp')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_010_30m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_020_30m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_030_30m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_040_30m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_010_09m/pres')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_020_09m/pres')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_030_09m/pres')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_040_09m/pres')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Low_09m/pres')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Med_09m/pres')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2High_09m/pres')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_010_09m/presEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_020_09m/presEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_030_09m/presEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_040_09m/presEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Low_09m/presEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Med_09m/presEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2High_09m/presEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_010_09m/rhEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_020_09m/rhEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_030_09m/rhEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_040_09m/rhEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Low_09m/rhEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Med_09m/rhEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2High_09m/rhEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_010_09m/tempEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_020_09m/tempEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_030_09m/tempEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_040_09m/tempEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Low_09m/tempEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Med_09m/tempEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2High_09m/tempEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_010_09m/temp')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_020_09m/temp')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_030_09m/temp')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_040_09m/temp')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Low_09m/temp')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Med_09m/temp')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2High_09m/temp')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_010_30m')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_020_30m')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_030_30m')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_040_30m')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_010_09m/pres')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_020_09m/pres')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_030_09m/pres')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_040_09m/pres')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/h2oLow_03m/pres')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/h2oMed_03m/pres')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/h2oHigh_03m/pres')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_010_09m/presEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_020_09m/presEnvHut')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_030_09m/presEnvHut')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_040_09m/presEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/h2oLow_03m/presEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/h2oMed_03m/presEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/h2oHigh_03m/presEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_010_09m/rhEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_020_09m/rhEnvHut')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_030_09m/rhEnvHut')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_040_09m/rhEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/h2oLow_03m/rhEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/h2oMed_03m/rhEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/h2oHigh_03m/rhEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_010_09m/tempEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_020_09m/tempEnvHut')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_030_09m/tempEnvHut')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_040_09m/tempEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/h2oLow_03m/tempEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/h2oMed_03m/tempEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/h2oHigh_03m/tempEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_010_09m/temp')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_020_09m/temp')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_030_09m/temp')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_040_09m/temp')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/h2oLow_03m/temp')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/h2oMed_03m/temp')
# h5delete(fid, '/ONAQ/dp01/data/isoH2o/h2oHigh_03m/temp')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_010_30m')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_020_30m')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_030_30m')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_040_30m')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_010_09m/pres')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_020_09m/pres')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_030_09m/pres')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_040_09m/pres')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Low_09m/pres')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Med_09m/pres')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2High_09m/pres')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_010_09m/presEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_020_09m/presEnvHut')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_030_09m/presEnvHut')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_040_09m/presEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Low_09m/presEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Med_09m/presEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2High_09m/presEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_010_09m/rhEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_020_09m/rhEnvHut')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_030_09m/rhEnvHut')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_040_09m/rhEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Low_09m/rhEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Med_09m/rhEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2High_09m/rhEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_010_09m/tempEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_020_09m/tempEnvHut')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_030_09m/tempEnvHut')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_040_09m/tempEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Low_09m/tempEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Med_09m/tempEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2High_09m/tempEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_010_09m/temp')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_020_09m/temp')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_030_09m/temp')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_040_09m/temp')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Low_09m/temp')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Med_09m/temp')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2High_09m/temp')
#
# # eh just keep one level for simplicity.
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_030_09m')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_040_09m')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_030_09m')
h5delete(fid, '/ONAQ/dp01/data/isoH2o/000_040_09m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_010_09m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_020_09m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_030_09m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_040_09m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_010_09m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_020_09m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_030_09m')
h5delete(fid, '/ONAQ/dp01/ucrt/isoH2o/000_040_09m')
#
# # keep going...
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_030_09m/rtioMoleWetH2oEnvHut')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_040_09m/rtioMoleWetH2oEnvHut')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_030_09m/rtioMoleWet12CCo2')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_040_09m/rtioMoleWet12CCo2')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_030_09m/rtioMoleWet13CCo2')
h5delete(fid, '/ONAQ/dp01/data/isoCo2/000_040_09m/rtioMoleWet13CCo2')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Low_09m/rtioMoleWetH2oEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Low_09m/rtioMoleWet12CCo2')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Low_09m/rtioMoleWet13CCo2')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Med_09m/rtioMoleWetH2oEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Med_09m/rtioMoleWet12CCo2')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2Med_09m/rtioMoleWet13CCo2')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2High_09m/rtioMoleWetH2oEnvHut')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2High_09m/rtioMoleWet12CCo2')
# h5delete(fid, '/ONAQ/dp01/data/isoCo2/co2High_09m/rtioMoleWet13CCo2')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_030_09m/rtioMoleWetH2oEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_040_09m/rtioMoleWetH2oEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_030_09m/rtioMoleWet12CCo2')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_040_09m/rtioMoleWet12CCo2')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_030_09m/rtioMoleWet13CCo2')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/000_040_09m/rtioMoleWet13CCo2')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Low_09m/rtioMoleWetH2oEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Low_09m/rtioMoleWet12CCo2')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Low_09m/rtioMoleWet13CCo2')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Med_09m/rtioMoleWetH2oEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Med_09m/rtioMoleWet12CCo2')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2Med_09m/rtioMoleWet13CCo2')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2High_09m/rtioMoleWetH2oEnvHut')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2High_09m/rtioMoleWet12CCo2')
h5delete(fid, '/ONAQ/dp01/ucrt/isoCo2/co2High_09m/rtioMoleWet13CCo2')
H5Fclose(fid)