2#ifndef LM_CMFCOLUMN_CONFIG_H_
3#define LM_CMFCOLUMN_CONFIG_H_
5#include <string/cbm_string.h>
6#include <features/cmf-config.h>
20#define CMFCOLUMN_HAVE_INTEGRATABLES
21#ifdef CMFCOLUMN_HAVE_INTEGRATABLES
22# include "watercycle/cmfcolumn/cmfcolumn-fluxes.h"
26#define CMFCOLUMN_HAVE_TRANSPORT_NONE
28#define CMFCOLUMN_HAVE_TRANSPORT_COUPLED
49#ifdef CMFCOLUMN_HAVE_NEIGHBORSDISCHARGE_FILTER
51# define CMFCOLUMN_HAVE_NEIGHBORSDISCHARGE_FILTER_GRID
54#define CMFCOLUMN_dailythroughfall "a"
55#define CMFCOLUMN_dailyrainfall "b"
56#define CMFCOLUMN_dailyinfiltration "c"
57#define CMFCOLUMN_dailyexfiltration "d"
58#define CMFCOLUMN_dailyevaporation "e"
59#define CMFCOLUMN_dailytranspiration "f"
60#define CMFCOLUMN_dailycanopyevaporation "g"
61#define CMFCOLUMN_dailysurfacewaterevaporation "h"
62#define CMFCOLUMN_dailysoilevaporation "i"
63#define CMFCOLUMN_dailysurfacesnowevaporation "j"
64#define CMFCOLUMN_dailystreamdischarge "k"
65#define CMFCOLUMN_dailygroundwaterdischarge "l"
66#define CMFCOLUMN_dailyrunoff "m"
71 solutes_names(
""), first_layer_connected( 0)
73 this->comp.models = cmf_config::models::UNKNOWN;
75 this->flags.have_streamdischarge = 0;
76 this->flags.have_groundwaterdischarge = 0;
77 this->flags.have_outlets = 0;
78 this->flags.have_snow = 0;
79 this->flags.have_ice = 0;
80 this->flags.have_infiltration = 0;
81 this->flags.have_canopy = 0;
82 this->flags.have_evapotranspiration = 0;
83 this->flags.have_surfacewaterevaporation = 0;
84 this->flags.have_soilevaporation = 0;
85 this->flags.have_snowevaporation = 0;
86 this->flags.have_surfacerunoff = 0;
87 this->flags.have_rainthroughfall = 0;
88 this->flags.have_canopythroughfall = 0;
89 this->flags.have_lateral = 0;
91#ifdef CMFCOLUMN_HAVE_INTEGRATABLES
92 this->flags.have_integratables = 1;
94 this->flags.have_integratables = 0;
99 union cmf_model_configuration
103 cmf_config::watertransport::model_e watertransport;
104 cmf_config::solutestransport::model_e solutestransport;
105 cmf_config::infiltration::model_e infiltration;
106 cmf_config::surfacerunoff::model_e surfacerunoff;
107 cmf_config::evapotranspiration::model_e evapotranspiration;
112 cbm::string_t solutes_names;
114 size_t first_layer_connected;
120 struct streamdischarge_t
126 struct groundwaterdischarge_t
129 } m_groundwaterdischarge;
132 bool have_streamdischarge:1;
133 bool have_groundwaterdischarge:1;
137 bool have_infiltration:1;
139 bool have_evapotranspiration:1;
140 bool have_surfacewaterevaporation:1;
141 bool have_soilevaporation:1;
142 bool have_snowevaporation:1;
143 bool have_surfacerunoff:1;
144 bool have_rainthroughfall:1;
145 bool have_canopythroughfall:1;
147 bool have_integratables:1;
158 class ConstantRainSource;
169 class ShuttleworthWallace;
174 class flux_connection;
176 class DirichletBoundary;
180#ifdef CMFCOLUMN_HAVE_LATERAL
181# include <kernel/kcomm.h>
187 project( NULL), cell( NULL), rainsource( NULL),
188 et( NULL), integrator( NULL),
189 groundwater( NULL), stream( NULL), surfacerunoff( NULL)
192 cmf::project * project;
194 std::shared_ptr< cmf::upslope::Cell > cell;
196 cmf::upslope::Cell * cell;
199 std::shared_ptr< cmf::atmosphere::ConstantRainSource > rainsource;
200 std::shared_ptr< cmf::upslope::ET::ShuttleworthWallace > et;
202 cmf::math::Integrator * integrator;
204 std::shared_ptr< cmf::water::DirichletBoundary > groundwater;
205 std::shared_ptr< cmf::water::DirichletBoundary > stream;
206 std::shared_ptr< cmf::water::flux_connection > surfacerunoff;
208#ifdef CMFCOLUMN_HAVE_LATERAL
209 lcomponent_t projectowner;