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

Write restart at end of run via NUOPC component attribute & Initialize cpl_scalar field when created for UFS #969

Conversation

NickSzapiro-NOAA
Copy link
Contributor

@NickSzapiro-NOAA NickSzapiro-NOAA commented Aug 9, 2024

For detailed information about submitting Pull Requests (PRs) to the CICE-Consortium,
please refer to: https://github.com/CICE-Consortium/About-Us/wiki/Resource-Index#information-for-developers

PR checklist

  • Short (1 sentence) summary of your PR:
    Write restart at end of run via NUOPC attribute. Initialize cpl_scalar field when created
  • Developer(s):
    Daniel Sarmiento & Denise Worthen
  • Suggest PR reviewers from list in the column to the right.
  • Please copy the PR test results link or provide a summary of testing completed below.
    Tested in UFS. See Add end of run functionality to CICE NOAA-EMC/CICE#77 and initialize cpl_scalar field when created NOAA-EMC/CICE#83, respectively
  • 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 : Docs for the caps reside in the coupled models, afaik
  • Please document the changes in detail, including why the changes are made. This will become part of the PR commit log.

These are two commits cherry-picked from as in UFS and needed to close NOAA-EMC#84.

This PR adds the ability for CICE to write restart files at the end of the run (independent of other settings) and controlled via the CMEPS configuration option write_restart_at_endofrun. Setting this configuration option to True creates a restart file in the same way for CMEPS, MOM6, and CICE.

This PR also initializes the scalar field value for the index for NTile (implemented for FV3) not used or set in CICE. In certain cases, the scalar field value for this index has been found to be non-zero (NaN in debug compiles). This is the cause of the failure reported in ufs-community/ufs-weather-model#2338.

dpsarmie and others added 2 commits August 9, 2024 13:07
* Add end of run restart file functionality
* Add CICE write_restart_at_endofrun config option call
* Update cice_wrapper_mod.F90
@NickSzapiro-NOAA NickSzapiro-NOAA changed the title For nuopc/cmeps cap: Write restart at end of run via NUOPC component attribute. Initialize cpl_scalar field when created. Write restart at end of run via NUOPC component attribute & Initialize cpl_scalar field when created for UFS Aug 9, 2024
@apcraig apcraig requested a review from dabail10 August 9, 2024 19:54
@anton-seaice
Copy link
Contributor

Thanks @NickSzapiro-NOAA - I didn't test but the code looks good.

Is supoprt for .write_restart_at_endofrun. going into the MOM driver too ?

@NickSzapiro-NOAA
Copy link
Contributor Author

@anton-seaice It's in MOM6 already:
https://github.com/mom-ocean/MOM6/blob/main/config_src/drivers/nuopc_cap/mom_cap.F90#L386

Copy link
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 to me. We have had a request for it in CESM as well.

@eclare108213
Copy link
Contributor

Does the namelist flag dump_last not work?

@DeniseWorthen
Copy link
Contributor

@eclare108213 I don't think there is an issue w/ dump_last, but using the config variable allows us to unify enabling this feature between all coupled components.

@eclare108213
Copy link
Contributor

Ok, as you wish!

@apcraig apcraig merged commit 9c4334a into CICE-Consortium:main Aug 16, 2024
2 checks passed
@NickSzapiro-NOAA NickSzapiro-NOAA deleted the consortium_restarteor_initcplScalar branch August 21, 2024 19:47
NickSzapiro-NOAA added a commit to NOAA-EMC/CICE that referenced this pull request Sep 25, 2024
…e cpl_scalar field when created for UFS (CICE-Consortium#969)


These are two commits cherry-picked from as in UFS and needed to close #84.

This PR adds the ability for CICE to write restart files at the end of the run (independent of other settings) and controlled via the CMEPS configuration option write_restart_at_endofrun. Setting this configuration option to True creates a restart file in the same way for CMEPS, MOM6, and CICE.

This PR also initializes the scalar field value for the index for NTile (implemented for FV3) not used or set in CICE. In certain cases, the scalar field value for this index has been found to be non-zero (NaN in debug compiles). This is the cause of the failure reported in ufs-community/ufs-weather-model#2338.

* Add end of run functionality to CICE (#77)
* initialize cpl_scalar field when created (#83)

---------

Co-authored-by: Daniel Sarmiento <42810219+dpsarmie@users.noreply.github.com>
Co-authored-by: Denise Worthen <denise.worthen@noaa.gov>
@DeniseWorthen DeniseWorthen mentioned this pull request Oct 17, 2024
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

History conflicts between CICE-Consortium and emc/develop
7 participants