Skip to content
Snippets Groups Projects
Commit 3bdf91b7 authored by Frisinghelli Daniel's avatar Frisinghelli Daniel
Browse files

Create output directory.

parent bf46f189
No related branches found
No related tags found
No related merge requests found
......@@ -66,6 +66,9 @@ if __name__ == '__main__':
# check if aggregated file exists
filename = '_'.join(['ERA5', var, ymin, ymax]) + '.nc'
filename = args.target.joinpath(var, filename)
if not filename.parent.exists():
LOGGER.info('mkdir {}'.format(filename.parent))
filename.parent.mkdir(parents=True, exist_ok=True)
if filename.exists() and not args.overwrite:
LOGGER.info('{} already exists.'.format(filename))
continue
......
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