OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
l0info_hkt.py
Go to the documentation of this file.
1 #!/usr/bin/env python3
2 
3 from l0info_utils import read_cfe_header, read_dsb_header
4 
5 __version__ = '2.1.1_2022-12-23'
6 
7 def l0info_hkt(args, fh, output):
8  # procedure to get start and end times from PACE S-band HKT data file name
9  print("Running l0info_hkt (version: %s) \n" % __version__)
10 
11  if args.verbose:
12  print("Reading PACE S-band data file.")
13 
14  try:
15  stime, dtype = read_cfe_header(fh, bVerbose = False)
16  print("start_time=%s" % stime)
17  if output:
18  output.write("start_time=%s\n" % stime)
19  except:
20  return 120
21 
22  try:
23  etime = read_dsb_header(fh, bVerbose = False)
24  print("stop_time=%s" % etime)
25  if output:
26  output.write("stop_time=%s\n" % etime)
27  except:
28  return 120
29 
30  return 0
def read_cfe_header(filehandle, bVerbose=False)
Definition: l0info_utils.py:13
def read_dsb_header(filehandle, bVerbose=False)
Definition: l0info_utils.py:44
def l0info_hkt(args, fh, output)
Definition: l0info_hkt.py:7