Skip to content

Split maintResp into soilMaintResp and microbeMaintResp for clarity #144

@dlebauer

Description

@dlebauer

This is mostly to help avoid the confusion noted in this comment:

sipnet/src/sipnet/sipnet.c

Lines 1131 to 1132 in 1a7481b

// TBD We seem to be conflating maintResp and rSoil in the non-microbe
// case, need to dig in. With that said...

I think the issue is that 'maintResp' has two meanings because it operates at two levels of abstraction (with and w/o microbes). w/o microbes, rSoil = maintResp; with microbes, rSoil = maintResp + growthResp

If this is the case, the solution may simply be in naming, i.e. split fluxes.maintRespiration into distinct fluxes: fluxes.microbeMaintRespiration and fluxes.soilMaintRespiration for the different cases.

1. First - this is a tangent, but helps with clarity

de-conflate the base resp from the temp effect

sipnet/src/sipnet/sipnet.c

Lines 1165 to 1166 in 1a7481b

tempEffect = params.baseMicrobeResp * pow(params.microbeQ10, tsoil / 10);
fluxes.maintRespiration = envi.microbeC * moistEffect * tempEffect;

(since params.baseMicrobeResp is not part of the temp effect)
should be:

tempEffect = pow(params.microbeQ10, tsoil / 10);
fluxes.maintRespiration = envi.microbeC * params.baseMicrobeResp * moistEffect * tempEffect;

2. Then de-conflate the different modes of maintresp (soil vs microbe), split fluxes.maintRespiration into fluxes.microbeMaintRespiration and fluxes.soilMaintRespiration :

tempEffect = pow(params.microbeQ10, tsoil / 10);
fluxes.microbeMaintRespiration = envi.microbeC * params.baseMicrobeResp * moistEffect * tempEffect;

And

sipnet/src/sipnet/sipnet.c

Lines 1227 to 1234 in 1a7481b

envi.microbeC += (microbeEff * fluxes.microbeIngestion + fluxes.soilPulse -
fluxes.maintRespiration) *
climate->length;
// rSoil is maintenance resp + growth (microbe) resp
// :: from [4], eq (5.10) for microbe term
fluxes.rSoil =
fluxes.maintRespiration + (1 - microbeEff) * fluxes.microbeIngestion;

becomes

    envi.microbeC += (microbeEff * fluxes.microbeIngestion + fluxes.soilPulse -
                      fluxes.microbeMaintRespiration) *
                     climate->length;

    fluxes.rSoil =
                    fluxes.microbeMaintRespiration + (1 - microbeEff) * fluxes.microbeIngestion;

2.3 Analogously in the soil resp case

sipnet/src/sipnet/sipnet.c

Lines 1169 to 1170 in 1a7481b

tempEffect = params.baseSoilResp * pow(params.soilRespQ10, tsoil / 10);
fluxes.maintRespiration = envi.soil * moistEffect * tempEffect;

becomes

    tempEffect = pow(params.soilRespQ10, tsoil / 10);
    fluxes.soilMaintRespiration = envi.soil * params.baseSoilResp * moistEffect * tempEffect;

and finally,

fluxes.rSoil = fluxes.maintRespiration;

Becomes

fluxes.soilMaintRespiration = envi.soil * moistEffect * tempEffect;
// and 
fluxes.rSoil = fluxes.soilMaintRespiration;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions