Rev 497 | Rev 513 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 497 | Rev 505 | ||
---|---|---|---|
Line 84... | Line 84... | ||
84 | if (mDbh<=0 || mHeight<=0) |
84 | if (mDbh<=0 || mHeight<=0) |
85 | return; |
85 | return; |
86 | // check stamp
|
86 | // check stamp
|
87 | Q_ASSERT_X(species()!=0, "Tree::setup()", "species is NULL"); |
87 | Q_ASSERT_X(species()!=0, "Tree::setup()", "species is NULL"); |
88 | mStamp = species()->stamp(mDbh, mHeight); |
88 | mStamp = species()->stamp(mDbh, mHeight); |
- | 89 | if (!mStamp) { |
|
- | 90 | throw IException("Tree::setup() with invalid stamp!"); |
|
- | 91 | }
|
|
89 | 92 | ||
90 | mFoliageMass = species()->biomassFoliage(mDbh); |
93 | mFoliageMass = species()->biomassFoliage(mDbh); |
91 | mCoarseRootMass = species()->biomassRoot(mDbh); // coarse root (allometry) |
94 | mCoarseRootMass = species()->biomassRoot(mDbh); // coarse root (allometry) |
92 | mFineRootMass = mFoliageMass * species()->finerootFoliageRatio(); // fine root (size defined by finerootFoliageRatio) |
95 | mFineRootMass = mFoliageMass * species()->finerootFoliageRatio(); // fine root (size defined by finerootFoliageRatio) |
93 | mWoodyMass = species()->biomassWoody(mDbh); |
96 | mWoodyMass = species()->biomassWoody(mDbh); |