sel_time
time selection requires formatting of string for non-normal calendar years
#859
Labels
sel_time
time selection requires formatting of string for non-normal calendar years
#859
Describe the bug
If a year is prior to 1000, such as for the piControl run used for perfect model experiments,
sel_time
fails when trying to find a time based on the integer of the year. There is a simple fix to implementzfill(4)
to format the string from which the time is being selected.Code Sample
fails with
The following change fixes this issue:
Happy to implement this PR, but wasn't completely sure if that change is likely to break any other aspects of the code, e.g. for other datasets, and I haven't yet had time to implement the changes to check, so I'm just logging the issue here.
Output of
climpred.show_versions()
The text was updated successfully, but these errors were encountered: