Skip to content

add new noresm cime model - #5057

Merged
jgfouca merged 48 commits into
ESMCI:masterfrom
mvertens:feature/add_new_cime_model
Sep 15, 2026
Merged

jgfouca merged 48 commits into
ESMCI:masterfrom
mvertens:feature/add_new_cime_model

Conversation

@mvertens

@mvertens mvertens commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Description

NorESM and CESM share the same git-fleximod layout, so a NorESM checkout was previously detected as cesm. This PR adds noresm as a model in its own right. This PR should have no impact on E3SM CIME functionality.

  • new file CIME/data/config/noresm/config_files.xml — this new file is based on the cesm file, with MODEL set to noresm, components NorESM does not use removed.

  • get_model() now reads a new file - $SRCROOT/.cime_model_id if it is present.

    • If the string inside this file is noresm - then the noresm model is used.
    • This takes precedence over CIME_MODEL; a conflicting value is warned about.
    • Note that the accepted values for the string are the names of the files in cime/CIME/data/config (currently cesm, e3sm, noresm and ufs)
  • a new variable CESM_LIKE_MODELS collects the places where CIME branches on the model name and noresm must behave as cesm: shared library list, unsupported compset check, describe_version tag lookup, case cloning, build provenance.

  • Backwards compatible. Nothing is modified without the presence of the .cime_model_id file, which lives in the NorESM repo.

A few other changes:

  • git@ (ssh) ==> https: for the cprnc submodule (universal access to CIME)
  • Fix typo in Makefile (CESM/NorESM specific)
  • shebang fix in find_circular_dependencies.py (necessary in modern environments, e.g., conda) (CESM/NorESM specific)
  • Taking out the "mira" special case (I don't think this machine exists)

Testing: verified that this change is completel backwards compatible with noresm checkouts

Checklist

  • My code follows the style guidelines of this project (black formatting)
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have tested that exercise 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

mvertens and others added 30 commits October 16, 2023 09:16
update NorESMhub CIME to and ESMCI cime6.0.173

The only difference between NorESMhub CIME in this PR and and ESMCI cime6.0.173 is the addition of blom in
CIME/data/config/cesm/config_files.xml

Test suite: Ran SMS_D_Ld1.T62_tn14.NOINYOC.betzy_intel and verified that it was bfb.
Test baseline:
Test namelist changes:
Test status: bfb

User interface changes?: None

Update gh-pages html (Y/N)?: No
merge to cime6.0.232

This PR merges the NorESMHub cime fork to cime6.0.232 and is needed to have the new dglc component be able to be run out of system tests.

Test suite: Testing was done on derecho - see ESCOMP/CDEPS#268

Fixes: None

User interface changes?: None

Update gh-pages html (Y/N)?: N
Update to cime6.0.250
Remove ssh dependence in .gitmodules file
update to cime6.1.28
Needed to update share (i.e. nuopc_shr_methods.F90) which in turn in needed to update CMEPS.

Testing:
Verified that SMS_D_Ln9.ne30pg3_ne30pg3_mtn14.NF2000.betzy_intel.cam-outfrq9s is bfb with noresm2_5_013_cam6_3_158.

Test status: bit for bit
User interface changes?: No
Update gh-pages html ?: No
Update CIME to ESMCI/cime6.1.38
Add in one bug fix from cime6.1.44

GitHub PR link: NorESMhub#93

Test suite: noresm prealpha
Test baseline: NA
Test namelist changes: NA
Test status: BFB
Update mkDepends and Makefile to be able to handle Fortran submodules

- These files are identical to the ones in ESMCI/master.
- CAM has started using Fortran submodules (a Fortran 2008 feature).
- Updated Makefile also contains capability of building FTorch library

Test suite: aux_cam_noresm
Test baseline: NA
Test namelist changes: NA
Test status: bit for bit
User interface changes?: NA

Update gh-pages html (Y/N)?: N
cime6.1.142_noresm_v1: update to ESMCI cime6.1.142
Co-authored-by: goldy <1588651+gold2718@users.noreply.github.com>

@billsacks billsacks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is great! I really like this approach - both the CESM_LIKE_MODELS and the check for a model id file at the top level. Thanks a lot for doing this, @mvertens - this is going to really help with coordination of CMEPS, CDEPS and other repositories between NorESM and CESM!

I have one request for a fix to the doctest. (Sorry that I missed this in my review on NorESMhub.) Other than that, this looks great.

Comment thread CIME/utils.py Outdated
>>> get_model()
'e3sm'
>>> reset_cime_config()
>>> del os.environ["SRCROOT"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It seems like, instead of deleting the SRCROOT environment variable, this doctest should save any pre-existing SRCROOT environment variable and then, if it existed previously, reset it to the original rather than deleting it.

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.

@billsacks - thanks for catching this. I have fixed this problem.

@billsacks

Copy link
Copy Markdown
Member

@jasonb5 and @jgfouca - There are a couple of design points here that I discussed with @mvertens and am satisfied with myself, but would be happy for your input on:

(1) The new $SRCROOT/.cime_model_id file takes precedence over everything else. This felt like the right approach to me, but can you see any problems with this?

(2) Do we still have tests that use a standalone cime, outside of any model? If so, can you see any problems with this check for .cime_model_id for standalone cime usages? I couldn't see any, but wanted to run this by you.

@jgfouca
jgfouca requested a balanced review from Copilot September 15, 2026 15:51
@jgfouca

jgfouca commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

@billsacks , I'm ok with .cime_model_id.

Copilot AI left a comment

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@billsacks billsacks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good now - thank you!

@mvertens

Copy link
Copy Markdown
Contributor Author

@jgfouca @billsacks - thanks for your reviews. Is it okay to merge this? Who normally does this?

@jgfouca
jgfouca merged commit 1dddaa7 into ESMCI:master Sep 15, 2026
12 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.

6 participants