Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rpointer check in buildnml #204

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

alperaltuntas
Copy link
Member

Account for date stamps while checking whether rpointer files exist.

Copy link
Collaborator

@mnlevy1981 mnlevy1981 left a comment

Choose a reason for hiding this comment

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

Have you talked to @jedwards4b about what should be expected? I think we want to continue to support the old file format (e.g. restarting from CESM2 case with rpointer.ocn and no date stamp), and we also probably want to make sure a specific restart file has been created rather than looking for anything that fits the rpointer.ocn.YYYY-MM-DD-SSSSS pattern. If CESM is trying to restart from 0001-01-07-00000 and the only ocean rpointer file is rpointer.ocn.0001-01-06-00000 then we should catch that in buildnml

@jedwards4b
Copy link
Contributor

@alperaltuntas I have a fix for Mike's comment that I can push to your branch if you like?

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.

This works, you can also get the precise datestamp with:

   drv_ptr = case.get_value("DRV_RESTART_POINTER")                                                                                                              
      if drv_ptr:                                                                                                                                                  
          mom_ptr = drv_ptr.replace("cpl","ocn")              

@mnlevy1981
Copy link
Collaborator

This works, you can also get the precise datestamp with:

   drv_ptr = case.get_value("DRV_RESTART_POINTER")                                                                                                              
      if drv_ptr:                                                                                                                                                  
          mom_ptr = drv_ptr.replace("cpl","ocn")              

I like this approach, but my test case doesn't have DRV_RESTART_POINTER -- was it added in CIME or in CMEPS? And which tag?

@jedwards4b
Copy link
Contributor

Still in a cmeps PR: ESCOMP/CMEPS#500

Copy link
Collaborator

@mnlevy1981 mnlevy1981 left a comment

Choose a reason for hiding this comment

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

If DRV_RESTART_POINTER isn't available in CMEPS yet, and this PR lets users restart then I'm all for using it as a placeholder (but we should clean up the logic in the beta05 series)

@alperaltuntas alperaltuntas merged commit 112f5ca into ESCOMP:main Nov 4, 2024
3 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.

3 participants