1#ifndef M1D_MOD_WATERCYCLE_QUERCUS_H
2#define M1D_MOD_WATERCYCLE_QUERCUS_H
5#include "watercyclemodule.h"
14class WaterCycleQUERCUS :
public WaterCycleModule {
17 WaterCycleQUERCUS(ModelCore & modelCore,
unsigned int timeInterval) : WaterCycleModule(modelCore, timeInterval),
18 modelCore_(modelCore),
19 time_(modelCore.getLandscape().getTime()),
20 si_(modelCore.getInput().getSite()),
21 sipar_(modelCore.getInput().getParameter().getSitePar()),
22 sppar_(modelCore.getInput().getParameter().getSpeciesPar()),
23 ac_(modelCore.getSubstates().getAc()),
24 mc_(modelCore.getSubstates().getMc()),
25 sc_(modelCore.getSubstates().getSc()),
26 wc_(const_cast<WaterCycle &>(modelCore.getSubstates().getWc())),
27 ph_(modelCore.getSubstates().getPh()),
28 vs_(modelCore.getSubstates().getVs())
30 this->setName(
"WaterCycleQUERCUS");
34 ~WaterCycleQUERCUS() {
45 ModelCore & modelCore_;
51 AirChemistry
const & ac_;
52 MicroClimate
const & mc_;
53 SoilChemistry
const & sc_;
55 Physiology
const & ph_;
56 VegStructure
const & vs_;
63 static const double CSOL1;
64 static const double CSOL2;
65 static const double BFED;
68 static const double C;
69 static const double D;
73 static const double U;
74 static const double ALPHA;
78 double E,PERCO,RUNOFF,ETP1,TR1,DSTOR;
79 double ALAI,NB,S,SSAT,SREF,SLIM,SMIN,AKS,STOR,STOROLD,SOLCOV;
88 void CalcWatercycle();
90 double WED(
double TAK);
92 double ES(
double TAK,
double WED1);
94 double DELTA(
double WED1,
double ES1);
96 void CYCLE(
double W1,
double B1,
double ANUM,
double DEN);
98 void EVAP(
double EP,
double &E,
double &SE1,
double &SE2);
100 inline double Max(
double x,
double y){
101 return (x > y) ? x : y;
104 inline double Min(
double x,
double y){
105 return (x > y) ? y : x;
107 inline double Sqr(
double x){