Skip to content

SIP86 Add soil mineral nitrogen pool and nitrogen cli option - #171

Merged
dlebauer merged 12 commits into
masterfrom
SIP86-Add-soil-mineral-nitrogen-state-variable
Oct 29, 2025
Merged

SIP86 Add soil mineral nitrogen pool and nitrogen cli option#171
dlebauer merged 12 commits into
masterfrom
SIP86-Add-soil-mineral-nitrogen-state-variable

Conversation

@Alomir

@Alomir Alomir commented Oct 17, 2025

Copy link
Copy Markdown
Collaborator

Fixes #86

This PR:

  • adds a new envi variable, minN, to track the soil mineral nitrogen pool
  • adds a new parameter, minNInit, to initial that pool
  • writes minN to sipnet.out in a new column labeled minN
  • adds a new run-time option, nitrogen-cycle, that controls whether minN is used/updated.
  • re-purposes the russell_2 smoke test as a new nitrogen-cycle smoke test to verify that the above works
  • updates outputs of the other smoke tests (I verified that the new column is the only change)
  • updates model-inputs.md and model-outputs.md

@Alomir
Alomir marked this pull request as ready for review October 20, 2025 16:38
@Alomir
Alomir requested review from dlebauer and infotroph October 20, 2025 16:38

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

Looks good, excited to begin the N cycle modeling journey! A few comments, no major changes required.


Note the following restrictions on these options:
- `soil-phenol` and `gdd` may not both be turned on
- `events` and `microbes` may not both be turned on

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.

Should we also prohibit nitrogen + microbes both on? I suspect it would be complicated and at this point unnecessary to support the combination.

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.

Yes, good call

Comment thread docs/user-guide/model-outputs.md Outdated
| 24 | $R$ | rtot | Total ecosystem respiration (ra + rh) | g C m$^{-2}$ |
| 25 | | evapotranspiration | ET (transpiration + immedEvap + evaporation + sublimation) for timestep | cm |
| 26 | | fluxestranspiration | Transpiration component only | cm |
| 27 | | minN | Soil mineral nitrogen | g N m$^{-2}$ |

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.

Suggested change
| 27 | | minN | Soil mineral nitrogen | g N m$^{-2}$ |
| 27 | $N_\textrm{min}$ | minN | Soil mineral nitrogen | g N m$^{-2}$ |

Comment thread src/sipnet/sipnet.c Outdated
initializeOneModelParam(modelParams, "microbePulseEff", &(params.microbePulseEff), ctx.microbes );
initializeOneModelParam(modelParams, "microbePulseEff", &(params.microbePulseEff), ctx.microbes);

// Nitrogen cycle params for the MAGIC project

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.

Is a reason to identify this as a MAGiC component? Seems restrictive.

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.

@dlebauer My goal is to give some attribution to these changes, since we don't have a publication to point to. Can you think of a better wording suggestion?

Comment thread src/sipnet/state.h Outdated
// [3] Zobitz (et al.?), date unknown, chapter 5 from unknown book
// [4] Zobitz (et al.?), date unknown, chapter 5 from unknown book
//
// Also of note, additions have been made to support the MAGIC

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.

We could use LeBauer et al (unpublished) "SIPNET 2: A lightweight, extensible model for coupled C–N–H₂O–GHG dynamics in managed ecosystems" as a reference for now.

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.

Ah, nice! Ignore previous comment :-)

Comment thread tests/smoke/russell_2/sipnet.param Outdated
fineRootExudation 0.01 0 0 1 0.001
coarseRootExudation 0.01 0 0 1 0.001
microbePulseEff 0.45 0 0 1 0.05
mineralNInit 1.0 0 0 0 0

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.

Not urgent or required for this pr.

But, didn't we change it so this file only requires the first value? Even if the legacy format is still supported, should we update tests to reflect the version without the unused cols?

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.

Probably, though I might prefer that as a separate ticket? Let me take a quick shpt, if it takes more than a few minutes I'll spawn it off.

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.

I'm not sure what a shpt is but definitely not urgent. Just caught my attention.

@dlebauer dlebauer self-assigned this Oct 29, 2025
@dlebauer
dlebauer merged commit 0099bee into master Oct 29, 2025
11 checks passed
@dlebauer
dlebauer deleted the SIP86-Add-soil-mineral-nitrogen-state-variable branch October 29, 2025 01:56
@Alomir
Alomir restored the SIP86-Add-soil-mineral-nitrogen-state-variable branch October 29, 2025 17:00
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.

Add soil mineral‑nitrogen state variable (N_min)

2 participants