Skip to content

ctsm5.4.050: Remove FatesColdSatPhen testmod - #4155

Open
samsrabin wants to merge 5 commits into
ESCOMP:masterfrom
samsrabin:remove-fatescoldsatphen-testmod
Open

ctsm5.4.050: Remove FatesColdSatPhen testmod#4155
samsrabin wants to merge 5 commits into
ESCOMP:masterfrom
samsrabin:remove-fatescoldsatphen-testmod

Conversation

@samsrabin

@samsrabin samsrabin commented Aug 6, 2026

Copy link
Copy Markdown
Member

Description of changes

Removes the FatesColdSatPhen testmod, which didn't actually set anything having to do with SP mode (see #4150). Tests that included FatesColdSatPhen now include FatesColdDailyHist instead. The latter has replaced FatesColdBasic, which was previously included by FatesColdSatPhen and has now been updated to include the history file setting changes from FatesColdSatPhen's user_nl_clm.

All remaining Fates*SatPhen* testmods now explicitly set use_fates_sp = .true.. The justification: If you're only testing that standard FATES SP mode works, use a FatesSp compset so that you also test the compset. That's why we deleted the FatesColdSatPhen testmod—to ensure the FatesSp compsets are tested. However, these other testmods exercise special SP-mode settings. They should still exist, and they should all set FATES SP mode as a backup in case a non-FatesSp compset is chosen.

  • Remove temporary remove-fatescoldsatphen-testmod test suite

Specific notes

Contributors other than yourself, if any: None

CTSM issues resolved or otherwise addressed, if any:

If answers are expected to change, describe (delete this line otherwise): Answers are not expected to change in any meaningful sense. However, there will be diffs in the former

SMS_Lm1.f45_f45_mg37.I2000Clm60FatesSpCruRsGs.derecho_intel.clm-FatesColdBasic

test, which is now

SMS_Lm1.f45_f45_mg37.I2000Clm60FatesSpCruRsGs.derecho_intel.clm-FatesColdDailyHist

and is for the first time getting the history file setting changes that were in FatesColdSatPhen's user_nl_clm.

Any user interface changes (namelist or namelist defaults changes)?

Testing planned or performed, if any:

  • aux_clm suite
  • fates suite

Requirements before merge:

  • The code in this PR branch builds with no errors.
  • The code in this PR branch runs with no errors. Briefly describe tested configuration(s):
  • This either (a) does not change answers, (b) it only changes answers at roundoff level, or (c) I have performed a scientific evaluation of the answer changes. Which?: (a)
  • I have reviewed relevant parts of the CLM documentation Tech Note or User's Guide to determine if anything needs to be changed or added. If it does, describe:
  • This PR either (a) does not create a need to update the documentation or (b) includes required documentation updates (see guidelines for contributing documentation). Which?: (b)

Now includes the daily one-timestep-per-file outputs that were the only thing FatesColdSatPhen was doing.

Will cause diffs due to these new outputs in one existing test: SMS_Lm1.f45_f45_mg37.I2000Clm60FatesSpCruRsGs.derecho_intel.clm-FatesColdBasic.
Testing that standard FATES SP mode works should be accomplished with a FatesSp compset instead.

Tests that were using FatesColdSatPhen now use FatesColdBasic. This change should not affect answers in those tests.
If you're only testing that standard FATES SP mode works, use a FatesSp compset so that you also test the compset. That's why we deleted the FatesColdSatPhen testmod---to ensure the FatesSp compsets are tested. However, these other testmods exercise *special* SP-mode settings. They should still exist, and *they should all set FATES SP mode* as a backup in case a non-FatesSp compset is chosen.
FatesColdDryDepSatPhen and FatesColdMeganSatPhen were setting these:
   hist_mfilt  = 1
   hist_nhtfrq = -24
but they're already set by FatesColdDailyHist, which they include.
@samsrabin
samsrabin requested a review from ekluzek August 6, 2026 20:04
@samsrabin samsrabin self-assigned this Aug 6, 2026
@samsrabin samsrabin added code health improving internal code structure to make easier to maintain (sustainability) testing additions or changes to tests non-b4b Changes answers (incl. adding tests) test: aux_clm Pass aux_clm suite before merging test: fates Pass fates test suite before merging labels Aug 6, 2026
@samsrabin samsrabin moved this to In progress - master in CTSM: Upcoming tags Aug 6, 2026
@samsrabin
samsrabin force-pushed the remove-fatescoldsatphen-testmod branch from 0e7f317 to f924f9b Compare August 6, 2026 20:54

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

