Skip to content

NUOPC/CMEPS only: Make datestamps in pointer filenames configurable (#9)#1031

Merged
apcraig merged 3 commits intoCICE-Consortium:mainfrom
ACCESS-NRI:237-rpointer_datestamp
Sep 11, 2025
Merged

NUOPC/CMEPS only: Make datestamps in pointer filenames configurable (#9)#1031
apcraig merged 3 commits intoCICE-Consortium:mainfrom
ACCESS-NRI:237-rpointer_datestamp

Conversation

@anton-seaice
Copy link
Copy Markdown
Contributor

PR checklist

  • Short (1 sentence) summary of your PR:
    This adds support in NUOPC/CMEPS driver for the addition of datestamps to the pointer filenames (rpointer fix for cesm #990) to be configurable instead of always on when #CESMCOUPLED is set
  • Developer(s):
    @anton-seaice
  • Suggest PR reviewers from list in the column to the right.
    @apcraig @jedwards4b
  • Please copy the PR test results link or provide a summary of testing completed below.
    If the changes look conceptually ok, I will run one of the test suites
  • How much do the PR code changes differ from the unmodified code?
    • bit for bit
    • different at roundoff level
    • more substantial
  • Does this PR create or have dependencies on Icepack or any other models?
    • Yes
    • No
  • Does this PR update the Icepack submodule? If so, the Icepack submodule must point to a hash on Icepack's main branch.
    • Yes
    • No
  • Does this PR add any new test cases?
    • Yes
    • No
  • Is the documentation being updated? ("Documentation" includes information on the wiki or in the .rst files from doc/source/, which are used to create the online technical docs at https://readthedocs.org/projects/cice-consortium-cice/. A test build of the technical docs will be performed as part of the PR testing.)
    • Yes
    • No, does the documentation need to be updated at a later time?
      • Yes
      • No
  • Please document the changes in detail, including why the changes are made. This will become part of the PR commit log.

This adds support in NUOPC/CMEPS driver for the addition of datestamps to the pointer filenames to be configurable through the nuopc option restart_pointer_append_date .

This is a companion change to ESCOMP/CESM_share#70, and does not impact any current default behaviour.

anton-seaice and others added 2 commits May 21, 2025 10:19
This adds support in cice for the addition of datestamps to the pointer filenames to be configured through the nuopc option restart_pointer_append_date .

Co-authored-by: Andrew Kiss <[email protected]>
Co-authored-by: Dougie Squire <[email protected]>
@anton-seaice
Copy link
Copy Markdown
Contributor Author

@apcraig - if the approach here is ok, Ill run some tests.

@apcraig apcraig requested review from apcraig and dabail10 May 21, 2025 17:39
end if

if (restart_format(1:3) /= 'bin') filename = trim(filename) // '.nc'
filename = trim(filename) // '.nc'
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.

Just curious about this change. I guess binary restart is only supported with the io_binary package? What happens if binary is set with io_netcdf and io_pio2? Should there be an abort if restart_format = 'bin'? Are there equivalent issues with history format? As an aside, I have wanted to merge the three io_ directories for years and support binary, netcdf, or pio all at the same time via run-time settings, but it would be a big project.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This if statement didn't really make any sense, so i removed it as the io_binary code isn't included if using pio.

What happens if binary is set with io_netcdf and io_pio2? Should there be an abort if restart_format = 'bin'? Are there equivalent issues with history format?

I don't think there is any error handling of this.

@apcraig
Copy link
Copy Markdown
Contributor

apcraig commented May 21, 2025

@apcraig - if the approach here is ok, Ill run some tests.

This looks good, lets keep moving it forward. If you can run the io test suite, that would be great (it requires netcdf and pio capability). If not, I'm happy to do that (or up to a full test suite on multiple compilers) on derecho, let me know if/how I can help.

@apcraig apcraig added the IO label May 21, 2025
@dabail10
Copy link
Copy Markdown
Contributor

Have you tested this within CMEPS to see if the date strings are still working?

@anton-seaice
Copy link
Copy Markdown
Contributor Author

anton-seaice commented May 22, 2025

Have you tested this within CMEPS to see if the date strings are still working?

It was a couple of months back, so ill make sure to retest this.

Shall I change it to 6 digit years as well? (@jedwards4b )
e.g.

        if(myear <= 9999) then
           write(lpointer_file,'(a,i4.4,a,i2.2,a,i2.2,a,i5.5)') '.',yr,'-',mon,'-',day,'-',time
        else if (myear <= 999999) then
           write(lpointer_file,'(a,i6.6,a,i2.2,a,i2.2,a,i5.5)') '.',yr,'-',mon,'-',day,'-',time
        endif

@dabail10 dabail10 mentioned this pull request Jun 6, 2025
5 tasks
@anton-seaice
Copy link
Copy Markdown
Contributor Author

@apcraig - if the approach here is ok, Ill run some tests.

This looks good, lets keep moving it forward. If you can run the io test suite, that would be great (it requires netcdf and pio capability). If not, I'm happy to do that (or up to a full test suite on multiple compilers) on derecho, let me know if/how I can help.

I've been trying to run the io tests on the unchanged cice repository, and three tests with hdf5 and pio fail in the run step.

The error is:

 (ice_pio_init) nprocs     =           16
 (ice_pio_init) pio_iotype =            4
 (ice_pio_init) iotasks    =            4
 (ice_pio_init) baseroot   =            1
 (ice_pio_init) stride     =            4
 (ice_pio_init) nmode      =            0
 (ice_pio_init) create file ./history/iceh_ic.2005-01-01-00000.nc
  
 (abort_ice)ABORTED: 
 (abort_ice) called from ice_history_write.F90
 (abort_ice) line number          689
 (abort_ice) error = 
 (ice_pio_check)NetCDF: Problem with HDF5 dimscales., (ice_write_hist) ERROR: en
 ding pio definitions

If I manually set iotasks = 1 , then it runs ok.

@DeniseWorthen
Copy link
Copy Markdown
Contributor

@anton-seaice This looked familiar from a different context. See ufs-community/ufs-weather-model#2174 (comment) and the following comments.

I wasn't involved in this issue, I just remembered something to do with 'dismscales'.

@dabail10
Copy link
Copy Markdown
Contributor

dabail10 commented Jul 7, 2025

Have you tested this within CMEPS to see if the date strings are still working?

It was a couple of months back, so ill make sure to retest this.

Shall I change it to 6 digit years as well? (@jedwards4b ) e.g.

        if(myear <= 9999) then
           write(lpointer_file,'(a,i4.4,a,i2.2,a,i2.2,a,i5.5)') '.',yr,'-',mon,'-',day,'-',time
        else if (myear <= 999999) then
           write(lpointer_file,'(a,i6.6,a,i2.2,a,i2.2,a,i5.5)') '.',yr,'-',mon,'-',day,'-',time
        endif

You mean the i6.6?

@anton-seaice
Copy link
Copy Markdown
Contributor Author

Thanks @DeniseWorthen - that is useful !

@apcraig - I guess you have run the io tests successfully on both intel-classic and oneapi ? Do you build with pnetcdf and hdf5 in one netcdf library? Or only pnetcdf for the cdf tests and only hdf5 for the hdf5 tests?

You mean the i6.6?

Yep

@anton-seaice
Copy link
Copy Markdown
Contributor Author

@dabail10 :

I reconfirmed default behaviour when using the CMEPS driver is unchanged, e.g. rpointer.ice.1959-01-01-10800 was made.

I did a second ad-hoc test, with
restart_pointer_append_date = .false.
set in nuopc.runconfig and then the file is just : rpointer.ice

@apcraig :

The io_suite results (on intel) are unaffected - results are bit for bit except for the hdf5 tests which failed before and after the change.

Copy link
Copy Markdown
Contributor

@dabail10 dabail10 left a comment

Choose a reason for hiding this comment

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

This looks good. I will try to test it out today.

@anton-seaice
Copy link
Copy Markdown
Contributor Author

@dabail10 - have you been able to test this ?

@dabail10
Copy link
Copy Markdown
Contributor

Finally tested this in CESM. I'm going to look into it further, but the ice rpointer file does have the date while the other component restarts do not.

@jedwards4b
Copy link
Copy Markdown
Contributor

You just need to update your cesm to one new enough for the other components to have timestamps.

@dabail10
Copy link
Copy Markdown
Contributor

I am testing this in a cesm3_0_alpha7e sandbox. I thought this was already there?

@jedwards4b
Copy link
Copy Markdown
Contributor

It looks like you are using cdeps1.0.53 while the timestamps are in cdeps1.0.79

@dabail10
Copy link
Copy Markdown
Contributor

This doesn't make sense to me. I was using a cesm3_0_beta06 sandbox and the datestamps were working. This has cdeps1.0.73. My alpha7e sandbox (/glade/work/dbailey/cesm3_0_alpha07e) was using cdeps1.0.77. So, was it working before and then broken again?

@jedwards4b
Copy link
Copy Markdown
Contributor

@dabail10 I don't think that your sandbox is what you think that it is. You should be on a tag or on cesm3.0-alphabranch, but you are on branch master.

@anton-seaice
Copy link
Copy Markdown
Contributor Author

The code for this in other components is in CESM_share - https://github.com/ESCOMP/CESM_share/releases/tag/share1.1.9 or anything later is ok

@dabail10
Copy link
Copy Markdown
Contributor

dabail10 commented Sep 2, 2025

Quick update here. The dates still have some bugs in the latest CESM tags. CDEPS, MOM, are still a work in progress. Anyhow, I tested this in a D compset (active CICE only) and was happy with the results.

@anton-seaice
Copy link
Copy Markdown
Contributor Author

Thanks @dabail10 ! - Please review/merge when ready @apcraig :)

@apcraig
Copy link
Copy Markdown
Contributor

apcraig commented Sep 3, 2025

I'll run some tests next week just to make sure all is OK and get it merged. Thanks all.

@apcraig apcraig self-assigned this Sep 3, 2025
@apcraig
Copy link
Copy Markdown
Contributor

apcraig commented Sep 11, 2025

@apcraig apcraig merged commit b010325 into CICE-Consortium:main Sep 11, 2025
2 checks passed
TillRasmussen pushed a commit to TillRasmussen/CICE that referenced this pull request Oct 17, 2025
…) (CICE-Consortium#1031)

This adds support in NUOPC/CMEPS driver for the addition of datestamps to the pointer filenames to be configurable through the nuopc option restart_pointer_append_date .

This is a companion change to ESCOMP/CESM_share#70, and does not impact any current default behaviour.

* Make datestamps in pointer filenames configurable (#9)

* set across all io options consistently

* use ice_restart_shared consistently across all 3 methods

---------

Co-authored-by: Andrew Kiss <[email protected]>
Co-authored-by: Dougie Squire <[email protected]>
andrewpauling pushed a commit to andrewpauling/CICE that referenced this pull request Nov 30, 2025
…ICE-Consortium#9) (CICE-Consortium#1031)

This adds support in NUOPC/CMEPS driver for the addition of datestamps to the pointer filenames to be configurable through the nuopc option restart_pointer_append_date .

This is a companion change to ESCOMP/CESM_share#70, and does not impact any current default behaviour.

* Make datestamps in pointer filenames configurable (CICE-Consortium#9)

* set across all io options consistently

* use ice_restart_shared consistently across all 3 methods

---------

Co-authored-by: Andrew Kiss <[email protected]>
Co-authored-by: Dougie Squire <[email protected]>
@anton-seaice anton-seaice deleted the 237-rpointer_datestamp branch January 18, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants