Subversion Repositories public iLand

Rev

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

Rev 553 Rev 554
Line 20... Line 20...
20
    const XmlHelper &xml=GlobalSettings::instance()->settings();
20
    const XmlHelper &xml=GlobalSettings::instance()->settings();
21
    mSoilDepth = xml.valueDouble("model.site.soilDepth", 0.) * 10; // convert from cm to mm
21
    mSoilDepth = xml.valueDouble("model.site.soilDepth", 0.) * 10; // convert from cm to mm
22
    double pct_sand = xml.valueDouble("model.site.pctSand");
22
    double pct_sand = xml.valueDouble("model.site.pctSand");
23
    double pct_silt = xml.valueDouble("model.site.pctSilt");
23
    double pct_silt = xml.valueDouble("model.site.pctSilt");
24
    double pct_clay = xml.valueDouble("model.site.pctClay");
24
    double pct_clay = xml.valueDouble("model.site.pctClay");
25
    mTopLayerWaterContent = xml.valueDouble("model.site.topLayerWaterContent",50);
-
 
26
    if (pct_sand + pct_silt + pct_clay != 100.)
25
    if (pct_sand + pct_silt + pct_clay != 100.)
27
        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));
26
        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));
28
27
29
    // calculate soil characteristics based on empirical functions (Schwalm & Ek, 2004)
28
    // calculate soil characteristics based on empirical functions (Schwalm & Ek, 2004)
30
    // note: the variables are percentages [0..100]
29
    // note: the variables are percentages [0..100]
Line 378... Line 377...
378
    double div = (1. + svp_slope + gBL / gC);
377
    double div = (1. + svp_slope + gBL / gC);
379
    double Etransp = (svp_slope * rad + defTerm) / div;
378
    double Etransp = (svp_slope * rad + defTerm) / div;
380
    double canopy_transpiration = Etransp / latent_heat * daylength;
379
    double canopy_transpiration = Etransp / latent_heat * daylength;
381
380
382
    // calculate PET
381
    // calculate PET
383
    double div_evap = 1 + svp_slope;
-
 
-
 
382
    double div_evap = 2. + svp_slope;
384
    double pet_day = (svp_slope*rad + defTerm) / div_evap / latent_heat * daylength;
383
    double pet_day = (svp_slope*rad + defTerm) / div_evap / latent_heat * daylength;
385
    mPET[climate->month-1] += pet_day;
384
    mPET[climate->month-1] += pet_day;
386
385
387
    if (mInterception>0.) {
386
    if (mInterception>0.) {
388
        // we assume that for evaporation from leaf surface gBL/gC -> 0
387
        // we assume that for evaporation from leaf surface gBL/gC -> 0