Subversion Repositories public iLand

Rev

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

Rev 522 Rev 523
Line 56... Line 56...
56
56
57
Snag::Snag()
57
Snag::Snag()
58
{
58
{
59
    mRU = 0;
59
    mRU = 0;
60
    CNPool::setCFraction(biomassCFraction);
60
    CNPool::setCFraction(biomassCFraction);
61
    Snag::setupThresholds(mDBHLower, mDBHHigher);
-
 
-
 
61
    Snag::setupThresholds(20., 60.);
62
}
62
}
63
63
64
void Snag::setup( const ResourceUnit *ru)
64
void Snag::setup( const ResourceUnit *ru)
65
{
65
{
66
    mRU = ru;
66
    mRU = ru;
Line 84... Line 84...
84
{
84
{
85
    // list columns
85
    // list columns
86
    // for three pools
86
    // for three pools
87
    QList<QVariant> list;
87
    QList<QVariant> list;
88
88
89
    list << mTotalSnagCarbon;
-
 
-
 
89
    // totals
-
 
90
    list << mTotalSnagCarbon << mTotalIn.C << mTotalToAtm.C << mSWDtoSoil.C << mSWDtoSoil.N;
90
    // fluxes to labile soil pool and to refractory soil pool
91
    // fluxes to labile soil pool and to refractory soil pool
91
    list << mLabileFlux.C << mLabileFlux.N << mRefractoryFlux.C << mRefractoryFlux.N << mSWDtoSoil.C << mSWDtoSoil.N;
92
    list << mLabileFlux.C << mLabileFlux.N << mRefractoryFlux.C << mRefractoryFlux.N << mSWDtoSoil.C << mSWDtoSoil.N;
92
93
93
    for (int i=0;i<3;i++) {
94
    for (int i=0;i<3;i++) {
94
        // pools "swdx_c", "swdx_n", "swdx_count", "swdx_tsd", "toswdx_c", "toswdx_n"
95
        // pools "swdx_c", "swdx_n", "swdx_count", "swdx_tsd", "toswdx_c", "toswdx_n"
Line 125... Line 126...
125
    double rel_wc;
126
    double rel_wc;
126
    double ft, fw;
127
    double ft, fw;
127
    double f_sum = 0.;
128
    double f_sum = 0.;
128
    for (const ClimateDay *day=mRU->climate()->begin(); day!=mRU->climate()->end(); ++day)
129
    for (const ClimateDay *day=mRU->climate()->begin(); day!=mRU->climate()->end(); ++day)
129
    {
130
    {
130
        rel_wc = mRU->waterCycle()->relContent(day->day); // relative water content (0..1) of the day
-
 
-
 
131
        rel_wc = mRU->waterCycle()->relContent(day->day)*100.; // relative water content in per cent of the day
131
        ft = exp(308.56*(1./56.02-1./((273.+day->temperature)-227.13)));  // empirical variable Q10 model of Lloyd and Taylor (1994), see also Adair et al. (2008)
132
        ft = exp(308.56*(1./56.02-1./((273.+day->temperature)-227.13)));  // empirical variable Q10 model of Lloyd and Taylor (1994), see also Adair et al. (2008)
132
        fw = pow(1.-exp(-0.2*rel_wc),5.); //  #  see Standcarb for the 'stable soil' pool
133
        fw = pow(1.-exp(-0.2*rel_wc),5.); //  #  see Standcarb for the 'stable soil' pool
133
        f_sum += ft*fw;
134
        f_sum += ft*fw;
134
    }
135
    }
135
    // the climate factor is defined as the arithmentic annual mean value
136
    // the climate factor is defined as the arithmentic annual mean value
Line 145... Line 146...
145
    if (isEmpty()) // nothing to do
146
    if (isEmpty()) // nothing to do
146
        return;
147
        return;
147
148
148
    // process branches: every year one of the five baskets is emptied and transfered to the refractory soil pool
149
    // process branches: every year one of the five baskets is emptied and transfered to the refractory soil pool
149
    mRefractoryFlux+=mBranches[mBranchCounter];
150
    mRefractoryFlux+=mBranches[mBranchCounter];
-
 
151
    mSWDtoSoil += mBranches[mBranchCounter];
150
    mBranches[mBranchCounter].clear();
152
    mBranches[mBranchCounter].clear();
151
    mBranchCounter= (mBranchCounter+1) % 5; // increase index, roll over to 0.
153
    mBranchCounter= (mBranchCounter+1) % 5; // increase index, roll over to 0.
152
154
153
    // process standing snags.
155
    // process standing snags.
154
    // the input of the current year is in the mToSWD-Pools
156
    // the input of the current year is in the mToSWD-Pools
Line 165... Line 167...
165
        }
167
        }
166
168
167
        if (mSWD[i].C > 0) {
169
        if (mSWD[i].C > 0) {
168
            // reduce the Carbon (note: the N stays, thus the CN ratio changes)
170
            // reduce the Carbon (note: the N stays, thus the CN ratio changes)
169
            // use the decay rate that is derived as a weighted average of all standing woody debris
171
            // use the decay rate that is derived as a weighted average of all standing woody debris
170
            mSWD[i].C *= exp(-mKSW[i] *climate_factor_re * 1. ); // 1: timestep
-
 
-
 
172
            double survive_rate = exp(-mKSW[i] *climate_factor_re * 1. ); // 1: timestep
-
 
173
            mTotalToAtm.C += mSWD[i].C * (1. - survive_rate);
-
 
174
            mSWD[i].C *= survive_rate;
171
175
172
            // transition to downed woody debris
176
            // transition to downed woody debris
173
            // update: use negative exponential decay, species parameter: half-life
177
            // update: use negative exponential decay, species parameter: half-life
174
            // modified for the climatic effect on decomposition, i.e. if decomp is slower, snags stand longer and vice versa
178
            // modified for the climatic effect on decomposition, i.e. if decomp is slower, snags stand longer and vice versa
175
            // this is loosely oriented on Standcarb2 (http://andrewsforest.oregonstate.edu/pubs/webdocs/models/standcarb2.htm),
179
            // this is loosely oriented on Standcarb2 (http://andrewsforest.oregonstate.edu/pubs/webdocs/models/standcarb2.htm),
Line 185... Line 189...
185
189
186
            // higher decay rate for the class with smallest diameters
190
            // higher decay rate for the class with smallest diameters
187
            if (i==0)
191
            if (i==0)
188
                rate*=2.;
192
                rate*=2.;
189
193
190
            double transfer = exp(rate);
-
 
-
 
194
            double transfer = 1. - exp(rate);
191
195
192
            // calculate flow to soil pool...
196
            // calculate flow to soil pool...
193
            mSWDtoSoil += mSWD[i] * transfer;
197
            mSWDtoSoil += mSWD[i] * transfer;
194
            mRefractoryFlux += mSWD[i] * transfer;
198
            mRefractoryFlux += mSWD[i] * transfer;
195
            mSWD[i] *= (1.-transfer); // reduce pool
199
            mSWD[i] *= (1.-transfer); // reduce pool
196
            // calculate the stem number of remaining snags
200
            // calculate the stem number of remaining snags
197
            mNumberOfSnags[i] = mNumberOfSnags[i] * (1. - transfer);
201
            mNumberOfSnags[i] = mNumberOfSnags[i] * (1. - transfer);
-
 
202
-
 
203
            mTimeSinceDeath[i] += 1.;
198
            // if stems<0.5, empty the whole cohort into DWD, i.e. release the last bit of C and N and clear the stats
204
            // if stems<0.5, empty the whole cohort into DWD, i.e. release the last bit of C and N and clear the stats
199
            // also, if the Carbon of an average snag is less than 10% of the original average tree
205
            // also, if the Carbon of an average snag is less than 10% of the original average tree
200
            // (derived from allometries for the three diameter classes), the whole cohort is emptied out to DWD
206
            // (derived from allometries for the three diameter classes), the whole cohort is emptied out to DWD
201
            if (mNumberOfSnags[i] < 0.5 || mSWD[i].C / mNumberOfSnags[i] < mCarbonThreshold[i]) {
207
            if (mNumberOfSnags[i] < 0.5 || mSWD[i].C / mNumberOfSnags[i] < mCarbonThreshold[i]) {
202
                // clear the pool: add the rest to the soil, clear statistics of the pool
208
                // clear the pool: add the rest to the soil, clear statistics of the pool
Line 243... Line 249...
243
    // branches are equally distributed over five years:
249
    // branches are equally distributed over five years:
244
    double biomass_branch = tree->biomassBranch() * 0.2;
250
    double biomass_branch = tree->biomassBranch() * 0.2;
245
    for (int i=0;i<5; i++)
251
    for (int i=0;i<5; i++)
246
        mBranches[i].addBiomass(biomass_branch, soil_params.cnWood);
252
        mBranches[i].addBiomass(biomass_branch, soil_params.cnWood);
247
253
-
 
254
    // just for book-keeping: keep track of all inputs into branches / swd
-
 
255
    mTotalIn.addBiomass(tree->biomassBranch() + tree->biomassStem(), soil_params.cnWood);
248
    // stem biomass is transferred to the standing woody debris pool (SWD), increase stem number of pool
256
    // stem biomass is transferred to the standing woody debris pool (SWD), increase stem number of pool
249
    int pi = poolIndex(tree->dbh()); // get right transfer pool
257
    int pi = poolIndex(tree->dbh()); // get right transfer pool
250
    CNPool &swd = mToSWD[pi];
-
 
251
    swd.addBiomass(tree->biomassStem(), soil_params.cnWood);
-
 
252
258
253
    // update statistics - stemnumber-weighted averages
259
    // update statistics - stemnumber-weighted averages
254
    // note: here the calculations are repeated for every died trees (i.e. consecutive weighting ... but delivers the same results)
260
    // note: here the calculations are repeated for every died trees (i.e. consecutive weighting ... but delivers the same results)
255
    double p_old = mNumberOfSnags[pi] / (mNumberOfSnags[pi] + 1); // weighting factor for state vars (based on stem numbers)
261
    double p_old = mNumberOfSnags[pi] / (mNumberOfSnags[pi] + 1); // weighting factor for state vars (based on stem numbers)
256
    double p_new = 1. / (mNumberOfSnags[pi] + 1); // weighting factor for added tree (p_old + p_new = 1).
262
    double p_new = 1. / (mNumberOfSnags[pi] + 1); // weighting factor for added tree (p_old + p_new = 1).
Line 266... Line 272...
266
        throw IException("Snag::addMortality: tree without stem biomass!!");
272
        throw IException("Snag::addMortality: tree without stem biomass!!");
267
    p_old = mToSWD[pi].C / (mToSWD[pi].C + tree->biomassStem()* biomassCFraction);
273
    p_old = mToSWD[pi].C / (mToSWD[pi].C + tree->biomassStem()* biomassCFraction);
268
    p_new =tree->biomassStem()* biomassCFraction / (mToSWD[pi].C + tree->biomassStem()* biomassCFraction);
274
    p_new =tree->biomassStem()* biomassCFraction / (mToSWD[pi].C + tree->biomassStem()* biomassCFraction);
269
    mCurrentKSW[pi] = mCurrentKSW[pi]*p_old + soil_params.ksw * p_new;
275
    mCurrentKSW[pi] = mCurrentKSW[pi]*p_old + soil_params.ksw * p_new;
270
    mNumberOfSnags[pi]++;
276
    mNumberOfSnags[pi]++;
-
 
277
-
 
278
    // finally add the biomass
-
 
279
    CNPool &swd = mToSWD[pi];
-
 
280
    swd.addBiomass(tree->biomassStem(), soil_params.cnWood);
271
}
281
}
272
282
273
/// add residual biomass of 'tree' after harvesting.
283
/// add residual biomass of 'tree' after harvesting.
274
/// remove_{stem, branch, foliage}_fraction: percentage of biomass compartment that is *removed* by the harvest operation (i.e.: not to stay in the system)
284
/// remove_{stem, branch, foliage}_fraction: percentage of biomass compartment that is *removed* by the harvest operation (i.e.: not to stay in the system)
275
/// the harvested biomass is collected.
285
/// the harvested biomass is collected.
Line 283... Line 293...
283
    mLabileFlux.addBiomass(tree->biomassFineRoot(), soil_params.cnFineroot);
293
    mLabileFlux.addBiomass(tree->biomassFineRoot(), soil_params.cnFineroot);
284
    mRefractoryFlux.addBiomass(tree->biomassCoarseRoot(), soil_params.cnWood);
294
    mRefractoryFlux.addBiomass(tree->biomassCoarseRoot(), soil_params.cnWood);
285
295
286
    // residual branches are equally distributed over five years:
296
    // residual branches are equally distributed over five years:
287
    for (int i=0;i<5; i++)
297
    for (int i=0;i<5; i++)
288
        mBranches[i].addBiomass(tree->biomassBranch() * remove_branch_fraction * 0.2, soil_params.cnWood);
-
 
-
 
298
        mBranches[i].addBiomass(tree->biomassBranch() * (1. - remove_branch_fraction) * 0.2, soil_params.cnWood);
289
299
-
 
300
    mTotalToExtern.addBiomass(tree->biomassBranch()*remove_branch_fraction + tree->biomassStem()*remove_stem_fraction, soil_params.cnWood);
290
    // stem biomass is transferred to the standing woody debris pool (SWD), increase stem number of pool
301
    // stem biomass is transferred to the standing woody debris pool (SWD), increase stem number of pool
291
    // TODO: what to do with harvest and stems??? I think harvested stems (that are not removed) should
302
    // TODO: what to do with harvest and stems??? I think harvested stems (that are not removed) should
292
    // go directly to the DWD??
303
    // go directly to the DWD??
293
    CNPool &swd = mToSWD[poolIndex(tree->dbh())]; // get right transfer pool
304
    CNPool &swd = mToSWD[poolIndex(tree->dbh())]; // get right transfer pool
294
    swd.addBiomass(tree->biomassStem() * remove_stem_fraction, soil_params.cnWood);
305
    swd.addBiomass(tree->biomassStem() * remove_stem_fraction, soil_params.cnWood);