Skip to content

Commit

Permalink
added decadal_fix_calendar for proleptic_gregorian
Browse files Browse the repository at this point in the history
  • Loading branch information
cehbrecht committed Nov 12, 2024
1 parent 1d231e2 commit 150568c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rook/utils/decadal_fixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,9 @@ def decadal_fix_5(ds_id, ds):


def decadal_fix_calendar(ds_id, ds):
# set proleptic_gregorian calendar to gregorian (standard).
# the proleptic gregorian calendar extends the gregorin backward in time before 1582.
calendar = ds.time.encoding.get("calendar", "standard")
if calendar == "proleptic_gregorian":
ds.time.encoding["calendar"] = "standard"
return ds

0 comments on commit 150568c

Please sign in to comment.