5 Updates LUTS for the various sensors.
13 argparse.RawTextHelpFormatter):
17 if __name__ ==
'__main__':
20 description =
'Retrieve latest lookup tables for specified sensor.'
21 sensors = [
'all',
'common',
'seawifs',
'hico',
'modisa',
'modist',
'viirsn',
'viirsj1',
'viirsj2',
'oci']
22 platforms = [
'aqua',
'terra',
'npp',
'j1',
'j2']
26 parser = argparse.ArgumentParser(prog=
'update_luts',formatter_class=CustomFormatter,
27 description=description, add_help=
True)
29 parser.add_argument(
'mission', metavar=
'MISSION',
30 help=
'sensor or platform to process; one of:\n%(choices)s',
31 choices= sensors + platforms)
33 parser.add_argument(
'-e',
'--eval', action=
'store_true', dest=
'evalluts',
34 help=
'also download evaluation LUTs')
36 parser.add_argument(
'-v',
'--verbose', action=
'count', default=0,
37 help=
'print status messages')
39 parser.add_argument(
'-n',
'--dry-run', action=
'store_true', dest=
'dry_run',
40 help=
'no action; preview files to be downloaded')
42 parser.add_argument(
'--timeout', type=float, default=10,
43 help=
'network timeout in seconds')
45 parser.add_argument(
'--version', action=
'version', version=
'%(prog)s ' + version)
47 parser.add_argument(
'-d',
'--debug', action=
'store_true',
48 help=argparse.SUPPRESS)
51 args = parser.parse_args()
54 logging.basicConfig(level=logging.DEBUG,
55 format=
'%(levelname)s:%(message)s')
58 if args.mission ==
'all':
59 for tmpMission
in sensors:
60 if tmpMission !=
'all':
61 luts = Lut.LutUtils(verbose=args.verbose,
63 evalluts=args.evalluts,
68 parser.exit(luts.status)
69 parser.exit(luts.status)
72 luts = Lut.LutUtils(verbose=args.verbose,
79 parser.exit(luts.status)
82 if args.mission ==
'common':
83 parser.exit(luts.status)
86 luts = Lut.LutUtils(verbose=args.verbose,
88 evalluts=args.evalluts,
93 parser.exit(luts.status)