Skip to content

Fix ST time encoding to use Jan 1 of year+1 per ISMIP7 convention#4

Merged
hgoelzer merged 1 commit into
mainfrom
hgoelzer/bugfix_jan1
Jun 19, 2026
Merged

Fix ST time encoding to use Jan 1 of year+1 per ISMIP7 convention#4
hgoelzer merged 1 commit into
mainfrom
hgoelzer/bugfix_jan1

Conversation

@hgoelzer

Copy link
Copy Markdown
Member

State variable (ST) timestamps now follow the ismip7-time-encoding reference: end-of-year snapshots are encoded as Jan 1 of the following year (e.g. simulation year 2015 → 2016-01-01), not Dec 31.

Flux variable (FL) encoding is unchanged: mid-year timestamp Jul 1 with time bounds [Jan 1, Jan 1 next year].

experiments_ismip7.csv is redesigned to store nominal simulation years (start_year_min, start_year_max, end_year) instead of raw date strings. The checker derives expected FL/ST timestamps at runtime via the new _nominal_to_timestamp() helper, applying ±1 day tolerance for float32 encoding jitter.

_check_naming() and _check_time() both receive var_type so the ST year offset (filename year N = timestamp year N+1) is handled correctly. The test suite and README are updated accordingly.

State variable (ST) timestamps now follow the ismip7-time-encoding
reference: end-of-year snapshots are encoded as Jan 1 of the following
year (e.g. simulation year 2015 → 2016-01-01), not Dec 31.

Flux variable (FL) encoding is unchanged: mid-year timestamp Jul 1
with time bounds [Jan 1, Jan 1 next year].

experiments_ismip7.csv is redesigned to store nominal simulation years
(start_year_min, start_year_max, end_year) instead of raw date strings.
The checker derives expected FL/ST timestamps at runtime via the new
_nominal_to_timestamp() helper, applying ±1 day tolerance for float32
encoding jitter.

_check_naming() and _check_time() both receive var_type so the ST
year offset (filename year N = timestamp year N+1) is handled correctly.
The test suite and README are updated accordingly.
@hgoelzer hgoelzer requested a review from xylar June 18, 2026 17:13
@hgoelzer hgoelzer self-assigned this Jun 18, 2026
@hgoelzer hgoelzer added the bug Something isn't working label Jun 18, 2026
@hgoelzer

Copy link
Copy Markdown
Member Author

Agreement with ismip7-time-encoding verified, automatic tests passed. I am going forward with PR

@hgoelzer hgoelzer merged commit eb124ad into main Jun 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant