Rev 167 | Rev 170 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 167 | Rev 169 | ||
---|---|---|---|
Line 41... | Line 41... | ||
41 | // lifecycle
|
41 | // lifecycle
|
42 | Tree::Tree() |
42 | Tree::Tree() |
43 | {
|
43 | {
|
44 | mDbh = mHeight = 0; |
44 | mDbh = mHeight = 0; |
45 | mRU = 0; mSpecies = 0; |
45 | mRU = 0; mSpecies = 0; |
46 | mFlags = 0; |
46 | mFlags = mAge = 0; |
47 | mOpacity=mFoliageMass=mWoodyMass=mRootMass=mLeafArea=0.; |
47 | mOpacity=mFoliageMass=mWoodyMass=mRootMass=mLeafArea=0.; |
48 | mDbhDelta=mNPPReserve=mLRI=mStressIndex=0.; |
48 | mDbhDelta=mNPPReserve=mLRI=mStressIndex=0.; |
49 | mId = m_nextId++; |
49 | mId = m_nextId++; |
50 | m_statCreated++; |
50 | m_statCreated++; |
51 | }
|
51 | }
|
Line 442... | Line 442... | ||
442 | 442 | ||
443 | 443 | ||
444 | void Tree::grow() |
444 | void Tree::grow() |
445 | {
|
445 | {
|
446 | TreeGrowthData d;
|
446 | TreeGrowthData d;
|
- | 447 | mAge++; // increase age |
|
447 | // step 1: get radiation from ressource unit: radiation (MJ/tree/year) total intercepted radiation for this tree per year!
|
448 | // step 1: get radiation from ressource unit: radiation (MJ/tree/year) total intercepted radiation for this tree per year!
|
448 | double radiation = mRU->interceptedRadiation(mLeafArea, mLRI); |
449 | double radiation = mRU->interceptedRadiation(mLeafArea, mLRI); |
449 | // step 2: get fraction of PARutilized, i.e. fraction of intercepted rad that is utiliziable (per year)
|
450 | // step 2: get fraction of PARutilized, i.e. fraction of intercepted rad that is utiliziable (per year)
|
450 | 451 | ||
451 | double raw_gpp_per_rad = mRU->ressourceUnitSpecies(species()).prod3PG().GPPperRad(); |
452 | double raw_gpp_per_rad = mRU->ressourceUnitSpecies(species()).prod3PG().GPPperRad(); |
452 | // GPP (without aging-effect) [gC] / year -> kg Biomass /GPP (*0.001 *2)
|
453 | // GPP (without aging-effect) [gC] / year -> kg Biomass /GPP (*0.001 *2)
|
453 | double raw_gpp = raw_gpp_per_rad * radiation * 0.001 * 2; |
454 | double raw_gpp = raw_gpp_per_rad * radiation * 0.001 * 2; |
454 | 455 | ||
455 | // apply aging
|
456 | // apply aging
|
- | 457 | const double aging_factor = mSpecies->aging(mHeight, mAge); |
|
456 | double gpp = raw_gpp * |
458 | double gpp = raw_gpp * aging_factor; |
457 | d.NPP = gpp * 0.47; // respiration loss, transformation kg |
459 | d.NPP = gpp * 0.47; // respiration loss, transformation kg |
458 | 460 | ||
459 | DBGMODE(
|
461 | DBGMODE(
|
460 | if (GlobalSettings::instance()->isDebugEnabled(GlobalSettings::dTreeNPP) && isDebugging()) { |
462 | if (GlobalSettings::instance()->isDebugEnabled(GlobalSettings::dTreeNPP) && isDebugging()) { |
461 | DebugList &out = GlobalSettings::instance()->debugList(mId, GlobalSettings::dTreeNPP); |
463 | DebugList &out = GlobalSettings::instance()->debugList(mId, GlobalSettings::dTreeNPP); |
462 | dumpList(out); // add tree headers |
464 | dumpList(out); // add tree headers |
463 | out << radiation << raw_gpp << gpp << d.NPP; |
465 | out << radiation << raw_gpp << gpp << d.NPP << aging_factor; |
464 | }
|
466 | }
|
465 | ); // DBGMODE() |
467 | ); // DBGMODE() |
466 | 468 | ||
467 | 469 | ||
468 | partitioning(d); // split npp to compartments and grow (diameter, height) |
470 | partitioning(d); // split npp to compartments and grow (diameter, height) |