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
16
24double
25get_clay_limitation( size_t _sl,
26 double _water_avail,
27 double _water_ref,
28 substate_soilchemistry_t const &sc_,
29 input_class_siteparameters_t const * m_param);
30
31
39double
40root_density( double,
41 double,
42 double,
43 bool);
44
45
46void
48 size_t _sl_cnt_litter,
49 size_t _sl_cnt_soil,
50 double _ps,
51 double _rooting_depth,
52 double *_f_frt_sl,
53 double const *_h_sl);
54
55void
56set_rooting_depth( input_class_soillayers_t const * m_soillayers,
57 substate_soilchemistry_t const * soilchem,
58 MoBiLE_Plant *,
59 bool consider_texture = false);
60
61struct LDNDC_API BaseRootSystemDNDC
62{
63 virtual
64 ~BaseRootSystemDNDC() = 0;
65
71 virtual void reset( MoBiLE_Plant *) = 0;
72
77 virtual void
78 root_development( double /*increment*/, unsigned int &, MoBiLE_Plant *) = 0;
79
84 virtual void
85 set_rooting_depth( unsigned int &, MoBiLE_Plant *, double,
86 double _max_rooting_depth = invalid_dbl) = 0;
87
92 virtual unsigned int
93 update_deepest_rooted_soil_layer_index( unsigned int &,
94 MoBiLE_Plant *, double) = 0;
95
100 virtual void
101 update_root_fraction_sigmoid(
102 double /* adaption rate of fine roots distribution */,
103 unsigned int /* deepest rooted soillayer */,
104 double /* sigmoid curve parameter: min */,
105 double /* sigmoid curve parameter: max */,
106 double /* sigmoid curve parameter: width */,
107 double /* sigmoid curve parameter: height */,
108 MoBiLE_Plant * /* plant */) = 0;
109
114 virtual void
115 update_root_fraction_exponential(
116 double /* adaption rate of fine roots distribution */,
117 unsigned int /* deepest rooted soillayer */,
118 double /* exponential factor */,
119 MoBiLE_Plant * /* plant */) = 0;
120
121
126 virtual void
127 update_roots_static(
128 const double /* FTS_TOT_ */,
129 unsigned int &/* root_q_vt_ */,
130 MoBiLE_Plant * /* _vt */,
131 ldndc::growable_array < BaseRootSystemDNDC*, 1000, 1 > & /* root_system */,
132 double /*rootgrowthrestriction*/) = 0;
133
138 virtual void
139 specific_root_length(
140 unsigned int &/* root_q_vt_ */,
141 MoBiLE_Plant * /* _vt */,
142 lvector_t< double > &/*specifificrootlength*/) = 0;
143
148 virtual void
149 reduce_root_system(
150 unsigned int &/* root_q_vt_ */,
151 MoBiLE_Plant * /* _vt */,
152 double & /* massreduction */,
153 lvector_t< double > /*layerspecificmassreduction*/) = 0;
154
159 virtual void
160 reduce_root_system_homogenously(
161 unsigned int &/* root_q_vt_ */,
162 MoBiLE_Plant * /* _vt */,
163 double /* massreduction */) = 0;
164
169 virtual void
170 calc_meanSRL_allsl(
171 unsigned int &/* root_q_vt_ */,
172 MoBiLE_Plant * /* _vt */) = 0;
173
178 virtual void
179 update_rootlength_meanSRL_allsl(
180 unsigned int &/* root_q_vt_ */,
181 MoBiLE_Plant * /* _vt */,
182 double /* deltamass */) = 0;
183
188 virtual void
189 update_rootlength_meanSRL_allsl_individuallosses(
190 unsigned int &/* root_q_vt_ */,
191 MoBiLE_Plant * /* _vt */,
192 lvector_t< double > /* deltamass in every rooted soil layer*/) = 0;
197 virtual void
198 update_roots_dynamic(
199 const double /* FTS_TOT_ */,
200 unsigned int &/* root_q_vt_ */,
201 MoBiLE_Plant * /* _vt */,
202 double /* deltamassFrt */) = 0;
203
208 virtual lvector_t< double >
209 determine_root_restrictions_coarse_fragments(
210 unsigned int /* iterator_potentially_deepest_rooted_layer */) = 0;
211
216 virtual lvector_t< double >
217 determine_root_restrictions_soil_strength(
218 unsigned int /* iterator_potentially_deepest_rooted_layer */) = 0;
219
224 virtual lvector_t< double >
225 determine_root_restrictions_aeration(
226 unsigned int /* iterator_potentially_deepest_rooted_layer */,
227 bool /* notaffected */,
228 MoBiLE_Plant * /* _vt */) = 0;
229
234 virtual lvector_t< double >
235 determine_root_restrictions_temperature(
236 unsigned int /* iterator_potentially_deepest_rooted_layer */,
237 MoBiLE_Plant * /* _vt */) = 0;
238
239 virtual void
240 update_rooting_depth(
241 const double /*target_rooting_depth*/,
242 double &/* layerrestrictions */,
243 unsigned int & /* root_q_vt_ */,
244 MoBiLE_Plant * /* _vt */) = 0;
245
246 virtual void
247 determine_target_rooting_depth_increase(
248 double &/* target_rooting_depthincrease */,
249 unsigned int &/* target_iterator_first_non_rooted_layer */,
250 const double /* FTS_TOT_ */,
251 MoBiLE_Plant * /* _vt */) = 0;
252
253 virtual void
254 nitrogen_uptake(
255 unsigned int _deepest_rooted_layer,
256 double &n_plant,
257 double n_opt,
258 double _fts_tot,
259 lvector_t< double > _no3_sl,
260 lvector_t< double > _no3_uptake_sl,
261 lvector_t< double > _nh4_sl,
262 lvector_t< double > _nh4_uptake_sl,
263 lvector_t< double > _don_sl,
264 lvector_t< double > _don_uptake_sl,
265 lvector_t< double > _temp_sl,
266 MoBiLE_Plant * /* plant */) = 0;
267};
268
269
270struct LDNDC_API RootSystemDNDC : public BaseRootSystemDNDC
271{
272 RootSystemDNDC(
273 MoBiLE_State *,
274 cbm::io_kcomm_t *);
275 ~RootSystemDNDC();
276
277 input_class_soillayers_t const * m_soillayers;
278
283 LD_PlantFunctions m_pf;
284 substate_soilchemistry_t & sc_;
285 substate_microclimate_t & mc_;
286 //~ substate_vegstructure_t & vs_;
287 substate_physiology_t & ph_;
288 substate_watercycle_t & wc_;
289
290 MoBiLE_PlantVegetation * m_veg;
291
292
298 void reset( MoBiLE_Plant *);
299
304 void
305 root_development( double /*increment*/, unsigned int &, MoBiLE_Plant *);
306
311 void
312 set_rooting_depth( unsigned int &, MoBiLE_Plant *,
313 double, double _max_rooting_depth = invalid_dbl);
314
319 unsigned int
320 update_deepest_rooted_soil_layer_index( unsigned int &, MoBiLE_Plant *, double);
321
326 void
327 update_root_fraction_sigmoid(
328 double /* adaption rate of fine roots distribution */,
329 unsigned int /* deepest rooted soillayer */,
330 double /* sigmoid curve parameter: min */,
331 double /* sigmoid curve parameter: max */,
332 double /* sigmoid curve parameter: width */,
333 double /* sigmoid curve parameter: height */,
334 MoBiLE_Plant * /* plant */);
335
340 void
341 update_root_fraction_exponential(
342 double /* adaption rate of fine roots distribution */,
343 unsigned int /* deepest rooted soillayer */,
344 double /* exponential factor */,
345 MoBiLE_Plant * /* plant */);
346
347
352 void
353 update_roots_static(
354 const double /* FTS_TOT_ */,
355 unsigned int &/* root_q_vt_ */,
356 MoBiLE_Plant * /* _vt */,
357 ldndc::growable_array < BaseRootSystemDNDC*, 1000, 1 > &/* root_system */,
358 double /* rootgrowthrestriction */);
363 void
364 specific_root_length(
365 unsigned int &/* root_q_vt_ */,
366 MoBiLE_Plant * /* _vt */,
367 lvector_t< double > &/*specifificrootlength*/);
368
373 void
374 reduce_root_system(
375 unsigned int &/* root_q_vt_ */,
376 MoBiLE_Plant * /* _vt */,
377 double & /* massreduction */,
378 lvector_t< double > /*layerspecificmassreduction*/);
379
384 void
385 reduce_root_system_homogenously(
386 unsigned int &/* root_q_vt_ */,
387 MoBiLE_Plant * /* _vt */,
388 double /* massreduction */);
393 void
394 calc_meanSRL_allsl(
395 unsigned int &/* root_q_vt_ */,
396 MoBiLE_Plant * /* _vt */);
397
402 void
403 update_rootlength_meanSRL_allsl(
404 unsigned int &/* root_q_vt_ */,
405 MoBiLE_Plant * /* _vt */,
406 double /* deltamass */);
411 void
412 update_rootlength_meanSRL_allsl_individuallosses(
413 unsigned int &/* root_q_vt_ */,
414 MoBiLE_Plant * /* _vt */,
415 lvector_t< double > /* deltamass in every rooted soil layer */);
416
421 void
422 update_roots_dynamic(
423 const double /* FTS_TOT_ */,
424 unsigned int &/* root_q_vt_ */,
425 MoBiLE_Plant * /* _vt */,
426 double /* deltamassFrt */);
427
432 lvector_t< double >
433 determine_root_restrictions_coarse_fragments(
434 unsigned int /* iterator_potentially_deepest_rooted_layer */);
439 lvector_t< double >
440 determine_root_restrictions_soil_strength(
441 unsigned int /* iterator_potentially_deepest_rooted_layer */);
442
447 lvector_t< double >
448 determine_root_restrictions_aeration(
449 unsigned int /* iterator_potentially_deepest_rooted_layer */,
450 bool /* notaffected */,
451 MoBiLE_Plant * /* _vt */);
452
457 lvector_t< double >
458 determine_root_restrictions_temperature(
459 unsigned int /* iterator_potentially_deepest_rooted_layer */,
460 MoBiLE_Plant * /* _vt */);
461
466 void
467 update_rooting_depth(
468 const double /*target_rooting_depth*/,
469 double &/* layerrestrictions */,
470 unsigned int & /* root_q_vt_ */,
471 MoBiLE_Plant * /* _vt */);
472
477 void
478 determine_target_rooting_depth_increase(
479 double &/* target_rooting_depthincrease */,
480 unsigned int &/* target_iterator_first_non_rooted_layer */,
481 const double /* FTS_TOT_ */,
482 MoBiLE_Plant * /* _vt */);
483
488 void
489 update_root_structure( unsigned int & _root_q_vt, MoBiLE_Plant *);
490
491 void
492 nitrogen_uptake(
493 unsigned int _deepest_rooted_layer,
494 double &n_plant,
495 double n_opt,
496 double _fts_tot,
497 lvector_t< double > _no3_sl,
498 lvector_t< double > _no3_uptake_sl,
499 lvector_t< double > _nh4_sl,
500 lvector_t< double > _nh4_uptake_sl,
501 lvector_t< double > _don_sl,
502 lvector_t< double > _don_uptake_sl,
503 lvector_t< double > _temp_sl,
504 MoBiLE_Plant * /* plant */);
505};
506
507}
508
509#endif /* !LD_ROOTSYSTEM_H_ */
Spatially explicit groundwater model.
Definition: airchemistryput.h:15
double root_density(double, double, double, bool)
Return root density either based on root length or mass.
Definition: ld_rootsystem.cpp:50
double get_clay_limitation(size_t _sl, double _water_avail, double _water_ref, substate_soilchemistry_t const &sc_, input_class_siteparameters_t const *m_param)
Restrains water availability due to clay content.
Definition: ld_rootsystem.cpp:27
void fineroots_biomass_distribution(size_t _sl_cnt_litter, size_t _sl_cnt_soil, double _ps, double _rooting_depth, double *_f_frt_sl, double const *_h_sl)
Definition: ld_rootsystem.cpp:100