Rev 781 | Rev 808 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 781 | Rev 802 | ||
---|---|---|---|
Line 57... | Line 57... | ||
57 | if (fabs(100. - (pct_sand + pct_silt + pct_clay)) > 0.01) |
57 | if (fabs(100. - (pct_sand + pct_silt + pct_clay)) > 0.01) |
58 | throw IException(QString("Setup Watercycle: soil composition percentages do not sum up to 100. Sand: %1, Silt: %2 Clay: %3").arg(pct_sand).arg(pct_silt).arg(pct_clay)); |
58 | throw IException(QString("Setup Watercycle: soil composition percentages do not sum up to 100. Sand: %1, Silt: %2 Clay: %3").arg(pct_sand).arg(pct_silt).arg(pct_clay)); |
59 | 59 | ||
60 | // calculate soil characteristics based on empirical functions (Schwalm & Ek, 2004)
|
60 | // calculate soil characteristics based on empirical functions (Schwalm & Ek, 2004)
|
61 | // note: the variables are percentages [0..100]
|
61 | // note: the variables are percentages [0..100]
|
62 | mPsi_ref = -exp((1.54 - 0.0095*pct_sand + 0.0063*pct_silt) * log(10.)) * 0.000098; // Eq. 83 |
- | |
- | 62 | mPsi_sat = -exp((1.54 - 0.0095*pct_sand + 0.0063*pct_silt) * log(10)) * 0.000098; // Eq. 83 |
|
63 | mPsi_koeff_b = -( 3.1 + 0.157*pct_clay - 0.003*pct_sand ); // Eq. 84 |
63 | mPsi_koeff_b = -( 3.1 + 0.157*pct_clay - 0.003*pct_sand ); // Eq. 84 |
64 | mRho_ref = 0.01 * (50.5 - 0.142*pct_sand - 0.037*pct_clay); // Eq. 78 |
- | |
- | 64 | mTheta_sat = 0.01 * (50.5 - 0.142*pct_sand - 0.037*pct_clay); // Eq. 78 |
|
65 | mCanopy.setup(); |
65 | mCanopy.setup(); |
66 | 66 | ||
67 | mPermanentWiltingPoint = heightFromPsi(-4000); // maximum psi is set to a constant of -4MPa |
67 | mPermanentWiltingPoint = heightFromPsi(-4000); // maximum psi is set to a constant of -4MPa |
68 | if (xml.valueBool("model.settings.waterUseSoilSaturation",false)==false) { |
68 | if (xml.valueBool("model.settings.waterUseSoilSaturation",false)==false) { |
69 | mFieldCapacity = heightFromPsi(-15); |
69 | mFieldCapacity = heightFromPsi(-15); |
Line 73... | Line 73... | ||
73 | mFieldCapacity = heightFromPsi(psi_sat); |
73 | mFieldCapacity = heightFromPsi(psi_sat); |
74 | if (logLevelDebug()) qDebug() << "psi: saturation " << psi_sat << "field capacity:" << mFieldCapacity; |
74 | if (logLevelDebug()) qDebug() << "psi: saturation " << psi_sat << "field capacity:" << mFieldCapacity; |
75 | }
|
75 | }
|
76 | 76 | ||
77 | mContent = mFieldCapacity; // start with full water content (in the middle of winter) |
77 | mContent = mFieldCapacity; // start with full water content (in the middle of winter) |
78 | if (logLevelDebug()) qDebug() << "setup of water: Psi_ref (kPa)" << mPsi_ref << "Rho_ref" << mRho_ref << "coeff. b" << mPsi_koeff_b; |
- | |
- | 78 | if (logLevelDebug()) qDebug() << "setup of water: Psi_sat (kPa)" << mPsi_sat << "Theta_sat" << mTheta_sat << "coeff. b" << mPsi_koeff_b; |
|
79 | mCanopyConductance = 0.; |
79 | mCanopyConductance = 0.; |
80 | mLastYear = -1; |
80 | mLastYear = -1; |
81 | 81 | ||
82 | // canopy settings
|
82 | // canopy settings
|
83 | mCanopy.mNeedleFactor = xml.valueDouble("model.settings.interceptionStorageNeedle", 4.); |
83 | mCanopy.mNeedleFactor = xml.valueDouble("model.settings.interceptionStorageNeedle", 4.); |
Line 91... | Line 91... | ||
91 | inline double WaterCycle::psiFromHeight(const double mm) const |
91 | inline double WaterCycle::psiFromHeight(const double mm) const |
92 | {
|
92 | {
|
93 | // psi_x = psi_ref * ( rho_x / rho_ref) ^ b
|
93 | // psi_x = psi_ref * ( rho_x / rho_ref) ^ b
|
94 | if (mm<0.001) |
94 | if (mm<0.001) |
95 | return -100000000; |
95 | return -100000000; |
96 | double psi_x = mPsi_ref * pow((mm / mSoilDepth / mRho_ref),mPsi_koeff_b); |
- | |
- | 96 | double psi_x = mPsi_sat * pow((mm / mSoilDepth / mTheta_sat),mPsi_koeff_b); |
|
97 | return psi_x; // pis |
97 | return psi_x; // pis |
98 | }
|
98 | }
|
99 | 99 | ||
100 | /// calculate the height of the water column for a given pressure
|
100 | /// calculate the height of the water column for a given pressure
|
101 | /// return water amount in mm
|
101 | /// return water amount in mm
|
102 | /// see http://iland.boku.ac.at/water+cycle#transpiration_and_canopy_conductance
|
102 | /// see http://iland.boku.ac.at/water+cycle#transpiration_and_canopy_conductance
|
103 | inline double WaterCycle::heightFromPsi(const double psi_kpa) const |
103 | inline double WaterCycle::heightFromPsi(const double psi_kpa) const |
104 | {
|
104 | {
|
105 | // rho_x = rho_ref * (psi_x / psi_ref)^(1/b)
|
105 | // rho_x = rho_ref * (psi_x / psi_ref)^(1/b)
|
106 | double h = mSoilDepth * mRho_ref * pow(psi_kpa / mPsi_ref, 1./mPsi_koeff_b); |
- | |
- | 106 | double h = mSoilDepth * mTheta_sat * pow(psi_kpa / mPsi_sat, 1./mPsi_koeff_b); |
|
107 | return h; |
107 | return h; |
108 | }
|
108 | }
|
109 | 109 | ||
110 | /// get canopy characteristics of the resource unit.
|
110 | /// get canopy characteristics of the resource unit.
|
111 | /// It is important, that species-statistics are valid when this function is called (LAI)!
|
111 | /// It is important, that species-statistics are valid when this function is called (LAI)!
|