Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Klaus Zimmermann
climix
Commits
2d14b7f6
Commit
2d14b7f6
authored
Feb 18, 2021
by
Lars Bärring
Committed by
Klaus Zimmermann
Aug 05, 2021
Browse files
Fix duplicate _freq_ elements in default output file names (closes #214)
parent
b25f5382
Changes
1
Hide whitespace changes
Inline
Side-by-side
climix/main.py
View file @
2d14b7f6
...
...
@@ -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}"
)
else
:
base
+=
"_{frequency}"
output_template
=
f
"{{var_name}}_
{
base
}
_
{
start
}
-
{
end
}
.nc"
return
output_template
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment