Skip to content
Snippets Groups Projects
Commit 73fbf869 authored by Nick Bearson's avatar Nick Bearson
Browse files

glmtools now uses a templated output path and generates filenames from it

parent 902309f7
No related branches found
No related tags found
1 merge request!3glm_grids_updates
......@@ -35,8 +35,8 @@ def create_parser():
help='each occurrence increases verbosity 1 level through ERROR-WARNING-INFO-DEBUG (default INFO)')
parser.add_argument('-l', '--log', dest="log_fn", default=None,
help="specify the log filename")
parser.add_argument('-o', '--output-dir', metavar='directory',
default='.')
parser.add_argument('-o', '--output-dir', metavar='output directory',
default=os.getcwd())
parser.add_argument('--ctr-lat', metavar='latitude',
type=float, help='center latitude')
parser.add_argument('--ctr-lon', metavar='longitude',
......@@ -151,6 +151,7 @@ def grid_setup(args):
date = datetime(start_time.year, start_time.month, start_time.day)
os.makedirs(args.output_dir, exist_ok=True)
output = os.path.join(args.output_dir, "{dataset_name}") # GLMTools expects a template in addition to the path
proj_name = 'geos'
if args.goes_position is not None and args.goes_sector is not None:
......@@ -216,7 +217,7 @@ def grid_setup(args):
base_date=date, do_3d=False,
dx=dx, dy=dy, frame_interval=float(args.dt),
x_bnd=x_bnd, y_bnd=y_bnd,
ctr_lat=ctr_lat, ctr_lon=ctr_lon, outpath=args.output_dir,
ctr_lat=ctr_lat, ctr_lon=ctr_lon, outpath=output,
min_points_per_flash=min_events,
output_writer=output_writer, subdivide=args.subdivide_grid,
output_filename_prefix=output_filename_prefix,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment