diff --git a/gridded_glm/libexec/_minute_gridder.py b/gridded_glm/libexec/_minute_gridder.py index 863720d6c8dc2f08c389f50841c40991b51e6fad..a3a2a298ab11d8600bcba099a71cace90b1ceba6 100644 --- a/gridded_glm/libexec/_minute_gridder.py +++ b/gridded_glm/libexec/_minute_gridder.py @@ -152,11 +152,21 @@ def grid_setup(args, work_dir=os.getcwd()): exit(0) args.filenames = fileglob + for f in args.filenames: + if not os.path.exists(f): + log.error("Tried to grid file that does not exist: {}".format(f)) + exit(1) + + if args.goes_sector == "meso" and (args.ctr_lat == None or args.ctr_lon == None): + log.error("sector 'meso' requires --ctr-lat & --ctr-lon") + exit(1) + try: start_time, end_time = get_start_end(args.filenames) - except ValueError: - log.error("Non-standard filenames provided, use --start and --end to specify data times.") - raise + except: + log.error("Could not parse start & end times from one or more of the files provided:") + log.error(", ".join(args.filenames)) + exit(1) base_date = datetime(start_time.year, start_time.month, start_time.day) proj_name = 'geos'