OK this is good. I don't really like the testmods that explicitly set use_fates_sp==TRUE. But, I can relent and accept that. However, do put comments in the user_nl_clm files that give the justification and that in general you should use them in tests with FatesSp compsets. And then I can accept that. This could also be pointed out in the testlist, and I have one suggestion at a change to the comment in the testlist to say that. I think that's helpful, but not as important as a comment in the testmod.

hist_mfilt = 1
hist_nhtfrq = -24

use_fates_sp = .true.

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.

I really think that we shouldn't set this in the testmod, that we should use the FatesSp compset. I think there are other things besides use_fates_sp that are set there now, and even if there aren't they may well be more in the future.

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.

Now, your notes give this:

"The justification: If you're only testing that standard FATES SP mode works, use a FatesSp compset so that you also test the compset. That's why we deleted the FatesColdSatPhen testmod—to ensure the FatesSp compsets are tested. However, these other testmods exercise special SP-mode settings. They should still exist, and they should all set FATES SP mode as a backup in case a non-FatesSp compset is chosen."

OK, I can see that.

But, add a comment that says that in the user_nl_clm. I think the tests for these modes should use the FatesSp compset, but as they are generally testing something slightly outside of that, it's probably OK to have that here.

hist_mfilt = 1
hist_nhtfrq = -24

use_fates_sp = .true.

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.

Same as above add a comment that talks about this and that in general this should be used with a FatesSP compset.

@@ -1,3 +1,4 @@
use_fates_sp = .true.

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.

Same as above add a comment about this.

<machines>
<machine name="derecho" compiler="nvhpc" category="aux_clm"/>
<machine name="derecho" compiler="nvhpc" category="fates"/>
<machine name="derecho" compiler="nvhpc" category="remove-fatescoldsatphen-testmod"/>

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.

From your notes you'll remove this new temporary testlist when you are done, which is good.

<option name="wallclock">00:20:00</option>
</options>
</test>
<test name="SMS" grid="f45_f45_mg37" compset="I2000Clm60FatesSpRsGs" testmods="clm/FatesColdSatPhen">

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.

I do really like this more descriptive name.

</machines>
<options>
<option name="wallclock">00:30:00</option>
<option name="comment">Test with prescribed LAI and soil moisture with FatesSP mode</option>

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.

You could add something here that points out that this should use a FatesSp compset.

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.

Suggested change
<option name="comment">Test with prescribed LAI and soil moisture with FatesSP mode</option>
<option name="comment">Test with prescribed LAI and soil moisture with FatesSP mode (be sure to use a FatesSp compset along with the FatesColdSatPhen_prescribed testmod)</option>

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.

This might also go other places as well...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Why, though? Is the thinking that these testmods won't work without a FatesSp compset?

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.

OK, good question. This is really a testing philosphy type thing for me. Which might need a longer conversation.

But, as one point, I think our testing should be small deviations from standard ways that the model is run. And we should test and retest those standards ways as often as possible. So if you need FatesSp for a test you do it with the FatesSp compset, so that you are testing the standard compset alongside the test that's a deviation from the standard compset.

The other part is to ensure that as things change things don't work in the test -- but would've broken if the FatesSp compset was used. With this the two can evolve seperately, and that could cause problems as those change.

Now, an alturnative way to do this would be to add this to the include_user_mods:

../../../usermods_dirs/clm/fates_sp

as that will ensure they are aligned as the FatesSp compsets are done using user-mods right now. That may change in the future, but adding it explicitly would make it more visible.

Is that sufficient? Or would you like to do a quick chat on this? A longer term discussion on testing philosphy would also be good to do with the group, but that can be later.

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

Labels

code health improving internal code structure to make easier to maintain (sustainability) non-b4b Changes answers (incl. adding tests) test: aux_clm Pass aux_clm suite before merging test: fates Pass fates test suite before merging testing additions or changes to tests

Projects

Status: In progress - master

Development

Successfully merging this pull request may close these issues.

FatesColdSatPhen testmod doesn't actually set SP mode

2 participants