Skip to content

Commit c5e5a27

Browse files
committed
Fix year zfill
1 parent d2e100b commit c5e5a27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

e3sm_diags/driver/utils/dataset_xr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,8 +1207,8 @@ def _get_time_slice(self, ds: xr.Dataset) -> slice:
12071207
f"end_year ({end_yr_int}) > var_end_yr ({var_end_year})."
12081208
)
12091209

1210-
start_yr_str = str(start_yr_int).zfill(2)
1211-
end_yr_str = str(end_yr_int).zfill(2)
1210+
start_yr_str = str(start_yr_int).zfill(4)
1211+
end_yr_str = str(end_yr_int).zfill(4)
12121212

12131213
if self.is_sub_monthly:
12141214
start_time = f"{start_yr_str}-01-01"

0 commit comments

Comments
 (0)