Commit 5a5595ac authored by Lars Bärring's avatar Lars Bärring Committed by Klaus Zimmermann
Browse files

Fix duplicate _freq_ elements in default output file names (closes #214)

parent 29204d13
......@@ -100,7 +100,13 @@ def guess_output_template(datafiles):
base = unique_bases.pop()
start = min(starts)
end = max(ends)
output_template = f'{{var_name}}_{base}_{{frequency}}_{start}-{end}.nc'
if '_day_' in base:
base = base.replace('_day_', '_{frequency}_')
elif base.endswith('_day'):
base = base.replace('_day', '_{frequency}')
base += '_{frequency}'
output_template = f'{{var_name}}_{base}_{start}-{end}.nc'
return output_template
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment