Skip to content

SIP287 Add C Saturation#301

Draft
mswilburn wants to merge 6 commits into
masterfrom
SIP287-Implement-Carbon-Saturation
Draft

SIP287 Add C Saturation#301
mswilburn wants to merge 6 commits into
masterfrom
SIP287-Implement-Carbon-Saturation

Conversation

@mswilburn
Copy link
Copy Markdown
Contributor

@mswilburn mswilburn commented Mar 27, 2026

Summary

Implementing soil carbon saturation by creating a flag, adding a new parameter, modifying fluxes into soil organic carbon pool, adding new flux from soil organic carbon pool to litter pool, and updating documentation. Motivation for this change includes evaluating model soil carbon dynamics with and without an explicit maximum limit for long-term storage.

How was this change tested?

List steps taken to test this change, with appropriate outputs if applicable

If changes are needed for any sipnet.out files in the test/smoke subdirectories, then include output from
tools/smoke_check.py by running the commands below and pasting the output at the end of this PR. Note that
this must be run BEFORE submitting changes to any sipnet.out files.

make smoke
python tools/smoke_check.py run verbose <list tests/smoke subdirectories with changed outputs>

Run python tools/smoke_check.py help for more info.

Related issues

Checklist

  • Related issues are listed above. PRs without an approved, related issue may not get reviewed.
  • PR title has the issue number in it ("[#] <concise description of proposed change>")
  • Tests added/updated for new features (if applicable)
  • Documentation updated (if applicable)
  • docs/CHANGELOG.md updated with noteworthy changes
  • Code formatted with clang-format (run git clang-format if needed)

Note: See CONTRIBUTING.md for additional guidance. This repository uses automated formatting checks; if the pre-commit hook blocks your commit, run git clang-format to format staged changes.

Copy link
Copy Markdown
Collaborator

@Alomir Alomir left a comment

Choose a reason for hiding this comment

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

New flag option looks good! (Other than the one issue in restart.c)

Comment thread src/sipnet/restart.c Outdated
Comment on lines 164 to 165
state->flagsPF[8] = (StateField){"flags.carbonSaturation", FT_INT, &modelFlags.carbonSaturation, 0};
state->flagsPF[10] = (StateField){"flags.invalid", FT_INVALID, NULL, FIELD_INVALID};
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think these should be flagsPF[10] for carbonSat and flagsPF[11] for invalid

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.

Ah, thanks for catching that. Fixed!

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

Successfully merging this pull request may close these issues.

Implement Carbon Saturation in SIPNET

2 participants