Skip to content

overflow respiration bug fixes #3491#4014

Open
wwieder wants to merge 6 commits into
ESCOMP:masterfrom
wwieder:mimics_5.2.028_working
Open

overflow respiration bug fixes #3491#4014
wwieder wants to merge 6 commits into
ESCOMP:masterfrom
wwieder:mimics_5.2.028_working

Conversation

@wwieder
Copy link
Copy Markdown
Contributor

@wwieder wwieder commented May 11, 2026

Description of changes

Fixes overflow respiration error described in #3491

Specific notes

Contributors other than yourself, if any:

CTSM issues resolved or otherwise addressed, if any:
Resolves #3491

If answers are expected to change, describe (delete this line otherwise):
Yes, reduces N limitation in MIMICS simulations

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

Testing planned or performed, if any:

  • Single point cases ran at East River and Cedar Creek LTER look improved

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?:

    • c, evaluated results in single point cases
  • 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:

    Documentation for MIMICS still needed, see Docs needed: MIMICS #3166

  • 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?:

    Documentation for MIMICS still needed, see Docs needed: MIMICS #3166

This was referenced May 11, 2026
Comment thread src/soilbiogeochem/SoilBiogeochemCarbonFluxType.F90 Outdated
Comment thread src/soilbiogeochem/SoilBiogeochemCompetitionMod.F90
@wwieder wwieder added bug something is working incorrectly science Enhancement to or bug impacting science labels May 11, 2026
@slevis-lmwg slevis-lmwg moved this from Todo to In Progress in LMWG: Sprint Planning Board May 11, 2026
@slevis-lmwg slevis-lmwg added the non-b4b Changes answers (incl. adding tests) label May 11, 2026
@slevis-lmwg slevis-lmwg marked this pull request as ready for review May 11, 2026 21:53
Comment thread src/soilbiogeochem/SoilBiogeochemCarbonFluxType.F90 Outdated
Copy link
Copy Markdown
Contributor Author

@wwieder wwieder left a comment

Choose a reason for hiding this comment

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

Minor change, do we need to request a review from someone else?

Comment thread src/soilbiogeochem/SoilBiogeochemCarbonFluxType.F90 Outdated
Comment thread src/soilbiogeochem/SoilBiogeochemCarbonFluxType.F90 Outdated
trim(decomp_cascade_con%decomp_pool_name_long(decomp_cascade_con%cascade_donor_pool(l)))
call hist_addfld1d (fname=fieldname, units='gC/m^2/s', &
avgflag='A', long_name=longname, &
ptr_col=data1dptr)
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.

Here and below: I decided to make them default active while we're testing. Can return them to inactive before merging if we prefer.

do fc = 1,num_bgc_soilc
c = filter_bgc_soilc(fc)
this%somhr_col(c) = this%somhr_col(c) + this%decomp_cascade_hr_col(c,k)
this%c_overflow_hr_sum(c) = this%c_overflow_hr_sum(c) + this%c_overflow_hr(c,k)
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.

Rather than adding a unique new loop to sum the c_overflow_hr_sum variable, I introduced partial sums in the existing loops. This line here is in the "is_soil" loop, next is the litter loop, then cwd, and last the is_microbe loop.

@wwieder based on what you said this morning, we may need to have this in one or some of those and not all, but I went for full coverage since I do not know.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think that's fine. I'm curious to see what the history files from MIMICS tests look like, once you are able to run them on derecho.

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 think that's fine. I'm curious to see what the history files from MIMICS tests look like, once you are able to run them on derecho.

@wwieder in the next post I have posted four mimics tests that you could look at in this directory:
/glade/work/slevis/git_people/wwieder/mimics_5.2.028_working/tests_0513-205326de/

@slevis-lmwg slevis-lmwg added the test: aux_clm Pass aux_clm suite before merging label May 13, 2026
@slevis-lmwg
Copy link
Copy Markdown
Contributor

slevis-lmwg commented May 13, 2026

  • aux_clm on derecho when the machine comes up: ./run_sys_tests -s aux_clm --skip-generate -c ctsm5.4.038
    Expected diffs:
FAIL ERP_D_P64x2_Ld3.f10_f10_mg37.I1850Clm60BgcCrop.derecho_gnu.clm-mimics BASELINE ctsm5.4.038: DIFF
FAIL SMS_D.1x1_brazil.I1850Clm60BgcCrop.derecho_gnu.clm-mimics_matrixcn BASELINE ctsm5.4.038: DIFF
FAIL SMS_Ld5_Mmpi-serial.1x1_brazil.IHistClm60Bgc.derecho_gnu.clm-mimics BASELINE ctsm5.4.038: DIFF
FAIL SMS_Ly5_Mmpi-serial.1x1_brazil.IHistClm50BgcQianRs.derecho_intel.clm-newton_krylov_spinup BASELINE ctsm5.4.038: DIFF

@slevis-lmwg
Copy link
Copy Markdown
Contributor

@wwieder do you want to pick another reviewer? Maybe Sam R. would be a good option?

@wwieder
Copy link
Copy Markdown
Contributor Author

wwieder commented May 13, 2026

@wwieder do you want to pick another reviewer? Maybe Sam R. would be a good option?

I think this makes sense. Should we see what derecho testing look like first, or just go ahead and request Sam's review?

@wwieder wwieder added this to the ctsm6.0.0 (code freeze) milestone May 13, 2026
@slevis-lmwg
Copy link
Copy Markdown
Contributor

@wwieder do you want to pick another reviewer? Maybe Sam R. would be a good option?

I think this makes sense. Should we see what derecho testing look like first, or just go ahead and request Sam's review?

I say let's wait, just in case derecho testing discovers problems that require code revisions.

@slevis-lmwg slevis-lmwg requested a review from samsrabin May 14, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug something is working incorrectly non-b4b Changes answers (incl. adding tests) science Enhancement to or bug impacting science test: aux_clm Pass aux_clm suite before merging

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

MIMICS overflow respiration not being handled correctly

2 participants