Subversion Repositories public iLand

Rev

Rev 475 | Rev 477 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 475 Rev 476
Line 31... Line 31...
31
31
32
32
33
Snag::Snag()
33
Snag::Snag()
34
{
34
{
35
    soilparams.pDWDformula.setExpression("1-1/(1+exp(-6.78+0.262*tsd))");
35
    soilparams.pDWDformula.setExpression("1-1/(1+exp(-6.78+0.262*tsd))");
-
 
36
    CNPool::setCFraction(biomassCFraction);
36
}
37
}
37
38
38
void Snag::setup()
39
void Snag::setup()
39
{
40
{
40
    // branches
41
    // branches
Line 77... Line 78...
77
    for (int i=0;i<3;i++) {
78
    for (int i=0;i<3;i++) {
78
        mToSWD[i].clear(); // clear transfer pools to standing-woody-debris
79
        mToSWD[i].clear(); // clear transfer pools to standing-woody-debris
79
    }
80
    }
80
    mLabileFlux.clear();
81
    mLabileFlux.clear();
81
    mRefractoryFlux.clear();
82
    mRefractoryFlux.clear();
-
 
83
    mTotalToAtm.clear();
-
 
84
    mTotalToExtern.clear();
-
 
85
    mTotalIn.clear();
-
 
86
    mTotalOut.clear();
82
}
87
}
83
88
84
// do the yearly calculation
89
// do the yearly calculation
85
// see http://iland.boku.ac.at/snag+dynamics
90
// see http://iland.boku.ac.at/snag+dynamics
86
void Snag::processYear()
91
void Snag::processYear()
Line 107... Line 112...
107
        else
112
        else
108
            tsd = 0.;
113
            tsd = 0.;
109
114
110
        // update the swd-pool: move content to the SWD pool
115
        // update the swd-pool: move content to the SWD pool
111
        mSWD[i] += mToSWD[i];
116
        mSWD[i] += mToSWD[i];
112
        mToSWD[i].clear();
-
 
113
117
114
        mTimeSinceDeath[i] = tsd;
118
        mTimeSinceDeath[i] = tsd;
115
119
116
        if (mSWD[i].C>0.) {
120
        if (mSWD[i].C>0.) {
117
            // calculate decay of SWD.
121
            // calculate decay of SWD.