Subversion Repositories public iLand

Rev

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

Rev 540 Rev 541
Line 6... Line 6...
6
#include "expression.h"
6
#include "expression.h"
7
// for calculation of climate decomposition
7
// for calculation of climate decomposition
8
#include "resourceunit.h"
8
#include "resourceunit.h"
9
#include "watercycle.h"
9
#include "watercycle.h"
10
#include "climate.h"
10
#include "climate.h"
-
 
11
#include "model.h"
11
12
12
/** @class Snag
13
/** @class Snag
13
  Snag deals with carbon / nitrogen fluxes from the forest until the reach soil pools.
14
  Snag deals with carbon / nitrogen fluxes from the forest until the reach soil pools.
14
  Snag lives on the level of the ResourceUnit; carbon fluxes from trees enter Snag, and parts of the biomass of snags
15
  Snag lives on the level of the ResourceUnit; carbon fluxes from trees enter Snag, and parts of the biomass of snags
15
  is subsequently forwarded to the soil sub model.
16
  is subsequently forwarded to the soil sub model.
Line 147... Line 148...
147
/// 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.
148
double Snag::calculateClimateFactors()
149
double Snag::calculateClimateFactors()
149
{
150
{
150
    double psi_kpa;
151
    double psi_kpa;
151
    double ft, fw;
152
    double ft, fw;
152
    const double min_kpa = -1500.;
153
    const double min_kpa = Model::settings().decayReferencePsi;
153
    double f_sum = 0.;
154
    double f_sum = 0.;
154
    for (const ClimateDay *day=mRU->climate()->begin(); day!=mRU->climate()->end(); ++day)
155
    for (const ClimateDay *day=mRU->climate()->begin(); day!=mRU->climate()->end(); ++day)
155
    {
156
    {
156
        psi_kpa = mRU->waterCycle()->psi_kPa(day->day);
157
        psi_kpa = mRU->waterCycle()->psi_kPa(day->day);
157
158