Title: [BUG] Resampled/CMORised time axis off by ~1 day for pre-1582 dates (GREGORIAN vs proleptic_gregorian) · Issue #461 · ACCESS-NRI/ACCESS-MOPPy · GitHub
Open Graph Title: [BUG] Resampled/CMORised time axis off by ~1 day for pre-1582 dates (GREGORIAN vs proleptic_gregorian) · Issue #461 · ACCESS-NRI/ACCESS-MOPPy
X Title: [BUG] Resampled/CMORised time axis off by ~1 day for pre-1582 dates (GREGORIAN vs proleptic_gregorian) · Issue #461 · ACCESS-NRI/ACCESS-MOPPy
Description: Summary The WCRP CMIP6 compliance check [TIME001] Check Time Squareness fails on CMORised ocean output for ACCESS-ESM1-5, with the time coordinate off by exactly one day: [TIME001] Check Time Squareness * Mismatch at index 0: expected 36...
Open Graph Description: Summary The WCRP CMIP6 compliance check [TIME001] Check Time Squareness fails on CMORised ocean output for ACCESS-ESM1-5, with the time coordinate off by exactly one day: [TIME001] Check Time Squar...
X Description: Summary The WCRP CMIP6 compliance check [TIME001] Check Time Squareness fails on CMORised ocean output for ACCESS-ESM1-5, with the time coordinate off by exactly one day: [TIME001] Check Time Squar...
Opengraph URL: https://github.com/ACCESS-NRI/ACCESS-MOPPy/issues/461
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] Resampled/CMORised time axis off by ~1 day for pre-1582 dates (GREGORIAN vs proleptic_gregorian)","articleBody":"## Summary\n\nThe WCRP CMIP6 compliance check **[TIME001] Check Time Squareness** fails on CMORised\nocean output for ACCESS-ESM1-5, with the time coordinate off by exactly one day:\n\n```\n[TIME001] Check Time Squareness\n* Mismatch at index 0: expected 36706.500000, got 36707.500000.\n (table_id=Oyr, frequency=yr, var=no3, midpoint=True)\n```\n\nThe numeric time values (and their bounds) are computed in the **mixed Julian/Gregorian\n\"standard\" calendar**, but the file ultimately declares **`proleptic_gregorian`**, so for\ndates before the 1582 Julian→Gregorian reform the two disagree by ~1 day.\n\nThe same root cause produces a related **CF §7.1** finding:\n\n```\n'time_bnds' has attr 'calendar' with value 'GREGORIAN' that does not agree with\nits associated variable ('time')'s attr value 'proleptic_gregorian'\n```\n\n## Root cause\n\nACCESS-ESM1-5 model files label their time axis with the **non-CF calendar name\n`\"GREGORIAN\"`**. Two pieces of code interpret this label inconsistently:\n\n1. `base.CMORiser._check_calendar()` rewrites `\"GREGORIAN\"` → `\"proleptic_gregorian\"`\n (a documented `TODO` workaround for the model's mislabelling). It **changes only the\n label, not the numeric values** — which is correct, because the model's values are\n genuinely proleptic-Gregorian (the model has no Julian transition).\n\n2. `utilities.calculate_time_bounds()` and the resampling midpoint helper\n (`_shift_resampled_time_to_period_midpoint`) read the raw `\"GREGORIAN\"` label and pass\n it to `cftime`, which treats `\"GREGORIAN\"` as the CF **`standard`** calendar\n (Julian before 1582-10-15). They therefore build the year/period boundaries — and the\n yearly midpoint — in the **Julian** frame.\n\nFor year 0101 this gives:\n\n| Quantity | standard / Julian (what we compute) | proleptic_gregorian (what the file declares \u0026 the checker expects) |\n|----------|-------------------------------------|--------------------------------------------------------------------|\n| 0101-01-01 (`days since 0001-01-01`) | 36525 | 36524 |\n| Yearly midpoint | 36707.5 | 36706.5 |\n\nThe 1-day gap is exactly the Julian-vs-proleptic leap-day difference accumulated over\nyears 1–101 (Julian counts year 100 as a leap year; proleptic_gregorian does not).\n\nThe checker validates against the file's declared calendar (`proleptic_gregorian`), so it\nexpects `36706.5` and flags our `36707.5`.\n\n## Impact\n\n- **[TIME001]** fails for all CMORised ACCESS-ESM1-5 output whose time axis falls before\n 1582 (e.g. piControl/historical spin-up years like 0101).\n- **CF §7.1** reports a `time_bnds` vs `time` calendar mismatch (`GREGORIAN` vs\n `proleptic_gregorian`) for the same reason.\n- Post-1582 data is unaffected (the two calendars coincide), which is why the\n discrepancy is easy to miss.\n","author":{"url":"https://github.com/rhaegar325","@type":"Person","name":"rhaegar325"},"datePublished":"2026-06-25T11:12:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/461/ACCESS-MOPPy/issues/461"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a197755e-e152-239e-47c8-46099f284fdf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B6F6:324B70:51A38A:7413A6:6A4BCB70 |
| html-safe-nonce | f3e54e239d850eda58c52a160c4533c72dc91886421d8399accacb95ad94fbed |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkY2OjMyNEI3MDo1MUEzOEE6NzQxM0E2OjZBNEJDQjcwIiwidmlzaXRvcl9pZCI6IjQwMjk0NDg3MDg2OTI4ODg0MzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | affd1370ca55ed8b71f6bb120eef6415715af67012f18c546548cb4370c399f2 |
| hovercard-subject-tag | issue:4743265788 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ACCESS-NRI/ACCESS-MOPPy/461/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2608061a45aca1e67c1bdb7012df0153ad13f3f393c4a964d9259b5f91bd049e/ACCESS-NRI/ACCESS-MOPPy/issues/461 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2608061a45aca1e67c1bdb7012df0153ad13f3f393c4a964d9259b5f91bd049e/ACCESS-NRI/ACCESS-MOPPy/issues/461 |
| og:image:alt | Summary The WCRP CMIP6 compliance check [TIME001] Check Time Squareness fails on CMORised ocean output for ACCESS-ESM1-5, with the time coordinate off by exactly one day: [TIME001] Check Time Squar... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rhaegar325 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 14aa00ce5bdb34d0eefb5facbffd7de9e144c688d8a93ef8df902d5f94b51dd7 |
| turbo-cache-control | no-preview |
| go-import | github.com/ACCESS-NRI/ACCESS-MOPPy git https://github.com/ACCESS-NRI/ACCESS-MOPPy.git |
| octolytics-dimension-user_id | 105186864 |
| octolytics-dimension-user_login | ACCESS-NRI |
| octolytics-dimension-repository_id | 955620939 |
| octolytics-dimension-repository_nwo | ACCESS-NRI/ACCESS-MOPPy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 955620939 |
| octolytics-dimension-repository_network_root_nwo | ACCESS-NRI/ACCESS-MOPPy |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 58b8f89190447502561829f30862aa0a99d53367 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width