Subversion Repositories public iLand

Rev

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

Rev 605 Rev 607
Line 379... Line 379...
379
// add flow from regeneration layer (dead trees) to soil
379
// add flow from regeneration layer (dead trees) to soil
380
void Snag::addToSoil(const Species *species, const CNPair &woody_pool, const CNPair &litter_pool)
380
void Snag::addToSoil(const Species *species, const CNPair &woody_pool, const CNPair &litter_pool)
381
{
381
{
382
    mLabileFlux.add(litter_pool, species->snagKyl());
382
    mLabileFlux.add(litter_pool, species->snagKyl());
383
    mRefractoryFlux.add(woody_pool, species->snagKyr());
383
    mRefractoryFlux.add(woody_pool, species->snagKyr());
-
 
384
}
-
 
385
-
 
386
/// disturbance function: remove the fraction of 'factor' of biomass from the SWD pools; 0: remove nothing, 1: remove all
-
 
387
/// biomass removed by this function goes to the atmosphere
-
 
388
void Snag::removeCarbon(const double factor)
-
 
389
{
-
 
390
    // reduce pools of currently standing dead wood and also of pools that are added
-
 
391
    // during (previous) management operations of the current year
-
 
392
    for (int i=0;i<3;i++) {
-
 
393
        mTotalToAtm += (mSWD[i] + mToSWD[i]) * factor;
-
 
394
        mSWD[i] *= (1. - factor);
-
 
395
        mToSWD[i] *= (1. - factor);
-
 
396
    }
-
 
397
-
 
398
    for (int i=0;i<5;i++) {
-
 
399
        mTotalToAtm += mOtherWood[i]*factor;
-
 
400
        mOtherWood[i] *= (1. - factor);
-
 
401
    }
-
 
402
}
-
 
403
-
 
404
-
 
405
/// cut down swd (and branches) and move to soil pools
-
 
406
/// @param factor 0: cut 0%, 1: cut and slash 100% of the wood
-
 
407
void Snag::management(const double factor)
-
 
408
{
-
 
409
    if (factor<0. || factor>1.)
-
 
410
        throw IException(QString("Invalid factor in Snag::management: '%1'").arg(factor));
-
 
411
    // swd pools
-
 
412
    for (int i=0;i<3;i++) {
-
 
413
        mSWDtoSoil += mSWD[i] * factor;
-
 
414
        mSWD[i] *= (1. - factor);
-
 
415
        mSWDtoSoil += mToSWD[i] * factor;
-
 
416
        mToSWD[i] *= (1. - factor);
-
 
417
    }
-
 
418
    // what to do with the branches: now move also all wood to soil (note: this is note
-
 
419
    // very good w.r.t the coarse roots...
-
 
420
    for (int i=0;i<5;i++) {
-
 
421
        mRefractoryFlux+=mOtherWood[i]*factor;
-
 
422
        mOtherWood[i]*=(1. - factor);
-
 
423
    }
-
 
424
384
}
425
}
385
426
386
427