Subversion Repositories public iLand

Rev

Rev 534 | Rev 541 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 534 Rev 540
Line 115... Line 115...
115
        // pools "swdx_c", "swdx_n", "swdx_count", "swdx_tsd", "toswdx_c", "toswdx_n"
115
        // pools "swdx_c", "swdx_n", "swdx_count", "swdx_tsd", "toswdx_c", "toswdx_n"
116
        list << mSWD[i].C << mSWD[i].N << mNumberOfSnags[i] << mTimeSinceDeath[i] << mToSWD[i].C << mToSWD[i].N;
116
        list << mSWD[i].C << mSWD[i].N << mNumberOfSnags[i] << mTimeSinceDeath[i] << mToSWD[i].C << mToSWD[i].N;
117
        list << mAvgDbh[i] << mAvgHeight[i] << mAvgVolume[i];
117
        list << mAvgDbh[i] << mAvgHeight[i] << mAvgVolume[i];
118
    }
118
    }
119
119
120
    // branch pools (5 yrs)
120
    // branch/coarse wood pools (5 yrs)
-
 
121
    for (int i=0;i<5;i++) {
-
 
122
        list << mOtherWood[i].C << mOtherWood[i].N;
-
 
123
    }
121
    list << mBranches[mBranchCounter].C << mBranches[mBranchCounter].N
124
//    list << mOtherWood[mBranchCounter].C << mOtherWood[mBranchCounter].N
122
            << mBranches[(mBranchCounter+1)%5].C << mBranches[(mBranchCounter+1)%5].N
125
//            << mOtherWood[(mBranchCounter+1)%5].C << mOtherWood[(mBranchCounter+1)%5].N
123
            << mBranches[(mBranchCounter+2)%5].C << mBranches[(mBranchCounter+2)%5].N
126
//            << mOtherWood[(mBranchCounter+2)%5].C << mOtherWood[(mBranchCounter+2)%5].N
124
            << mBranches[(mBranchCounter+3)%5].C << mBranches[(mBranchCounter+3)%5].N
127
//            << mOtherWood[(mBranchCounter+3)%5].C << mOtherWood[(mBranchCounter+3)%5].N
125
            << mBranches[(mBranchCounter+4)%5].C << mBranches[(mBranchCounter+4)%5].N;
128
//            << mOtherWood[(mBranchCounter+4)%5].C << mOtherWood[(mBranchCounter+4)%5].N;
126
    return list;
129
    return list;
