Skip to content

CO2A for cplhist in DATM with CLM - #696

Open
ekluzek wants to merge 4 commits into
ESCOMP:mainfrom
ekluzek:co2a_for_cplhist
Open

CO2A for cplhist in DATM with CLM#696
ekluzek wants to merge 4 commits into
ESCOMP:mainfrom
ekluzek:co2a_for_cplhist

Conversation

@ekluzek

@ekluzek ekluzek commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Description of changes

Set CCSM_BGC to CO2A for DATM CPLHIST forcing mode with CLM

Specific notes

Contributors other than yourself, if any:

CMEPS Issues Fixed (include github issue #):

Are changes expected to change answers? (specify if bfb, different at roundoff, more substantial)
Yes, for DATM%CPLHIST mode compsets

Any User Interface Changes (namelist or namelist defaults changes)?
Rather than constant CO2 CPLHIST cases will use CO2 from the input CPLHIST case driving it

Testing performed

Please describe the tests along with the target model and machine(s)
If possible, please also added hashes that were used in the testing

Running: aux_clm, aux_cdeps testing in ctsm5.4.054 (ESCOMP/CTSM#4180)

@ekluzek ekluzek added enhancement New feature or request CESM only Responsibility: CTSM Responsibility to manage and accomplish this issue is the CTSM Software group labels Aug 22, 2026
Comment thread cime_config/config_component_cesm.xml Outdated
@ekluzek
ekluzek marked this pull request as ready for review August 24, 2026 17:56
@ekluzek
ekluzek requested a review from billsacks August 24, 2026 17:56
@ekluzek
ekluzek requested a review from fischer-ncar August 24, 2026 18:57

@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.

Thanks a lot for fixing this, @ekluzek !

I have one request for an improvement to the regex match.

Beyond that, I just want to confirm: With this addition, we'll use CO2A for any CPLHIST run with CLM, regardless of whether it's transient or spinup, but only for transient non-CPLHIST datm-forced runs (HIST or SSP). Is that the intended behavior?

Comment thread cime_config/config_component_cesm.xml Outdated
<value compset="_CAM">CO2A</value>
<value compset="_DATM">none</value>
<value compset="_DATM%CPLHIST.+BLOM%ECO">CO2A</value>
<value compset="_DATM%CPLHIST_CLM">CO2A</value>

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.

For slightly more robustness, and for consistency with other matches, this should be:

Suggested change
<value compset="_DATM%CPLHIST_CLM">CO2A</value>
<value compset="_DATM%CPLHIST.*_CLM">CO2A</value>

(The addition of .* handles: (1) If the order were ever allowed to change, so CLM isn't the next component after DATM; and (2) If there could ever be a second modifier after CPLHIST.)

(I am once again reminded of #640.)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for that point. I should do something similar in other places in my CTSM PR where I'm doing things like this.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Did this in e4aa62d

@ekluzek

ekluzek commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks a lot for fixing this, @ekluzek !

I have one request for an improvement to the regex match.

Yes, did that.

Beyond that, I just want to confirm: With this addition, we'll use CO2A for any CPLHIST run with CLM, regardless of whether it's transient or spinup, but only for transient non-CPLHIST datm-forced runs (HIST or SSP). Is that the intended behavior?

Yes, that's correct. It's just adding the bit about CPLHIST with CLM for any mode. This is the restricted change I want to make now. The idea is that the CO2 on the CPLHIST files is the truth about what CO2 should be for any CPLHIST case trying to duplicate it. The CO2 from CAM can be different from DATM (CAM has latitude bands), and CAM might've had prognostic CO2, or non-standard settings or datasets. So using CO2 from it as truth is the best default to use.

We are also going to need to do something for MOM with MARBL, but we need to talk to @mnlevy1981 and @alperaltuntas about that. And that will be a future PR.

The more general solution is to do #698 which I think is clearer and more robust, but requires changes across: CMEPS, CDEPS, CTSM, MOM, and CAM so we need to decide if/when that should be done.

@ekluzek
ekluzek requested a review from billsacks August 25, 2026 16:55
@ekluzek

ekluzek commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator Author

OK, I'm running aux_cdeps and aux_clm testing with this now, and if that looks good I'd like to merge.

@ekluzek ekluzek changed the title CO2A for cplhist in DATM CO2A for cplhist in DATM with CLM Aug 25, 2026

@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.

Thanks for the change, but in making that change you introduced another change that I'd like you to revert:

<value compset="_CAM">CO2A</value>
<value compset="_DATM">none</value>
<value compset="_DATM%CPLHIST.+BLOM%ECO">CO2A</value>
<value compset="DATM%CPLHIST.*_CLM">CO2A</value>

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.

Please change this to restore the leading _ that you removed:

Suggested change
<value compset="DATM%CPLHIST.*_CLM">CO2A</value>
<value compset="_DATM%CPLHIST.*_CLM">CO2A</value>

In practice it probably doesn't matter, but I find these arbitrary inconsistencies in regexes to be a source of confusion and possible bugs.

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

Labels

CESM only enhancement New feature or request Responsibility: CTSM Responsibility to manage and accomplish this issue is the CTSM Software group

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants