Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Klaus Zimmermann
climix
Commits
5a5595ac
Commit
5a5595ac
authored
Feb 18, 2021
by
Lars Bärring
Committed by
Klaus Zimmermann
Jul 28, 2021
Browse files
Fix duplicate _freq_ elements in default output file names (closes #214)
parent
29204d13
Changes
1
Hide whitespace changes
Inline
Side-by-side
climix/main.py
View file @
5a5595ac
...
...
@@ -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}'
)
else
:
base
+=
'_{frequency}'
output_template
=
f
'{{var_name}}_
{
base
}
_
{
start
}
-
{
end
}
.nc'
return
output_template
...
...
Write
Preview
Markdown
is supported
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