Open gmacgilchrist opened 4 weeks ago
Open for a PR. Don't see how this should break anything.
But also a bit unsure why a PR would be needed and what alternative workarounds could be, ie. setting new calendar / time coordinate before using climpred. Do you have a sample code example of what's not possible at the moment?
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()