Skip to content
Snippets Groups Projects
Verified Commit 42e9cd18 authored by David Hoese's avatar David Hoese
Browse files

Add handling of the 4th version of the CSV/ACSII files

parent d6386d31
No related merge requests found
......@@ -141,6 +141,17 @@ class ParserV1V2(object):
'rh_shield_freq', 'rh', 'air_temp_6_3m', 'dewpoint',
'rtd_shield_freq', 'air_temp', 'solar_flux', 'precip',
'accum_precip', 'altimeter'] # , 'altimeter2']
# These are the new fields in the input files but unused by the rest of
# the tower code. At the risk of breaking other pieces of software, these
# are not included in the above list, but are documented here for future
# reference.
#
# Altimeter2 (slightly different calculation, same units as Altimeter)
# LW_in (W/m^2)
# tempPyrg (Kelvin, temperature of pyrgeometer)
# pyrgTP (W/m^2, raw reading from the pyrgeometer thermopile)
# pyrgTC (W/m^2, temperature correction for the pyrgeometer)
# TC_110 (degC, this is a second air temperature in the new aspirated radiation shield)
@staticmethod
def maybe_mine(line):
......@@ -159,9 +170,9 @@ class ParserV1V2(object):
def make_frame(self, line):
parts = line.split(',')
if len(parts) not in [28, 29, 33]:
raise LineParseError("Expected 28, 29, or 33 parts", line)
version = {28: 1, 29: 2, 33: 3}[len(parts)]
if len(parts) not in [28, 29, 33, 34]:
raise LineParseError("Expected 28, 29, 33, or 34 parts", line)
version = {28: 1, 29: 2, 33: 3, 34: 4}[len(parts)]
raw_data = [('version', version)] + list(zip(self.names, parts))
try:
raw_data.append(('stamp', self._get_stamp(parts)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment