# Run main ORAC processor from the community code # 17 Feb 2016, AP: Initial version # 24 Jun 2016, AP: P2.7 rewrite # 08 Jul 2016, AP: Debugging against more awkward python environments # 09 Mar 2017, GT: Improved support for use with batch queuing systems from colours import cprint import argparse import orac_utils as ou import os # Define parser parser = argparse.ArgumentParser( description='Run the ORAC main processor given a root filename.') ou.args_common(parser) ou.args_main(parser) parser.add_argument("--batch_settings", type=str, nargs='+', help="Settings to " "pass to the batch processing system. Each setting is " "passed as KEY VALUE, where KEY is any key defined in " "orac_batch.py.", default=()) args = parser.parse_args() # Parse batch processing settings if len(args.batch_settings) % 2 != 0: raise ValueError("--batch must be a list of KEY VALUE pairs.") values = {} for key, val in zip(args.batch_settings[0::2], args.batch_settings[1::2]): values[key] = val try:
'--long', action='store_true', help='Process full orbits rather than short segments.') reg.add_argument('-t', '--tests', type=str, nargs='+', metavar='TEST', choices=regress.keys(), default=[ 'DAYMYDS', 'NITMYDS', 'DAYAATSRS', 'NITAATSRS', 'DAYAVHRRS', 'NITAVHRRS' ], help='List of tests to run.') ou.args_common(parser, regression=True) ou.args_preproc(parser) ou.args_main(parser) ou.args_postproc(parser) ou.args_cc4cl(parser) args = parser.parse_args() if args.all_phases: args.phases = ou.settings.keys() # For now, only run ATSR through all phases if args.long: args.tests = ['AATSR'] else: args.tests = ['DAYAATSRS'] elif args.long: args.tests = ['DAYMYD', 'NITMYD', 'AATSR', 'AVHRR']