Rev 448 | Rev 526 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 448 | Rev 525 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | #ifndef SOIL_H
|
2 | #ifndef SOIL_H
|
3 | #define SOIL_H
|
3 | #define SOIL_H
|
- | 4 | ||
- | 5 | #include "snag.h"
|
|
4 | 6 | ||
5 | class Soil
|
7 | class Soil
|
6 | {
|
8 | {
|
7 | public: |
9 | public: |
- | 10 | // lifecycle
|
|
8 | Soil(); |
11 | Soil(); |
- | 12 | /// set initial pool contents
|
|
- | 13 | void setInitialState(const CNPool &young_labile_kg_ha, const CNPool &young_refractory_kg_ha, const CNPool &SOM_kg_ha) { mYL = young_labile_kg_ha*0.001; mYR = young_refractory_kg_ha*0.001; mSOM = SOM_kg_ha*0.001; } |
|
- | 14 | ||
- | 15 | // actions
|
|
- | 16 | void setSoilInput(const CNPool &labile_input_kg_ha, const CNPool &refractory_input_kg_ha); ///< provide values for input pools |
|
- | 17 | void setClimateFactor(const double climate_factor_re) { mRE = climate_factor_re; } ///< set the climate decomposition factor for the current year |
|
- | 18 | void calculate(); ///< main calculation function: calculates the update of state variables |
|
- | 19 | ||
- | 20 | // access
|
|
- | 21 | const CNPool &youngLabile() const { return mYL;} ///< young labile matter (t/ha) |
|
- | 22 | const CNPool &youngRefractory() const { return mYR;} ///< young refractory matter (t/ha) |
|
- | 23 | const CNPool &oldOrganicMatter() const { return mSOM;} ///< old matter (SOM) (t/ha) |
|
- | 24 | double availableNitrogen() const { return mAvailableNitrogen; } ///< return available Nitrogen (kg/ha*yr) |
|
- | 25 | QList<QVariant> debugList(); ///< return a debug output |
|
- | 26 | private: |
|
- | 27 | // variables
|
|
- | 28 | double mRE; ///< climate factor 're' (see Snag::calculateClimateFactors()) |
|
- | 29 | double mAvailableNitrogen; ///< plant available nitrogen (kg/ha) |
|
- | 30 | CNPool mInputLab; ///< input pool labile matter (t/ha) |
|
- | 31 | CNPool mInputRef; ///< input pool refractory matter (t/ha) |
|
- | 32 | // state variables
|
|
- | 33 | CNPool mYL; ///< C/N Pool for young labile matter (i.e. litter) (t/ha) |
|
- | 34 | CNPool mYR; ///< C/N Pool for young refractory matter (i.e. downed woody debris) (t/ha) |
|
- | 35 | CNPool mSOM; ///< C/N Pool for old matter (t/ha) (i.e. soil organic matter, SOM) |
|
9 | }; |
36 | }; |
10 | 37 | ||
11 | #endif // SOIL_H
|
38 | #endif // SOIL_H
|