Subversion Repositories public iLand

Rev

Rev 125 | Rev 142 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 125 Rev 136
Line 19... Line 19...
19
    /// @property id 4-character unique identification of the tree species
19
    /// @property id 4-character unique identification of the tree species
20
    const QString &id() const { return mId; }
20
    const QString &id() const { return mId; }
21
    /// the full name (e.g. Picea Abies) of the species
21
    /// the full name (e.g. Picea Abies) of the species
22
    const QString &name() const { return mName; }
22
    const QString &name() const { return mName; }
23
    const int index() const { return mIndex; } ///< unique index of species within current set
23
    const int index() const { return mIndex; } ///< unique index of species within current set
-
 
24
24
    // calculations: allometries
25
    // calculations: allometries
25
    const double biomassLeaf(const double dbh) { return mBiomassLeaf.calculate(dbh); }
-
 
26
    const double biomassStem(const double dbh) { return mBiomassStem.calculate(dbh); }
-
 
27
    const double biomassRoot(const double dbh) { return mBiomassRoot.calculate(dbh); }
-
 
-
 
26
    const double biomassFoliage(const double dbh) const;
-
 
27
    const double biomassWoody(const double dbh) const;
-
 
28
    const double biomassRoot(const double dbh) const;
-
 
29
    const double allometricRatio_wf() const { return mWoody_b / mFoliage_b; }
-
 
30
    const double allometricFractionStem(const double dbh) const;
-
 
31
28
    // turnover rates
32
    // turnover rates
29
    const double turnoverLeaf() const { return mTurnoverLeaf; }
33
    const double turnoverLeaf() const { return mTurnoverLeaf; }
30
    const double turnoverStem() const { return mTurnoverStem; }
-
 
31
    const double turnoverRoot() const { return mTurnoverRoot; }
34
    const double turnoverRoot() const { return mTurnoverRoot; }
32
    // hd-values
35
    // hd-values
33
    void hdRange(const double dbh, double &rMinHD, double &rMaxHD);
36
    void hdRange(const double dbh, double &rMinHD, double &rMaxHD);
34
    // growth
37
    // growth
35
    const double volumeFactor() const { return mVolumeFactor; } ///< factor for volume calculation: V = factor * D^2*H (incorporates density and the form of the bole)
38
    const double volumeFactor() const { return mVolumeFactor; } ///< factor for volume calculation: V = factor * D^2*H (incorporates density and the form of the bole)
36
    const double specificLeafArea() const { return mSpecificLeafArea; }
39
    const double specificLeafArea() const { return mSpecificLeafArea; }
37
40
38
    const Stamp* stamp(const float dbh, const float height) const { return mStamp.stamp(dbh, height);}
-
 
-
 
41
    const Stamp* stamp(const float dbh, const float height) const { return mLIPs.stamp(dbh, height);}
39
    // maintenance
42
    // maintenance
40
    void setup();
43
    void setup();
41
private:
44
private:
42
    Q_DISABLE_COPY(Species);
45
    Q_DISABLE_COPY(Species);
43
    /// during setup: get value of variable @p s as a double.
-
 
44
    double doubleVar(const QString s) { return mSet->var(s).toDouble(); }
-
 
45
    /// during setup: get value of variable @p s as an integer.
-
 
46
    double intVar(const QString s) { return mSet->var(s).toInt(); }
-
 
47
    /// during setup: get value of variable @p s as a string.
-
 
48
    QString stringVar(const QString s) { return mSet->var(s).toString(); }
-
 
-
 
46
    // helpers during setup
-
 
47
    double doubleVar(const QString s) { return mSet->var(s).toDouble(); }///< during setup: get value of variable @p s as a double.
-
 
48
    double intVar(const QString s) { return mSet->var(s).toInt(); } ///< during setup: get value of variable @p s as an integer.
-
 
49
    QString stringVar(const QString s) { return mSet->var(s).toString(); } ///< during setup: get value of variable @p s as a string.
-
 
50
49
    SpeciesSet *mSet; ///< ptr. to the "parent" set
51
    SpeciesSet *mSet; ///< ptr. to the "parent" set
50
    StampContainer mStamp;
-
 
-
 
52
    StampContainer mLIPs; ///< ptr to the container of the LIP-pattern
51
    QString mId;
53
    QString mId;
52
    QString mName;
54
    QString mName;
53
    int mIndex; ///< internal index within the SpeciesSet
55
    int mIndex; ///< internal index within the SpeciesSet
54
    // Allometric Functions (use expressions)
-
 
55
    Expression mBiomassLeaf; ///< formula for calc. of leaf-biomass as f(dbh)
-
 
56
    Expression mBiomassStem; ///< formula for calc. of stem-biomass as f(dbh)
-
 
57
    Expression mBiomassRoot; ///< formula for calc. of biomass-biomass as f(dbh)
-
 
-
 
56
    // biomass allometries:
-
 
57
    double mFoliage_a, mFoliage_b;  ///< allometry (biomass = a * dbh^b) for foliage
-
 
58
    double mWoody_a, mWoody_b; ///< allometry (biomass = a * dbh^b) for woody compartments aboveground
-
 
59
    double mRoot_a, mRoot_b; ///< allometry (biomass = a * dbh^b) for roots (compound, fine and coarse roots as one pool)
-
 
60
    double mBranch_a, mBranch_b; ///< allometry (biomass = a * dbh^b) for branches
-
 
61
58
    double mSpecificLeafArea; ///< conversion factor from kg OTS to m2 LeafArea
62
    double mSpecificLeafArea; ///< conversion factor from kg OTS to m2 LeafArea
-
 
63
59
    // turnover rates
64
    // turnover rates
60
    double mTurnoverLeaf; ///< yearly turnover rate leafs
65
    double mTurnoverLeaf; ///< yearly turnover rate leafs
61
    double mTurnoverStem; ///< yearly turnover rate stem
-
 
62
    double mTurnoverRoot; ///< yearly turnover rate root
66
    double mTurnoverRoot; ///< yearly turnover rate root
63
    // height-diameter-relationships
67
    // height-diameter-relationships
64
    Expression mHDlow; ///< minimum HD-relation as f(d) (open grown tree)
68
    Expression mHDlow; ///< minimum HD-relation as f(d) (open grown tree)
65
    Expression mHDhigh; ///< maximum HD-relation as f(d)
69
    Expression mHDhigh; ///< maximum HD-relation as f(d)
66
    // stem density and taper
70
    // stem density and taper