127
}
130
}
128
131
129
void Snag::newYear()
132
void Snag::newYear()
130
{
133
{
Line 142... Line 145...
142
145
143
/// calculate the dynamic climate modifier for decomposition 're'
146
/// calculate the dynamic climate modifier for decomposition 're'
144
/// calculation is done on the level of ResourceUnit because the water content per day is needed.
147
/// calculation is done on the level of ResourceUnit because the water content per day is needed.
145
double Snag::calculateClimateFactors()
148
double Snag::calculateClimateFactors()
146
{
149
{
147
    double rel_wc;
150
    double psi_kpa;
148
    double ft, fw;
151
    double ft, fw;
-
 
152
    const double min_kpa = -1500.;
149
    double f_sum = 0.;
153
    double f_sum = 0.;
150
    for (const ClimateDay *day=mRU->climate()->begin(); day!=mRU->climate()->end(); ++day)
154
    for (const ClimateDay *day=mRU->climate()->begin(); day!=mRU->climate()->end(); ++day)
151
    {
155
    {
152
        rel_wc = mRU->waterCycle()->relContent(day->day)*100.; // relative water content in per cent of the day
156
        psi_kpa = mRU->waterCycle()->psi_kPa(day->day);
-
 
157
153
        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)
158
        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)
154
        fw = pow(1.-exp(-0.2*rel_wc),5.); //  #  see Standcarb for the 'stable soil' pool
159
        fw = 1. - limit(psi_kpa / min_kpa, 0., 1.);
-
 
160
155
        f_sum += ft*fw;
161
        f_sum += ft*fw;
156
    }
162
    }
157
    // the climate factor is defined as the arithmentic annual mean value
163
    // the climate factor is defined as the arithmentic annual mean value
158
    mClimateFactor = f_sum / double(mRU->climate()->daysOfYear());
164
    mClimateFactor = f_sum / double(mRU->climate()->daysOfYear());
159
    return mClimateFactor;
165
    return mClimateFactor;
Line 167... Line 173...
167
    const double climate_factor_re = calculateClimateFactors(); // calculate anyway, because also the soil module needs it (and currently one can have Snag and Soil only as a couple)
173
    const double climate_factor_re = calculateClimateFactors(); // calculate anyway, because also the soil module needs it (and currently one can have Snag and Soil only as a couple)
168
    if (isEmpty()) // nothing to do
174
    if (isEmpty()) // nothing to do
169
        return;
175
        return;
170
176
171
    // process branches: every year one of the five baskets is emptied and transfered to the refractory soil pool
177
    // process branches: every year one of the five baskets is emptied and transfered to the refractory soil pool
172
    mRefractoryFlux+=mBranches[mBranchCounter];
178
    mRefractoryFlux+=mOtherWood[mBranchCounter];
173
    mSWDtoSoil += mBranches[mBranchCounter];
-
 
-
 
179
174
    mBranches[mBranchCounter].clear();
180
    mOtherWood[mBranchCounter].clear();
175
    mBranchCounter= (mBranchCounter+1) % 5; // increase index, roll over to 0.
181
    mBranchCounter= (mBranchCounter+1) % 5; // increase index, roll over to 0.
-
 
182
    // decay of branches/coarse roots
-
 
183
    for (int i=0;i<5;i++) {
-
 
184
        if (mOtherWood[i].C>0.) {
-
 
185
            double survive_rate = exp(- climate_factor_re * mOtherWood[i].parameter() ); // parameter: the "kyr" value...
-
 
186
            mOtherWood[i].C *= survive_rate;
-
 
187
        }
-
 
188
    }
176
189
177
    // process standing snags.
190
    // process standing snags.
178
    // the input of the current year is in the mToSWD-Pools
191
    // the input of the current year is in the mToSWD-Pools
179
-
 
180
-
 
181
    for (int i=0;i<3;i++) {
192
    for (int i=0;i<3;i++) {
182
193
183
        // update the swd-pool with this years' input
194
        // update the swd-pool with this years' input
184
        if (!mToSWD[i].isEmpty()) {
195
        if (!mToSWD[i].isEmpty()) {
185
            // update decay rate (apply average yearly input to the state parameters)
196
            // update decay rate (apply average yearly input to the state parameters)
Line 244... Line 255...
244
255
245
    }
256
    }
246
    // total carbon in the snag-container on the RU *after* processing is the content of the
257
    // total carbon in the snag-container on the RU *after* processing is the content of the
247
    // standing woody debris pools + the branches
258
    // standing woody debris pools + the branches
248
    mTotalSnagCarbon = mSWD[0].C + mSWD[1].C + mSWD[2].C +
259
    mTotalSnagCarbon = mSWD[0].C + mSWD[1].C + mSWD[2].C +
249
                       mBranches[0].C + mBranches[1].C + mBranches[2].C + mBranches[3].C + mBranches[4].C;
260
                       mOtherWood[0].C + mOtherWood[1].C + mOtherWood[2].C + mOtherWood[3].C + mOtherWood[4].C;
250
}
261
}
251
262
252
/// foliage and fineroot litter is transferred during tree growth.
263
/// foliage and fineroot litter is transferred during tree growth.
253
void Snag::addTurnoverLitter(const Tree *tree, const double litter_foliage, const double litter_fineroot)
264
void Snag::addTurnoverLitter(const Tree *tree, const double litter_foliage, const double litter_fineroot)
254
{
265
{
Line 260... Line 271...
260
void Snag::addMortality(const Tree *tree)
271
void Snag::addMortality(const Tree *tree)
261
{
272
{
262
    const Species *species = tree->species();
273
    const Species *species = tree->species();
263
274
264
    // immediate flows: 100% of foliage, 100% of fine roots: they go to the labile pool
275
    // immediate flows: 100% of foliage, 100% of fine roots: they go to the labile pool
265
    // 100% of coarse root biomass: that goes to the refractory pool
-
 
266
    mLabileFlux.addBiomass(tree->biomassFoliage(), species->cnFoliage(), tree->species()->snagKyl());
276
    mLabileFlux.addBiomass(tree->biomassFoliage(), species->cnFoliage(), tree->species()->snagKyl());
267
    mLabileFlux.addBiomass(tree->biomassFineRoot(), species->cnFineroot(), tree->species()->snagKyl());
277
    mLabileFlux.addBiomass(tree->biomassFineRoot(), species->cnFineroot(), tree->species()->snagKyl());
268
    mRefractoryFlux.addBiomass(tree->biomassCoarseRoot(), species->cnWood(), tree->species()->snagKyr());
-
 
269
278
270
    // branches are equally distributed over five years:
279
    // branches and coarse roots are equally distributed over five years:
271
    double biomass_branch = tree->biomassBranch() * 0.2;
280
    double biomass_rest = (tree->biomassBranch()+tree->biomassCoarseRoot()) * 0.2;
272
    for (int i=0;i<5; i++)
281
    for (int i=0;i<5; i++)
273
        mBranches[i].addBiomass(biomass_branch, species->cnWood(), tree->species()->snagKyr());
282
        mOtherWood[i].addBiomass(biomass_rest, species->cnWood(), tree->species()->snagKyr());
274
283
275
    // just for book-keeping: keep track of all inputs into branches / swd
284
    // just for book-keeping: keep track of all inputs into branches / roots / swd
276
    mTotalIn.addBiomass(tree->biomassBranch() + tree->biomassStem(), species->cnWood());
285
    mTotalIn.addBiomass(tree->biomassBranch() + tree->biomassCoarseRoot() + tree->biomassStem(), species->cnWood());
277
    // stem biomass is transferred to the standing woody debris pool (SWD), increase stem number of pool
286
    // stem biomass is transferred to the standing woody debris pool (SWD), increase stem number of pool
278
    int pi = poolIndex(tree->dbh()); // get right transfer pool
287
    int pi = poolIndex(tree->dbh()); // get right transfer pool
279
288
280
    // update statistics - stemnumber-weighted averages
289
    // update statistics - stemnumber-weighted averages
281
    // note: here the calculations are repeated for every died trees (i.e. consecutive weighting ... but delivers the same results)
290
    // note: here the calculations are repeated for every died trees (i.e. consecutive weighting ... but delivers the same results)
Line 307... Line 316...
307
void Snag::addHarvest(const Tree* tree, const double remove_stem_fraction, const double remove_branch_fraction, const double remove_foliage_fraction )
316
void Snag::addHarvest(const Tree* tree, const double remove_stem_fraction, const double remove_branch_fraction, const double remove_foliage_fraction )
308
{
317
{
309
    const Species *species = tree->species();
318
    const Species *species = tree->species();
310
319
311
    // immediate flows: 100% of residual foliage, 100% of fine roots: they go to the labile pool
320
    // immediate flows: 100% of residual foliage, 100% of fine roots: they go to the labile pool
312
    // 100% of coarse root biomass: that goes to the refractory pool
-
 
313
    mLabileFlux.addBiomass(tree->biomassFoliage() * (1. - remove_foliage_fraction), species->cnFoliage(), tree->species()->snagKyl());
321
    mLabileFlux.addBiomass(tree->biomassFoliage() * (1. - remove_foliage_fraction), species->cnFoliage(), tree->species()->snagKyl());
314
    mLabileFlux.addBiomass(tree->biomassFineRoot(), species->cnFineroot(), tree->species()->snagKyl());
322
    mLabileFlux.addBiomass(tree->biomassFineRoot(), species->cnFineroot(), tree->species()->snagKyl());
315
    mRefractoryFlux.addBiomass(tree->biomassCoarseRoot(), species->cnWood(), tree->species()->snagKyr());
-
 
-
 
323
316
    // for branches, add all biomass that remains in the forest to the soil
324
    // for branches, add all biomass that remains in the forest to the soil
317
    mRefractoryFlux.addBiomass(tree->biomassBranch()*(1.-remove_branch_fraction), species->cnWood(), tree->species()->snagKyr());
325
    mRefractoryFlux.addBiomass(tree->biomassBranch()*(1.-remove_branch_fraction), species->cnWood(), tree->species()->snagKyr());
318
    // the same treatment for stem residuals
326
    // the same treatment for stem residuals
319
    mRefractoryFlux.addBiomass(tree->biomassStem() * remove_stem_fraction, species->cnWood(), tree->species()->snagKyr());
327
    mRefractoryFlux.addBiomass(tree->biomassStem() * remove_stem_fraction, species->cnWood(), tree->species()->snagKyr());
-
 
328
-
 
329
    // split the corase wood biomass into parts (slower decay)
-
 
330
    double biomass_rest = (tree->biomassCoarseRoot()) * 0.2;
-
 
331
    for (int i=0;i<5; i++)
-
 
332
        mOtherWood[i].addBiomass(biomass_rest, species->cnWood(), tree->species()->snagKyr());
-
 
333
320
334
321
    // for book-keeping...
335
    // for book-keeping...
322
    mTotalToExtern.addBiomass(tree->biomassFoliage()*remove_foliage_fraction +
336
    mTotalToExtern.addBiomass(tree->biomassFoliage()*remove_foliage_fraction +
323
                              tree->biomassBranch()*remove_branch_fraction +
337
                              tree->biomassBranch()*remove_branch_fraction +
324
                              tree->biomassStem()*remove_stem_fraction, species->cnWood());
338
                              tree->biomassStem()*remove_stem_fraction, species->cnWood());