Subversion Repositories public iLand

Rev

Rev 552 | Rev 557 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 552 Rev 553
Line 146... Line 146...
146
146
147
/// calculate the dynamic climate modifier for decomposition 're'
147
/// calculate the dynamic climate modifier for decomposition 're'
148
/// calculation is done on the level of ResourceUnit because the water content per day is needed.
148
/// calculation is done on the level of ResourceUnit because the water content per day is needed.
149
double Snag::calculateClimateFactors()
149
double Snag::calculateClimateFactors()
150
{
150
{
151
    double deficit;
-
 
152
    double ft, fw;
151
    double ft, fw;
153
    const double top_layer_content = mRU->waterCycle()->topLayerWaterContent();
-
 
154
    double f_sum = 0.;
152
    double f_sum = 0.;
155
    int iday=0;
153
    int iday=0;
-
 
154
    // calculate the water-factor for each month (see Adair et al 2008)
-
 
155
    double fw_month[12];
-
 
156
    double ratio;
-
 
157
    for (int m=0;m<12;m++) {
-
 
158
        if (mRU->waterCycle()->potentialEvapotranspiration()[m]>0.)
-
 
159
            ratio = mRU->climate()->precipitationMonth()[m] /  mRU->waterCycle()->potentialEvapotranspiration()[m];
-
 
160
        else
-
 
161
            ratio = 0;
-
 
162
        fw_month[m] = 1. / (1. + 30.*exp(-8.5*ratio));
-
 
163
        qDebug() <<"month"<< m << "PET" << mRU->waterCycle()->potentialEvapotranspiration()[m] << "prec" <<mRU->climate()->precipitationMonth()[m];
-
 
164
    }
-
 
165
156
    for (const ClimateDay *day=mRU->climate()->begin(); day!=mRU->climate()->end(); ++day, ++iday)
166
    for (const ClimateDay *day=mRU->climate()->begin(); day!=mRU->climate()->end(); ++day, ++iday)
157
    {
167
    {
158
        deficit = mRU->waterCycle()->waterDeficit_mm(iday);
-
 
159
-
 
160
        ft = exp(308.56*(1./56.02-1./((273.+day->temperature)-227.13)));  // empirical variable Q10 model of Lloyd and Taylor (1994), see also Adair et al. (2008)
168
        ft = exp(308.56*(1./56.02-1./((273.+day->temperature)-227.13)));  // empirical variable Q10 model of Lloyd and Taylor (1994), see also Adair et al. (2008)
161
        fw = 1. - limit(deficit / top_layer_content, 0., 1.);
169
        fw = fw_month[day->month-1];
162
        // the water effect: depends on the water deficit; if the deficit is higher than the parameterized
-
 
163
        // content of the top layer (where most microbial activity is located), than then fw gets 0.
-
 
164
170
165
        f_sum += ft*fw;
171
        f_sum += ft*fw;
166
    }
172
    }
167
    // the climate factor is defined as the arithmentic annual mean value
173
    // the climate factor is defined as the arithmentic annual mean value
168
    mClimateFactor = f_sum / double(mRU->climate()->daysOfYear());
174
    mClimateFactor = f_sum / double(mRU->climate()->daysOfYear());