Rev 553 | Rev 562 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 553 | Rev 557 | ||
---|---|---|---|
Line 92... | Line 92... | ||
92 | mAvgDbh[i] = 0.; |
92 | mAvgDbh[i] = 0.; |
93 | mAvgHeight[i] = 0.; |
93 | mAvgHeight[i] = 0.; |
94 | mAvgVolume[i] = 0.; |
94 | mAvgVolume[i] = 0.; |
95 | mKSW[i] = 0.; |
95 | mKSW[i] = 0.; |
96 | mCurrentKSW[i] = 0.; |
96 | mCurrentKSW[i] = 0.; |
- | 97 | mHalfLife[i] = 0.; |
|
97 | }
|
98 | }
|
98 | mTotalSnagCarbon = 0.; |
99 | mTotalSnagCarbon = 0.; |
99 | if (mDBHLower<=0) |
100 | if (mDBHLower<=0) |
100 | throw IException("Snag::setupThresholds() not called or called with invalid parameters."); |
101 | throw IException("Snag::setupThresholds() not called or called with invalid parameters."); |
- | 102 | ||
- | 103 | // Inital values from XML file
|
|
- | 104 | XmlHelper xml=GlobalSettings::instance()->settings(); |
|
- | 105 | // put carbon of snags to the middle size class
|
|
- | 106 | xml.setCurrentNode("model.initialization.snags"); |
|
- | 107 | double kyr = xml.valueDouble(".woodDecompRate"); |
|
- | 108 | mSWD[1].C = xml.valueDouble(".swdC"); |
|
- | 109 | mSWD[1].N = mSWD[1].C / xml.valueDouble(".swdCN", 50.); |
|
- | 110 | mSWD[1].setParameter(kyr); |
|
- | 111 | mKSW[1] = xml.valueDouble(".swdDecompRate"); |
|
- | 112 | mNumberOfSnags[1] = xml.valueDouble(".swdCount"); |
|
- | 113 | mHalfLife[1] = xml.valueDouble(".swdHalfLife"); |
|
- | 114 | // and for the Branch/coarse root pools: split the init value into five chunks
|
|
- | 115 | CNPool other(xml.valueDouble(".otherC"), xml.valueDouble(".otherC")/xml.valueDouble(".otherCN", 50.), kyr ); |
|
- | 116 | ||
- | 117 | mTotalSnagCarbon = other.C + mSWD[1].C; |
|
- | 118 | ||
- | 119 | other *= 0.2; |
|
- | 120 | for (int i=0;i<5;i++) |
|
- | 121 | mOtherWood[i] = other; |
|
101 | }
|
122 | }
|
102 | 123 | ||
103 | // debug outputs
|
124 | // debug outputs
|
104 | QList<QVariant> Snag::debugList() |
125 | QList<QVariant> Snag::debugList() |
105 | {
|
126 | {
|