LandscapeDNDC 1.37.0
ld_rootsystem.h
1
8#ifndef LD_ROOTSYSTEM_H_
9#define LD_ROOTSYSTEM_H_
10
11#include "state/mbe_state.h"
12#include "physiology/ld_plantfunctions.h"
13
14namespace ldndc {
15
16struct LDNDC_API BaseRootSystemDNDC
17{
18 virtual
19 ~BaseRootSystemDNDC() = 0;
20
26 virtual void reset( MoBiLE_Plant *) = 0;
27
32 virtual void
33 set_rooting_depth( unsigned int &, MoBiLE_Plant *, double,
34 double _max_rooting_depth = invalid_dbl) = 0;
35
40 virtual void
41 update_root_fraction_sigmoid( double /* adaption rate of fine roots distribution */,
42 unsigned int /* deepest rooted soillayer */,
43 double /* sigmoid curve parameter: min */,
44 double /* sigmoid curve parameter: max */,
45 double /* sigmoid curve parameter: width */,
46 double /* sigmoid curve parameter: height */,
47 MoBiLE_Plant * /* plant */) = 0;
48
53 virtual void
54 update_root_fraction_exponential( double /* adaption rate of fine roots distribution */,
55 unsigned int /* deepest rooted soillayer */,
56 double /* exponential factor */,
57 MoBiLE_Plant * /* plant */) = 0;
58
63 virtual void
64 update_roots_static( const double /* FTS_TOT_ */,
65 unsigned int &/* root_q_vt_ */,
66 MoBiLE_Plant * /* _vt */,
67 ldndc::growable_array < BaseRootSystemDNDC*, 1000, 1 > & /* root_system */,
68 double /*rootgrowthrestriction*/) = 0;
69
74 virtual void
75 specific_root_length( unsigned int const &/* root_q_vt_ */,
76 MoBiLE_Plant * /* _vt */,
77 lvector_t< double > &/*specifificrootlength*/) = 0;
78
83 virtual void
84 reduce_root_system( unsigned int &/* root_q_vt_ */,
85 MoBiLE_Plant * /* _vt */,
86 lvector_t< double > /*layerspecificmassreduction*/) = 0;
87
92 virtual void
93 reduce_root_system( unsigned int &/* root_q_vt_ */,
94 MoBiLE_Plant * /* _vt */,
95 double /* massreduction */) = 0;
96
101 virtual void
102 update_rootlength( unsigned int &/* root_q_vt_ */,
103 MoBiLE_Plant * /* _vt */,
104 double /* deltamass */) = 0;
105
110 virtual void
111 update_rootlength( unsigned int &/* root_q_vt_ */,
112 MoBiLE_Plant * /* _vt */,
113 lvector_t< double > /* deltamass in every rooted soil layer*/) = 0;
118 virtual void
119 update_roots_dynamic( const double /* FTS_TOT_ */,
120 unsigned int &/* root_q_vt_ */,
121 MoBiLE_Plant * /* _vt */,
122 double /* deltamassFrt */) = 0;
123
128 virtual lvector_t< double >
129 root_restrictions_coarse_fragments( unsigned int /* iterator_potentially_deepest_rooted_layer */) = 0;
130
135 virtual lvector_t< double >
136 root_restrictions_soil_strength( unsigned int /* iterator_potentially_deepest_rooted_layer */) = 0;
137
142 virtual lvector_t< double >
143 root_restrictions_aeration( unsigned int /* iterator_potentially_deepest_rooted_layer */,
144 MoBiLE_Plant * /* _vt */) = 0;
145
150 virtual lvector_t< double >
151 root_restrictions_temperature( unsigned int /* iterator_potentially_deepest_rooted_layer */,
152 MoBiLE_Plant * /* _vt */) = 0;
153
154 virtual void
155 update_rooting_depth( const double /*target_rooting_depth*/,
156 double &/* layerrestrictions */,
157 unsigned int & /* root_q_vt_ */,
158 MoBiLE_Plant * /* _vt */) = 0;
159
160 virtual void
161 target_rooting_depth_increase( double &_rooting_depth_increase,
162 unsigned int &_sl_min_no_roots,
163 double const _dt_per_day,
164 MoBiLE_Plant* const _p) = 0;
165
166 virtual void
167 nitrogen_uptake( unsigned int _deepest_rooted_layer,
168 double &n_plant,
169 double n_opt,
170 double _fts_tot,
171 lvector_t< double > _no3_sl,
172 lvector_t< double > _no3_uptake_sl,
173 lvector_t< double > _nh4_sl,
174 lvector_t< double > _nh4_uptake_sl,
175 lvector_t< double > _don_sl,
176 lvector_t< double > _don_uptake_sl,
177 lvector_t< double > _temp_sl,
178 MoBiLE_Plant * /* plant */) = 0;
179};
180
181
182struct LDNDC_API RootSystemDNDC : public BaseRootSystemDNDC
183{
184 RootSystemDNDC( MoBiLE_State *, cbm::io_kcomm_t *);
185 ~RootSystemDNDC();
186
187 input_class_soillayers_t const * m_soillayers;
188
193 LD_PlantFunctions m_pf;
194 substate_soilchemistry_t & sc_;
195 substate_microclimate_t & mc_;
196 substate_physiology_t & ph_;
197 substate_watercycle_t & wc_;
198 MoBiLE_PlantVegetation * m_veg;
199
205 void reset( MoBiLE_Plant *);
206
211 void
212 set_rooting_depth( unsigned int &, MoBiLE_Plant *,
213 double, double _max_rooting_depth = invalid_dbl);
214
219 void
220 update_root_fraction_sigmoid( double /* adaption rate of fine roots distribution */,
221 unsigned int /* deepest rooted soillayer */,
222 double /* sigmoid curve parameter: min */,
223 double /* sigmoid curve parameter: max */,
224 double /* sigmoid curve parameter: width */,
225 double /* sigmoid curve parameter: height */,
226 MoBiLE_Plant * /* plant */);
227
228 template <class _S>
229 void
230 update_root_fraction_sigmoid( double /* adaption rate of fine roots distribution */,
231 unsigned int /* deepest rooted soillayer */,
232 double /* sigmoid curve parameter: min */,
233 double /* sigmoid curve parameter: max */,
234 double /* sigmoid curve parameter: width */,
235 double /* sigmoid curve parameter: height */,
236 _S _fFrt_sl,
237 unsigned int nb_layers);
238
243 void
244 update_root_fraction_exponential( double /* adaption rate of fine roots distribution */,
245 unsigned int /* deepest rooted soillayer */,
246 double /* exponential factor */,
247 MoBiLE_Plant * /* plant */);
248 template <class _S>
249 void
250 update_root_fraction_exponential( double /* adaption rate of fine roots distribution */,
251 unsigned int /* deepest rooted soillayer */,
252 double /* exponential factor */,
253 _S _fFrt_sl,
254 unsigned int nb_layers);
255
260 void
261 update_roots_static( const double /* FTS_TOT_ */,
262 unsigned int &/* root_q_vt_ */,
263 MoBiLE_Plant * /* _vt */,
264 ldndc::growable_array < BaseRootSystemDNDC*, 1000, 1 > &/* root_system */,
265 double /* rootgrowthrestriction */);
270 void
271 specific_root_length( unsigned int const &/* root_q_vt_ */,
272 MoBiLE_Plant * /* _vt */,
273 lvector_t< double > &/*specifificrootlength*/);
274
279 void
280 reduce_root_system( unsigned int &/* root_q_vt_ */,
281 MoBiLE_Plant * /* _vt */,
282 double /* massreduction */);
283
288 void
289 reduce_root_system( unsigned int &/* root_q_vt_ */,
290 MoBiLE_Plant * /* _vt */,
291 lvector_t< double > /*layerspecificmassreduction*/);
292
297 void
298 update_rootlength( unsigned int &/* root_q_vt_ */,
299 MoBiLE_Plant * /* _vt */,
300 double /* deltamass */);
305 void
306 update_rootlength( unsigned int &/* root_q_vt_ */,
307 MoBiLE_Plant * /* _vt */,
308 lvector_t< double > /* deltamass in every rooted soil layer */);
309
314 void
315 update_roots_dynamic( const double /* FTS_TOT_ */,
316 unsigned int &/* root_q_vt_ */,
317 MoBiLE_Plant * /* _vt */,
318 double /* deltamassFrt */);
319
324 lvector_t< double >
325 root_restrictions_coarse_fragments( unsigned int /* iterator_potentially_deepest_rooted_layer */);
330 lvector_t< double >
331 root_restrictions_soil_strength( unsigned int /* iterator_potentially_deepest_rooted_layer */);
332
337 lvector_t< double >
338 root_restrictions_aeration( unsigned int /* iterator_potentially_deepest_rooted_layer */,
339 MoBiLE_Plant * /* _vt */);
340
345 lvector_t< double >
346 root_restrictions_temperature( unsigned int /* iterator_potentially_deepest_rooted_layer */,
347 MoBiLE_Plant * /* _vt */);
348
353 void
354 update_rooting_depth( const double /*target_rooting_depth*/,
355 double &/* layerrestrictions */,
356 unsigned int & /* root_q_vt_ */,
357 MoBiLE_Plant * /* _vt */);
358
363 void
364 target_rooting_depth_increase( double &_rooting_depth_increase,
365 unsigned int &_sl_min_no_roots,
366 double const _dt_per_day,
367 MoBiLE_Plant* const _p);
368
373 void
374 update_root_structure( unsigned int & _root_q_vt, MoBiLE_Plant *);
375
376 void
377 nitrogen_uptake( unsigned int _deepest_rooted_layer,
378 double &n_plant,
379 double n_opt,
380 double _fts_tot,
381 lvector_t< double > _no3_sl,
382 lvector_t< double > _no3_uptake_sl,
383 lvector_t< double > _nh4_sl,
384 lvector_t< double > _nh4_uptake_sl,
385 lvector_t< double > _don_sl,
386 lvector_t< double > _don_uptake_sl,
387 lvector_t< double > _temp_sl,
388 MoBiLE_Plant * /* plant */);
389};
390
391}
392
393#endif /* !LD_ROOTSYSTEM_H_ */
Spatially explicit groundwater model.
Definition: airchemistryput.h:15