Skip to content

Commit

Permalink
Update sbe_ctd_parser.py (#269)
Browse files Browse the repository at this point in the history
add ability to have system time in output
  • Loading branch information
shaunwbell authored Sep 20, 2023
1 parent 4b61b4a commit b0631f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/EcoFOCIpy/io/sbe_ctd_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def seabird_header(filename=None):
header = header + [line]
if "# name" in line:
var_names[int(line.split("=")[0].split()[-1])] = line.split("=")[1].split()[0].split(':')[0]
if "* System UTC" in line:
sys_utc_time = line.split("=")[-1].strip()
if "* NMEA UTC (Time)" in line:
utc_time = line.split("=")[-1].strip()
if '* NMEA Latitude' in line:
Expand All @@ -40,7 +42,8 @@ def seabird_header(filename=None):
headercount=k+1
break

return {'header':header, 'headercount':headercount, 'varnames':var_names, 'NMEAtime':utc_time, 'NMEALat':latitude, 'NMEALon':longitude}
return {'header':header, 'headercount':headercount, 'varnames':var_names, 'SYSTEMtime':sys_utc_time,
'NMEAtime':utc_time, 'NMEALat':latitude, 'NMEALon':longitude}

class sbe_btl(object):
"""Process SBE BTL files
Expand Down

0 comments on commit b0631f1

Please sign in to comment.