Skip to content

For cesm add coupling_mode to the list of attributes that can be used by component config_component.xml files - #5044

Closed
ekluzek wants to merge 7 commits into
ESMCI:masterfrom
ekluzek:add_coupling_mode_to_attributes_for_config_component
Closed

For cesm add coupling_mode to the list of attributes that can be used by component config_component.xml files#5044
ekluzek wants to merge 7 commits into
ESMCI:masterfrom
ekluzek:add_coupling_mode_to_attributes_for_config_component

Conversation

@ekluzek

@ekluzek ekluzek commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Description

For cesm add coupling_mode to the list of attributes that can be used by components config_component.xml.

Note, this happens before shell_commands is called, so you can't change coupling_mode for a case with a user or test-mod shell_commands file.

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 added tests 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

…es that can be used by components config_component.xml. Note, this happens before shell_commands is called, so you can't change coupling_mode for a case with a user-mod
@ekluzek ekluzek added ty: enhancement Responsibility: CESM Responsibility to manage and accomplish this issue is through CESM tp: CIMElib tp: config Responsibility: CTSM Responsibility to manage and accomplish this issue is the CTSM Software group python Pull requests that update python code labels Aug 29, 2026
@billsacks

Copy link
Copy Markdown
Member

I've been thinking about this. Your point that you can't change this in testmods raises what I think is a broader concern, at least in my mind: I feel like it's problematic to have the defaults for xml variables depend on other xml variables. I've had the mental model: Compset sets default values of xml variables; xml settings set default values of namelist variables. The change in this PR breaks this by having some xml defaults depend on other xml defaults. Besides messing with the mental model, this also seems problematic in that it introduces an order dependence to the parsing, and raises problematic questions about what should happen if a user changes the value of COUPLING_MODE after possibly making other changes to other xml variables whose default depends on it. At the very least, I think this would require moving COUPLING_MODE to env_case.xml, but then we'd probably want a way to set it at create_newcase time, e.g., via a new flag. This is all feeling very messy.

Therefore, I think we should not bring in this change. The differentiation that you're trying to allow with this seems like it would best be done in some other way. Some ways that come to mind are: (1) differentiating on cime_model (I know that's the long-term plan); (2) adding some compset-level differentiators.

@mvertens

mvertens commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@billsacks - I totally agree with the points you raise and don't think we should bring in this change as well. I think at this point if we want to have xml variables be noresm dependent we need to have noresm be parallel to cesm in cime.

@ekluzek

ekluzek commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

OK, we decided to not do this approach. And have something possible in CDEPS. So closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Pull requests that update python code Responsibility: CESM Responsibility to manage and accomplish this issue is through CESM Responsibility: CTSM Responsibility to manage and accomplish this issue is the CTSM Software group tp: CIMElib tp: config ty: enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

For CESM add coupling_mode to the list of attributes that can be used in components config_component.xml files

3 participants