LandscapeDNDC 1.37.0
Loading...
Searching...
No Matches
ld_rootsystem.h
1
10
11#ifndef LD_ROOTSYSTEM_H_
12#define LD_ROOTSYSTEM_H_
13
14#include "state/mbe_state.h"
15#include "physiology/ld_plantfunctions.h"
16
17namespace ldndc {
18
28struct LDNDC_API BaseRootSystemDNDC
29{
30 virtual
32
37 virtual void reset( MoBiLE_Plant *) = 0;
38
43 virtual void
44 set_rooting_depth( unsigned int &, MoBiLE_Plant *, double,
45 double _max_rooting_depth = invalid_dbl) = 0;
46
51 virtual void
52 update_root_fraction_sigmoid( double /* adaption rate of fine roots distribution */,
53 unsigned int /* deepest rooted soillayer */,
54 double /* sigmoid curve parameter: min */,
55 double /* sigmoid curve parameter: max */,
56 double /* sigmoid curve parameter: width */,
57 double /* sigmoid curve parameter: height */,
58 MoBiLE_Plant * /* plant */) = 0;
59
64 virtual void
65 update_root_fraction_exponential( double /* adaption rate of fine roots distribution */,
66 unsigned int /* deepest rooted soillayer */,
67 double /* exponential factor */,
68 MoBiLE_Plant * /* plant */) = 0;
69
74 virtual void
75 update_roots_static( const double /* FTS_TOT_ */,
76 unsigned int &/* root_q_vt_ */,
77 MoBiLE_Plant * /* _vt */,
78 ldndc::growable_array < BaseRootSystemDNDC*, 1000, 1 > & /* root_system */,
79 double /*rootgrowthrestriction*/) = 0;
80
85 virtual void
86 specific_root_length( unsigned int const &/* root_q_vt_ */,
87 MoBiLE_Plant * /* _vt */,
88 lvector_t< double > &/*specifificrootlength*/) = 0;
89
94 virtual void
95 reduce_root_system( unsigned int &/* root_q_vt_ */,
96 MoBiLE_Plant * /* _vt */,
97 lvector_t< double > /*layerspecificmassreduction*/) = 0;
98
103 virtual void
104 reduce_root_system( unsigned int &/* root_q_vt_ */,
105 MoBiLE_Plant * /* _vt */,
106 double /* massreduction */) = 0;
107
112 virtual void
113 update_rootlength( unsigned int &/* root_q_vt_ */,
114 MoBiLE_Plant * /* _vt */,
115 double /* deltamass */) = 0;
116
121 virtual void
122 update_rootlength( unsigned int &/* root_q_vt_ */,
123 MoBiLE_Plant * /* _vt */,
124 lvector_t< double > /* deltamass in every rooted soil layer*/) = 0;
129 virtual void
130 update_roots_dynamic( const double /* FTS_TOT_ */,
131 unsigned int &/* root_q_vt_ */,
132 MoBiLE_Plant * /* _vt */,
133 double /* deltamassFrt */) = 0;
134
139 virtual lvector_t< double >
140 root_restrictions_coarse_fragments( unsigned int /* iterator_potentially_deepest_rooted_layer */) = 0;
141
146 virtual lvector_t< double >
147 root_restrictions_soil_strength( unsigned int /* iterator_potentially_deepest_rooted_layer */) = 0;
148
153 virtual lvector_t< double >
154 root_restrictions_aeration( unsigned int /* iterator_potentially_deepest_rooted_layer */,
155 MoBiLE_Plant * /* _vt */) = 0;
156
161 virtual lvector_t< double >
162 root_restrictions_temperature( unsigned int /* iterator_potentially_deepest_rooted_layer */,
163 MoBiLE_Plant * /* _vt */) = 0;
164
169 virtual void
170 update_rooting_depth( const double /*target_rooting_depth*/,
171 double &/* layerrestrictions */,
172 unsigned int & /* root_q_vt_ */,
173 MoBiLE_Plant * /* _vt */) = 0;
174
180 virtual void
181 target_rooting_depth_increase( double &_rooting_depth_increase,
182 unsigned int &_sl_min_no_roots,
183 double const _dt_per_day,
184 MoBiLE_Plant* const _p) = 0;
185
190 virtual void
191 nitrogen_uptake( unsigned int _deepest_rooted_layer,
192 double &n_plant,
193 double n_opt,
194 double _fts_tot,
195 lvector_t< double > _no3_sl,
196 lvector_t< double > _no3_uptake_sl,
197 lvector_t< double > _nh4_sl,
198 lvector_t< double > _nh4_uptake_sl,
199 lvector_t< double > _don_sl,
200 lvector_t< double > _don_uptake_sl,
201 lvector_t< double > _temp_sl,
202 MoBiLE_Plant * /* plant */) = 0;
203};
204
205
211struct LDNDC_API RootSystemDNDC : public BaseRootSystemDNDC
212{
214 RootSystemDNDC( MoBiLE_State *, cbm::io_kcomm_t *);
216
218 input_class_soillayers_t const * m_soillayers;
219
221 LD_PlantFunctions m_pf;
223 substate_soilchemistry_t & sc_;
225 substate_microclimate_t & mc_;
227 substate_physiology_t & ph_;
229 substate_watercycle_t & wc_;
231 MoBiLE_PlantVegetation * m_veg;
232
233 void reset( MoBiLE_Plant *);
234
235 void
236 set_rooting_depth( unsigned int &, MoBiLE_Plant *,
237 double, double _max_rooting_depth = invalid_dbl);
238
239 void
240 update_root_fraction_sigmoid( double /* adaption rate of fine roots distribution */,
241 unsigned int /* deepest rooted soillayer */,
242 double /* sigmoid curve parameter: min */,
243 double /* sigmoid curve parameter: max */,
244 double /* sigmoid curve parameter: width */,
245 double /* sigmoid curve parameter: height */,
246 MoBiLE_Plant * /* plant */);
247
249 template <class _S>
250 void
251 update_root_fraction_sigmoid( double /* adaption rate of fine roots distribution */,
252 unsigned int /* deepest rooted soillayer */,
253 double /* sigmoid curve parameter: min */,
254 double /* sigmoid curve parameter: max */,
255 double /* sigmoid curve parameter: width */,
256 double /* sigmoid curve parameter: height */,
257 _S _fFrt_sl,
258 unsigned int nb_layers);
259
260 void
261 update_root_fraction_exponential( double /* adaption rate of fine roots distribution */,
262 unsigned int /* deepest rooted soillayer */,
263 double /* exponential factor */,
264 MoBiLE_Plant * /* plant */);
266 template <class _S>
267 void
268 update_root_fraction_exponential( double /* adaption rate of fine roots distribution */,
269 unsigned int /* deepest rooted soillayer */,
270 double /* exponential factor */,
271 _S _fFrt_sl,
272 unsigned int nb_layers);
273
274 void
275 update_roots_static( const double /* FTS_TOT_ */,
276 unsigned int &/* root_q_vt_ */,
277 MoBiLE_Plant * /* _vt */,
278 ldndc::growable_array < BaseRootSystemDNDC*, 1000, 1 > &/* root_system */,
279 double /* rootgrowthrestriction */);
280 void
281 specific_root_length( unsigned int const &/* root_q_vt_ */,
282 MoBiLE_Plant * /* _vt */,
283 lvector_t< double > &/*specifificrootlength*/);
284
285 void
286 reduce_root_system( unsigned int &/* root_q_vt_ */,
287 MoBiLE_Plant * /* _vt */,
288 double /* massreduction */);
289
290 void
291 reduce_root_system( unsigned int &/* root_q_vt_ */,
292 MoBiLE_Plant * /* _vt */,
293 lvector_t< double > /*layerspecificmassreduction*/);
294
295 void
296 update_rootlength( unsigned int &/* root_q_vt_ */,
297 MoBiLE_Plant * /* _vt */,
298 double /* deltamass */);
299 void
300 update_rootlength( unsigned int &/* root_q_vt_ */,
301 MoBiLE_Plant * /* _vt */,
302 lvector_t< double > /* deltamass in every rooted soil layer */);
303
304 void
305 update_roots_dynamic( const double /* FTS_TOT_ */,
306 unsigned int &/* root_q_vt_ */,
307 MoBiLE_Plant * /* _vt */,
308 double /* deltamassFrt */);
309
310 lvector_t< double >
311 root_restrictions_coarse_fragments( unsigned int /* iterator_potentially_deepest_rooted_layer */);
312 lvector_t< double >
313 root_restrictions_soil_strength( unsigned int /* iterator_potentially_deepest_rooted_layer */);
314
315 lvector_t< double >
316 root_restrictions_aeration( unsigned int /* iterator_potentially_deepest_rooted_layer */,
317 MoBiLE_Plant * /* _vt */);
318
319 lvector_t< double >
320 root_restrictions_temperature( unsigned int /* iterator_potentially_deepest_rooted_layer */,
321 MoBiLE_Plant * /* _vt */);
322
323 void
324 update_rooting_depth( const double /*target_rooting_depth*/,
325 double &/* layerrestrictions */,
326 unsigned int & /* root_q_vt_ */,
327 MoBiLE_Plant * /* _vt */);
328
329 void
330 target_rooting_depth_increase( double &_rooting_depth_increase,
331 unsigned int &_sl_min_no_roots,
332 double const _dt_per_day,
333 MoBiLE_Plant* const _p);
334
336 unsigned int
337 first_layer_below( double /* rooting depth */) const;
338
339
340 void
341 nitrogen_uptake( unsigned int _deepest_rooted_layer,
342 double &n_plant,
343 double n_opt,
344 double _fts_tot,
345 lvector_t< double > _no3_sl,
346 lvector_t< double > _no3_uptake_sl,
347 lvector_t< double > _nh4_sl,
348 lvector_t< double > _nh4_uptake_sl,
349 lvector_t< double > _don_sl,
350 lvector_t< double > _don_uptake_sl,
351 lvector_t< double > _temp_sl,
352 MoBiLE_Plant * /* plant */);
353};
354
355}
356
357#endif /* !LD_ROOTSYSTEM_H_ */
Spatially explicit groundwater model.
Definition airchemistryput.h:15
Interface of the fine root system of a plant: rooting depth, distribution of fine root mass and lengt...
Definition ld_rootsystem.h:29
virtual void reduce_root_system(unsigned int &, MoBiLE_Plant *, double)=0
Removes root mass uniformly from all layers; the distribution is kept, root length is reduced.
virtual void update_roots_static(const double, unsigned int &, MoBiLE_Plant *, ldndc::growable_array< BaseRootSystemDNDC *, 1000, 1 > &, double)=0
Root growth of one time step, static approach (Static root growth model).
virtual void specific_root_length(unsigned int const &, MoBiLE_Plant *, lvector_t< double > &)=0
Specific root length of every rooted layer (Root length and density).
virtual void update_rootlength(unsigned int &, MoBiLE_Plant *, lvector_t< double >)=0
Root length change for root mass changes of individual layers (before the mass is changed).
virtual void update_rootlength(unsigned int &, MoBiLE_Plant *, double)=0
Root length change for a root mass change of the whole root system (before the mass is changed).
virtual void reset(MoBiLE_Plant *)=0
Resets rooting depth, fine root mass and fine root distribution of a plant.
virtual void set_rooting_depth(unsigned int &, MoBiLE_Plant *, double, double _max_rooting_depth=invalid_dbl)=0
Sets the rooting depth (bounded by a maximum or ZRTMC) and the number of rooted layers.
virtual void update_rooting_depth(const double, double &, unsigned int &, MoBiLE_Plant *)=0
Increases the rooting depth by the restricted target increment and updates the number of rooted layer...
virtual void nitrogen_uptake(unsigned int _deepest_rooted_layer, double &n_plant, double n_opt, double _fts_tot, lvector_t< double > _no3_sl, lvector_t< double > _no3_uptake_sl, lvector_t< double > _nh4_sl, lvector_t< double > _nh4_uptake_sl, lvector_t< double > _don_sl, lvector_t< double > _don_uptake_sl, lvector_t< double > _temp_sl, MoBiLE_Plant *)=0
Uptake of NH4, NO3 and DON from the rooted layers (Nitrogen uptake).
virtual void update_roots_dynamic(const double, unsigned int &, MoBiLE_Plant *, double)=0
Root growth of one time step, dynamic approach (Dynamic root growth model).
virtual void update_root_fraction_exponential(double, unsigned int, double, MoBiLE_Plant *)=0
Updates the fine root distribution with the exponential shape (Exponential root distribution).
virtual void reduce_root_system(unsigned int &, MoBiLE_Plant *, lvector_t< double >)=0
Removes root mass from individual layers; root length, total mass and distribution are updated.
virtual lvector_t< double > root_restrictions_soil_strength(unsigned int)=0
Root growth restriction by soil strength (bulk density, water content) for every layer [0-1].
virtual lvector_t< double > root_restrictions_aeration(unsigned int, MoBiLE_Plant *)=0
Root growth restriction by oxygen shortage (hypoxia) for every layer [0-1].
virtual lvector_t< double > root_restrictions_temperature(unsigned int, MoBiLE_Plant *)=0
Root growth restriction by soil temperature for every layer [0-1].
virtual void update_root_fraction_sigmoid(double, unsigned int, double, double, double, double, MoBiLE_Plant *)=0
Updates the fine root distribution with the sigmoid shape (Sigmoid root distribution).
virtual void target_rooting_depth_increase(double &_rooting_depth_increase, unsigned int &_sl_min_no_roots, double const _dt_per_day, MoBiLE_Plant *const _p)=0
Target increase of the rooting depth under optimum conditions (Target rooting depth).
virtual lvector_t< double > root_restrictions_coarse_fragments(unsigned int)=0
Root growth restriction by coarse fragments (stones) for every layer [0-1].
void target_rooting_depth_increase(double &_rooting_depth_increase, unsigned int &_sl_min_no_roots, double const _dt_per_day, MoBiLE_Plant *const _p)
Target increase of the rooting depth under optimum conditions (Target rooting depth).
Definition ld_rootsystem.cpp:491
void nitrogen_uptake(unsigned int _deepest_rooted_layer, double &n_plant, double n_opt, double _fts_tot, lvector_t< double > _no3_sl, lvector_t< double > _no3_uptake_sl, lvector_t< double > _nh4_sl, lvector_t< double > _nh4_uptake_sl, lvector_t< double > _don_sl, lvector_t< double > _don_uptake_sl, lvector_t< double > _temp_sl, MoBiLE_Plant *)
Uptake of NH4, NO3 and DON from the rooted layers (Nitrogen uptake).
Definition ld_rootsystem.cpp:1240
input_class_soillayers_t const * m_soillayers
soil layer input (number of layers)
Definition ld_rootsystem.h:218
void set_rooting_depth(unsigned int &, MoBiLE_Plant *, double, double _max_rooting_depth=invalid_dbl)
Sets the rooting depth, limited by a given maximum or, if none is given, by the species parameter ZRT...
Definition ld_rootsystem.cpp:581
substate_microclimate_t & mc_
microclimate state (soil temperature)
Definition ld_rootsystem.h:225
unsigned int first_layer_below(double) const
Number of rooted soil layers for a given rooting depth [m].
Definition ld_rootsystem.cpp:528
RootSystemDNDC(MoBiLE_State *, cbm::io_kcomm_t *)
Connects the root system to the model state (soil, microclimate, water, vegetation).
Definition ld_rootsystem.cpp:51
void update_roots_dynamic(const double, unsigned int &, MoBiLE_Plant *, double)
Root growth of one time step with the dynamic approach (Dynamic root growth model).
Definition ld_rootsystem.cpp:230
void update_root_fraction_sigmoid(double, unsigned int, double, double, double, double, MoBiLE_Plant *)
Updates the fine root distribution of a plant with the sigmoid shape (Sigmoid root distribution).
Definition ld_rootsystem.cpp:871
void update_roots_static(const double, unsigned int &, MoBiLE_Plant *, ldndc::growable_array< BaseRootSystemDNDC *, 1000, 1 > &, double)
Root growth of one time step with the static approach (Static root growth model).
Definition ld_rootsystem.cpp:121
void update_rootlength(unsigned int &, MoBiLE_Plant *, double)
Root length change for a root mass change of the whole root system, which is distributed over the lay...
Definition ld_rootsystem.cpp:1099
lvector_t< double > root_restrictions_soil_strength(unsigned int)
Root growth restriction by soil strength for every layer (Root growth restrictions).
Definition ld_rootsystem.cpp:677
void specific_root_length(unsigned int const &, MoBiLE_Plant *, lvector_t< double > &)
Specific root length of every evaluated layer (Root length and density).
Definition ld_rootsystem.cpp:1072
lvector_t< double > root_restrictions_coarse_fragments(unsigned int)
Root growth restriction by coarse fragments (stones) for every layer (Root growth restrictions).
Definition ld_rootsystem.cpp:628
MoBiLE_PlantVegetation * m_veg
vegetation
Definition ld_rootsystem.h:231
void reduce_root_system(unsigned int &, MoBiLE_Plant *, double)
Removes root mass uniformly from all layers (respiration, exudation); the root distribution stays the...
Definition ld_rootsystem.cpp:1164
lvector_t< double > root_restrictions_temperature(unsigned int, MoBiLE_Plant *)
Root growth restriction by soil temperature for every layer (Root growth restrictions).
Definition ld_rootsystem.cpp:795
void reset(MoBiLE_Plant *)
Resets rooting depth, fine root mass and the fine root distribution across soil layers of a plant to ...
Definition ld_rootsystem.cpp:76
void update_root_fraction_exponential(double, unsigned int, double, MoBiLE_Plant *)
Updates the fine root distribution of a plant with the exponential shape (Exponential root distributi...
Definition ld_rootsystem.cpp:976
substate_soilchemistry_t & sc_
soil state (layer depths and thicknesses, stones, density, texture)
Definition ld_rootsystem.h:223
LD_PlantFunctions m_pf
plant functions (e.g., temperature dependency of nitrogen uptake)
Definition ld_rootsystem.h:221
substate_physiology_t & ph_
physiology state
Definition ld_rootsystem.h:227
substate_watercycle_t & wc_
water state (water content, wilting point, field capacity)
Definition ld_rootsystem.h:229
void update_rooting_depth(const double, double &, unsigned int &, MoBiLE_Plant *)
Increases the rooting depth by the restricted target increment (step 4 of the Dynamic root growth mod...
Definition ld_rootsystem.cpp:552
lvector_t< double > root_restrictions_aeration(unsigned int, MoBiLE_Plant *)
Root growth restriction by oxygen shortage for every layer (Root growth restrictions).
Definition ld_rootsystem.cpp:750