Commit 2d14b7f6 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 b25f5382
......@@ -126,7 +126,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