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

compset matches in driver's config_component should be made more general #119

Open
billsacks opened this issue Mar 26, 2016 · 9 comments
Open

Comments

@billsacks
Copy link
Member

Moving issue CESM-Development#402 to here, in the comments that follow.

@billsacks
Copy link
Member Author

Many of the compset matches in driver_cpl/cime_config/config_component.xml seem fragile, especially if we want this same file to work for a variety of active components. Examples are the various NCPL settings and CPL_SEQ_OPTION.

It feels like there references here to specific component names should mostly be eliminated (although it looks like they may be needed in some cases - e.g., to distinguish between the desired coupling frequency of POP vs. MPAS). I'm not sure what would be the best way to solve this problem, but one idea is to have variables like LND_COMP_TYPE saying whether (for example) the land model is active, data, stub or coupler_test - and same for OCN, ATM, GLC, ICE, etc. Then buggy(?) rules like this (for OCN_NCPL):

  <value compset="_DATM.*_CLM4.*_SICE.*_SOCN">1</value>

could be written as

ATM_COMP_TYPE="data" LND_COMP_TYPE="active" ICE_COMP_TYPE="stub" OCN_COMP_TYPE="stub"

@billsacks
Copy link
Member Author

Things like this also concern me (for CCSM_BGC):

      <value compset="HIST.*_DATM%(QIA|CRU)">CO2A</value>
      <value compset="RCP.*_DATM%(QIA|CRU)" >CO2A</value>

What if someone introduces a new DATM mode? It's so easy to miss the fact that you need to update the driver's config_component for things like this.

I often wish that we didn't have the ability to have regular expression matches against compset at all in these xml files, but instead required that components set various pieces of metadata that could be queried for these purposes.

@billsacks
Copy link
Member Author

In talking this through with @mvertens, we feel that there are a few things going on here that should be addressed at some point. This isn't critical, but will be important to address if we want the driver to be more component-independent:

  • We should get rid of regular expression matching in the xml files, since this is error-prone. Instead, the compset long name should be split into pieces, and then you can match against those individual pieces (e.g., ATM_NAME, ATM_OPTIONS, etc.).
  • We should introduce general variables like ATM_TYPE, LND_TYPE, etc., which would have the possible values active, stub, data, coupler_test. Where possible, we should match on those general types. If (for example) you want to do some setting when running with active land, the current workaround is to have a regex match like ^(DLND|SLND|XLND), but that is error-prone. (I'm not at all confident that I just wrote that regex correctly.)
  • For examples like CCSM_BGC, we could also match against a (new) variable that tells us that we're doing a transient run. Again, the principle should be: match against higher-level abstractions, not directly against the compset name: Matching against the compset name is problematic as we rework compset names, add new options, etc.
  • For driver settings that truly are tied in with a specific set of active models (as is the case for the NCPL settings), these settings should be moved to cime_config/cesm. These can match against things like ATM_NAME, rather than matching against the compset with a regex. However, these model-specific settings should be kept to the bare minimum.
  • We should really strive to have rules mean what they say and say what they mean. As an example, if a rule is meant to apply when running with a data runoff model, then it should be written that way -- not matching against "DATM.*POP" (because everyone knows that, if you're running with DATM and POP then you're using DROF, too, right?).

@billsacks
Copy link
Member Author

@billsacks
Copy link
Member Author

There are similar compset matches in config_pes.xml and config_grids.xml - and maybe elsewhere - which should also be handled similarly.

@jgfouca jgfouca closed this as completed in aab40b3 Jul 7, 2016
@billsacks
Copy link
Member Author

This should not have been closed: I believe that the commit that references this issue number was referring to CESM-Development#119 -- not this issue

@billsacks
Copy link
Member Author

billsacks commented Jun 13, 2017

For some more examples and thinking around this issue, see #1522 (comment) and #1522 (comment) and some follow-on comments in that issue

@billsacks billsacks removed their assignment Sep 26, 2018
@billsacks
Copy link
Member Author

I was assigned this issue to look back and decide if it should still be done. I do still feel this is important, so I'd like to keep it open.

@rljacob rljacob removed the Assigned label Oct 10, 2018
@billsacks
Copy link
Member Author

Yet again, the fragile regular expression matches on compset are causing problems and slowing us down (for example, see the change I needed to make in ESCOMP/CESM_CICE5@ac908ac)

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

No branches or pull requests

3 participants