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

Bad XML entry in config_components.xml #15

Open
mnlevy1981 opened this issue Sep 4, 2019 · 0 comments
Open

Bad XML entry in config_components.xml #15

mnlevy1981 opened this issue Sep 4, 2019 · 0 comments

Comments

@mnlevy1981
Copy link
Collaborator

Description of the issue:

The following block of code in cime_config/config_components.xml doesn't behave as expected:

  <entry id="OCN_COUPLING">
    <type>char</type>
    <valid_values>full,partial</valid_values>
    <default_value>full</default_value>
    <values>
      <value compset="_DATM%CPLHIST.*_POP2">full</value>
      <value compset="_DATM.*_POP2">partial</value>
    </values>
    <group>build_pop</group>
    <file>env_build.xml</file>
    <desc>Determine surface freshwater and heat forcing settings.
      The full option yields settings that are appropriate for coupling to an
      active atmospheric model (e.g., a B-type compset). The partial option yields
      settings that are appropriate for coupling to a data atmospheric model
      (e.g., a C or G-type compset). The create_newcase command selects the
      appropriate setting for this variable based on the specified compset.
      Users should NOT EDIT this setting.</desc>
</entry>

The default behavior of CIME is to take the last value option that matches the maximum number of attributes, so a compset with DATM%CPLHIST.*_POP2 in the long name will end up using OCN_COUPLING=partial rather than full. To fix this, either start the values block with <values match="first"> OR swap the order of the <value> items (doing both will continue to provide the wrong value for CPLHIST compsets!). I think swapping the <value> items is the better solution as we don't use the match attribute anywhere else in cime_config/.

Version:

  • CESM: 2.X (2.0, 2.1, and the 2.2 development branches)
  • POP2: cesm2_0_x_rel, cesm2_1_x_rel, and master

Machine/Environment Description:

Discovered on cheyenne during a code review with @klindsay28 but problem should be evident on any machine

Any xml/namelist changes or SourceMods:

No

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

No branches or pull requests

1 participant