Skip to content

Support new ACCESS-ESM1.6 raw output filenames - #584

Open
rbeucher wants to merge 4 commits into
mainfrom
support/access-esm1p6-split-raw-output
Open

Support new ACCESS-ESM1.6 raw output filenames#584
rbeucher wants to merge 4 commits into
mainfrom
support/access-esm1p6-split-raw-output

Conversation

@rbeucher

@rbeucher rbeucher commented Aug 5, 2026

Copy link
Copy Markdown
Member

Closes #583

What this changes

ACCESS-ESM1.6 is moving towards storing one physical variable in each raw NetCDF file. This PR teaches ACCESS-MOPPy how to find those new files without removing support for existing runs.

In practical terms, MOPPy can now work with both:

  • the current atmosphere files that bundle several variables together, plus the new access-esm1p6.um7p3... files;
  • the current CICE files, plus the new access-esm1p6.cice5... files;
  • the current ocean files, plus the new access-esm1p6.om2... files and the grouped ocean static file.

MOPPy also understands the date at the end of the new filenames. This keeps requests such as “only process 1850 to 1900” working as expected, and ensures that a request for one raw variable does not accidentally select another variable’s file.

Compatibility

This is additive. Existing file names and directory layouts remain supported, so older experiments do not need to be reorganised.

Checks

  • pixi run -e dev python -m pytest tests/unit/test_file_discovery.py -q (91 passed)
  • pixi run -e dev ruff check src/access_moppy/file_discovery.py tests/unit/test_file_discovery.py

@joshuatorrance @blimlim @rhaegar325 , could you please review the filename assumptions for UM, CICE, and ocean, and confirm that keeping both layouts covers the planned transition?

@rbeucher
rbeucher requested review from blimlim and joshuatorrance and a lite review from Copilot August 5, 2026 00:04
@rbeucher

rbeucher commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

I guess we should not merge before it is tested against an actual experiment output dataset.

@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.1%. Comparing base (7d16a74) to head (4402e89).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #584   +/-   ##
=====================================
  Coverage   75.0%   75.1%           
=====================================
  Files         38      38           
  Lines       7761    7774   +13     
  Branches    1451    1455    +4     
=====================================
+ Hits        5823    5836   +13     
  Misses      1638    1638           
  Partials     300     300           
Flag Coverage Δ
unit 75.1% <100.0%> (+<0.1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds support for the new ACCESS-ESM1.6 “one variable per raw NetCDF” naming conventions (UM7.3/CICE5/OM2) while retaining legacy discovery behavior, including correct year/month parsing for end-of-filename datestamps.

Changes:

  • Extend ACCESS-ESM1-6_mappings.json file-discovery patterns to include new access-esm1p6.{um7p3,cice5,om2}... filenames and additional subdirectory options.
  • Teach filename parsing to extract year/month from dot-delimited ....YYYY(.nc) and ....YYYY-MM(.nc) suffixes.
  • Expand unit tests to cover new filename patterns and mixed legacy + new-layout archives.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/unit/test_file_discovery.py Adds coverage for year parsing and discovery across legacy + new per-variable layouts.
src/access_moppy/mappings/ACCESS-ESM1-6_mappings.json Adds new ACCESS-ESM1.6 per-variable filename globs and supports multiple subdirs per component.
src/access_moppy/file_discovery.py Updates year/year-month extraction for dot-delimited datestamps and supports list-valued subdir.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/access_moppy/file_discovery.py Outdated
Comment thread src/access_moppy/mappings/ACCESS-ESM1-6_mappings.json Outdated
Comment thread src/access_moppy/file_discovery.py Outdated
Comment thread src/access_moppy/file_discovery.py Outdated
Comment thread tests/unit/test_file_discovery.py Outdated
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.

Support the new ACCESS-ESM1.6 raw output file layout

3 participants