Skip to content

Include history stream in climo file names (#410)#459

Merged
brianpm merged 2 commits into
NCAR:mainfrom
brianpm:fix-multistream-climo-naming
Jul 6, 2026
Merged

Include history stream in climo file names (#410)#459
brianpm merged 2 commits into
NCAR:mainfrom
brianpm:fix-multistream-climo-naming

Conversation

@brianpm

@brianpm brianpm commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Climo files are now named {case}{hist_str}{var}climo.nc and are produced per configured history stream, so a variable present in more than one stream (e.g. h0 and h1) no longer collides. Climo/timeseries lookups resolve the stream-aware name in the case's hist_str priority order, then fall back to the older {case}{var}_climo.nc convention so pre-existing climo files still work.

  • create_climo_files.py: loop over the case's streams; stream-agnostic fallback when the stream is unknown (e.g. baseline run on pre-made time series).
  • adf_dataset.py: optional hist_str filter on the timeseries getters; priority + old-convention fallback in get_climo_file/get_reference_climo_file.

Also includes a pylint cleanup of both touched files (whitespace, line length, import order, raise-from, redundant worker imports).

Climo files are now named {case}_{hist_str}_{var}_climo.nc and are produced
per configured history stream, so a variable present in more than one stream
(e.g. h0 and h1) no longer collides. Climo/timeseries lookups resolve the
stream-aware name in the case's hist_str priority order, then fall back to the
older {case}_{var}_climo.nc convention so pre-existing climo files still work.

- create_climo_files.py: loop over the case's streams; stream-agnostic fallback
  when the stream is unknown (e.g. baseline run on pre-made time series).
- adf_dataset.py: optional hist_str filter on the timeseries getters; priority +
  old-convention fallback in get_climo_file/get_reference_climo_file.

Also includes a pylint cleanup of both touched files (whitespace, line length,
import order, raise-from, redundant worker imports).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

@nusbaume nusbaume left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @brianpm! I had one optional request, but nothing that should hold up this PR.

Comment thread lib/adf_dataset.py Outdated
Co-authored-by: Jesse Nusbaumer <[email protected]>
@brianpm
brianpm merged commit ef33605 into NCAR:main Jul 6, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants