Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions src/sipnet/sipnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1101,14 +1101,14 @@ void calcMicrobeFluxes(double tsoil, double water, double whc,

// :: from [4], part of eqs (5.9) and (5.10)
// Calculates mu_max * C_B * g(C_S), to be used to calculate both
// eqs (5.9) and (5.10) in soilDegradation()
// eqs (5.9) and (5.10) in updatePoolsForSoil()

// :: mu_max * g(C_S)
baseRate = params.maxIngestionRate * envi.soil /
(params.halfSatIngestion + envi.soil);

// Flux that microbes remove from soil (mg C g soil day)
// Some is ingested, rest used for growth in soilDegradation
// Some is ingested, rest used for growth in updatePoolsForSoil()
// :: above * C_B
fluxes.microbeIngestion = baseRate * envi.microbeC;

Expand Down Expand Up @@ -1432,10 +1432,12 @@ void updateMeanTrackers(void) {
*/
void updateMainPools() {
// Update the stocks, with fluxes adjusted for length of time step.
// Note: the soil C pool(s) (envi.soil, envi.fineRootC, envi.CoarseRootC)
// were updated in soilDegradation(); also, envi.litter when that is in use.
// And yes, I would love to break that out to maintain more rigor in this
// flow process.
// Notes:
// - GPP shows up twice (direct + via NPP --> woodCreation), but
// the math works out to:
// envi.plantWoodC += NPP_allocation_to_wood − woodLitter.
// - The soil C pool(s) (envi.soil, envi.fineRootC, envi.CoarseRootC)
// are updated in updatePoolsForSoil().

// :: from [1], eq (A1), where:
// GPP = fluxes.photosynthesis
Expand Down Expand Up @@ -1554,8 +1556,7 @@ void updateState(void) {
///////////////////////
// 1. Calculate Fluxes

// The main source of flux calculations handling, most of the biogeochem
// modeled fluxes are here. ("most" due to soilDegradation below)
// All non-event fluxes
calculateFluxes();

// All event handling, which is modeled as fluxes
Expand Down