Skip to content

Conversation

@jasonb5
Copy link
Collaborator

@jasonb5 jasonb5 commented Dec 23, 2025

Description

When using the --copy-only or --last_date option, the latest rpointer files would be moved from the run directory breaking the ability to restart a run. The first archived rpointer file would be incorrect as CIME would move the current rpointer into the archive directory and then create all subsequent rpointer files (these would be correct).

  • Fixes latest rpointer files being moved from run directory
  • Fixes first archived rpointer file contents
  • Refactors `_archive_rpointer_files
  • Adds unittests

Checklist

  • My code follows the style guidlines of this proejct (black formatting)
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have added tests that excerise my feature/fix and existing tests continue to pass
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding additions and changes to the documentation

Copy link
Contributor

@jedwards4b jedwards4b left a comment

Choose a reason for hiding this comment

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

I suggest removing the three unused routines:
get_entries
get_entry_info
get_rpointer_contents.


yield file, content

# TODO check if used otherwise remove
Copy link
Contributor

Choose a reason for hiding this comment

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

I could not find any usage of any of get_entries, get_entry_info or get_rpointer_contents in CESM.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I could not find any usage either, I'll go ahead and remove them.

@jedwards4b
Copy link
Contributor

Regarding the test failures I found that a check of the object 'archive' at line 200 of case_st_archive.py
reveals it to be of type: <CIME.XML.archive.Archive object at 0x7f40e60e9f90>
not of type env_archive as expected.

Copy link
Contributor

@jedwards4b jedwards4b left a comment

Choose a reason for hiding this comment

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

Running case.st_archive --test-all reveals a problem with your new code. The
archive variable is of type Archive and not env_archive as you expect.

@jasonb5
Copy link
Collaborator Author

jasonb5 commented Dec 23, 2025

@jedwards4b Thanks, I see the issue. I'll adjust the code and have you review again.

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.

3 participants