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

get our list of gridded files directly from grid_GLM_flashes() instead of globbing for them

parent 3dfbe7f3
No related branches found
No related tags found
1 merge request!12Resolve "filename prefix change"
......@@ -328,16 +328,12 @@ if __name__ == '__main__':
# do the gridding
gridder, glm_filenames, start_time, end_time, grid_kwargs = grid_setup(args, work_dir=tempdir_path)
gridder(glm_filenames, start_time, end_time, **grid_kwargs)
# FIXME: rather than using globs (below), gridder (above) returns some sort of zipped structure that contains the output filenames
# pick up gridded files from the tempdir
# output looks like: OR_GLM-L2-GLMC-M3_G17_s20202691559400_e20202691600400_c20210120141010.nc
log.debug("gridded files in {}".format(tempdir_path))
gridded_path = os.path.join(tempdir_path, '{}_GLM-L2-GLM*-M?_G??_s*_e*_c*.nc'.format(args.system_environment_prefix))
log.debug(gridded_path)
gridded_files = glob(gridded_path)
log.debug(gridded_files)
gridder_return = gridder(glm_filenames, start_time, end_time, **grid_kwargs)
gridded_files = []
for subgrid in gridder_return:
for gridded_file in subgrid[1]:
gridded_files.append(gridded_file)
# we need to add attributes here due to an issue where satpy (or its dependencies) are
# holding the input gridded file open until the process exits
......
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