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

Some small CESM updates. #812

Merged
merged 6 commits into from
Feb 1, 2023
Merged

Conversation

dabail10
Copy link
Contributor

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:
    Removes a comment about the OMP initialization not working in CESM and adds back in some fixes for restarting in CESM.
  • Developer(s):
    dabail10 (D. Bailey)
  • 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.
    https://github.com/CICE-Consortium/Test-Results/wiki/cice_by_hash_forks#8afd0be23357b7160e1c9fb5a228c7a0b60c78e4
  • 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 provide any additional information or relevant details below:

@DeniseWorthen
Copy link
Contributor

@dabail10 could you make one small change that I need also? I found I needed the nu_diag_set parameter to be available because it is used now in the cap code, even w/o cesmcoupled being active. The change is

@@ -81,10 +80,8 @@ module ice_fileunits
       integer (kind=int_kind), public :: &
          nu_diag = ice_stdout  ! diagnostics output file, unit number may be overwritten

-#ifdef CESMCOUPLED
       logical (kind=log_kind), public :: &
          nu_diag_set = .false. ! flag to indicate whether nu_diag is already set
-#endif

@dabail10
Copy link
Contributor Author

Sounds good.

@eclare108213
Copy link
Contributor

-#ifdef CESMCOUPLED
       logical (kind=log_kind), public :: &
          nu_diag_set = .false. ! flag to indicate whether nu_diag is already set
-#endif

Could this change adversely affect other codes? Is this parameter used in any other codes?

@DeniseWorthen
Copy link
Contributor

@eclare108213 The nu_diag_set is only used by the cmeps NUOPC cap. It is false by default, so it shouldn't impact any other use case. However, if it is an issue, an alternative fix would be to wrap the code related to nu_diag_set in the cap with CESMCOUPLED. It's just a bit messier.

@apcraig
Copy link
Contributor

apcraig commented Jan 30, 2023

The nu_diag_set implementation should be refactored at some point, it's quite awkward as it stands now.

Why remove the comment about the OpenMP block that doesn't work in CESM? Does it work now, if so, should the ifdef _OPENMP be removed? We should have a comment there that indicates why that particular openmp loop is an ifdef block, don't you think?

@dabail10
Copy link
Contributor Author

It does work in CESM now. I'm not sure about the ifdef. I guess it is redundant? Or actually, we don't want this section to print when OpenMP is not active correct?

@apcraig
Copy link
Contributor

apcraig commented Jan 30, 2023

You're right, we do want the _OPENMP ifdef there. I guess I thought it was related to CESM without looking at it. I now remember that this was debugged and fixed a while ago, guess the comment should have been removed then. thanks.

@apcraig apcraig merged commit b946a95 into CICE-Consortium:main Feb 1, 2023
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.

4 participants