LandscapeDNDC 1.37.0
Loading...
Searching...
No Matches
ld_rootsystem.h
1/*
2 * SPDX-FileCopyrightText: Karlsruhe Institute of Technology (KIT)
3 * SPDX-License-Identifier: LicenseRef-LandscapeDNDC
4 * This file is part of LandscapeDNDC. See LICENSE.
5 */
15
16#ifndef LD_ROOTSYSTEM_H_
17#define LD_ROOTSYSTEM_H_
18
19#include "state/mbe_state.h"
20#include "physiology/ld_plantfunctions.h"
21
22namespace ldndc {
23
33struct LDNDC_API BaseRootSystemDNDC
34{
35 virtual
37
42 virtual void reset( MoBiLE_Plant *) = 0;
43
48 virtual void
49 set_rooting_depth( unsigned int &, MoBiLE_Plant *, double,
50 double _max_rooting_depth = invalid_dbl) = 0;
51
56 virtual void
57 update_root_fraction_sigmoid( double /* adaption rate of fine roots distribution */,
58 unsigned int /* deepest rooted soillayer */,
59 double /* sigmoid curve parameter: min */,
60 double /* sigmoid curve parameter: max */,
61 double /* sigmoid curve parameter: width */,
62 double /* sigmoid curve parameter: height */,
63 MoBiLE_Plant * /* plant */) = 0;
64
69 virtual void
70 update_root_fraction_exponential( double /* adaption rate of fine roots distribution */,
71 unsigned int /* deepest rooted soillayer */,
72 double /* exponential factor */,
73 MoBiLE_Plant * /* plant */) = 0;
74
79 virtual void
80 update_roots_static( const double /* FTS_TOT_ */,
81 unsigned int &/* root_q_vt_ */,
82 MoBiLE_Plant * /* _vt */,
83 ldndc::growable_array < BaseRootSystemDNDC*, 1000, 1 > & /* root_system */,
84 double /*rootgrowthrestriction*/) = 0;
85
90 virtual void
91 specific_root_length( unsigned int const &/* root_q_vt_ */,
92 MoBiLE_Plant * /* _vt */,
93 lvector_t< double > &/*specifificrootlength*/) = 0;
94
99 virtual void
100 reduce_root_system( unsigned int &/* root_q_vt_ */,
101 MoBiLE_Plant * /* _vt */,
102 lvector_t< double > /*layerspecificmassreduction*/) = 0;
103
108 virtual void
109 reduce_root_system( unsigned int &/* root_q_vt_ */,
110 MoBiLE_Plant * /* _vt */,
111 double /* massreduction */) = 0;
112
117 virtual void
118 update_rootlength( unsigned int &/* root_q_vt_ */,
119 MoBiLE_Plant * /* _vt */,
120 double /* deltamass */) = 0;
121
126 virtual void
127 update_rootlength( unsigned int &/* root_q_vt_ */,
128 MoBiLE_Plant * /* _vt */,
129 lvector_t< double > /* deltamass in every rooted soil layer*/) = 0;
134 virtual void
135 update_roots_dynamic( const double /* FTS_TOT_ */,
136 unsigned int &/* root_q_vt_ */,
137 MoBiLE_Plant * /* _vt */,
138 double /* deltamassFrt */) = 0;
139
144 virtual lvector_t< double >
145 root_restrictions_coarse_fragments( unsigned int /* iterator_potentially_deepest_rooted_layer */) = 0;
146
151 virtual lvector_t< double >
152 root_restrictions_soil_strength( unsigned int /* iterator_potentially_deepest_rooted_layer */) = 0;
153
158 virtual lvector_t< double >
159 root_restrictions_aeration( unsigned int /* iterator_potentially_deepest_rooted_layer */,
160 MoBiLE_Plant * /* _vt */) = 0;
161
166 virtual lvector_t< double >
167 root_restrictions_temperature( unsigned int /* iterator_potentially_deepest_rooted_layer */,
168 MoBiLE_Plant * /* _vt */) = 0;
169
174 virtual void
175 update_rooting_depth( const double /*target_rooting_depth*/,
176 double &/* layerrestrictions */,
177 unsigned int & /* root_q_vt_ */,
178 MoBiLE_Plant * /* _vt */) = 0;
179
185 virtual void
186 target_rooting_depth_increase( double &_rooting_depth_increase,
187 unsigned int &_sl_min_no_roots,
188 double const _dt_per_day,
189 MoBiLE_Plant* const _p) = 0;
190
195 virtual void
196 nitrogen_uptake( unsigned int _deepest_rooted_layer,
197 double &n_plant,
198 double n_opt,
199 double _fts_tot,
200 lvector_t< double > _no3_sl,
201 lvector_t< double > _no3_uptake_sl,
202 lvector_t< double > _nh4_sl,
203 lvector_t< double > _nh4_uptake_sl,
204 lvector_t< double > _don_sl,
205 lvector_t< double > _don_uptake_sl,
206 lvector_t< double > _temp_sl,
207 MoBiLE_Plant * /* plant */) = 0;
208};
209
210
216struct LDNDC_API RootSystemDNDC : public BaseRootSystemDNDC
217{
219 RootSystemDNDC( MoBiLE_State *, cbm::io_kcomm_t *);
221
223 input_class_soillayers_t const * m_soillayers;
224
226 LD_PlantFunctions m_pf;
228 substate_soilchemistry_t & sc_;
230 substate_microclimate_t & mc_;
232 substate_physiology_t & ph_;
234 substate_watercycle_t & wc_;
236 MoBiLE_PlantVegetation * m_veg;
237
238 void reset( MoBiLE_Plant *);
239
240 void
241 set_rooting_depth( unsigned int &, MoBiLE_Plant *,
242 double, double _max_rooting_depth = invalid_dbl);
243
244 void
245 update_root_fraction_sigmoid( double /* adaption rate of fine roots distribution */,
246 unsigned int /* deepest rooted soillayer */,
247 double /* sigmoid curve parameter: min */,
248 double /* sigmoid curve parameter: max */,
249 double /* sigmoid curve parameter: width */,
250 double /* sigmoid curve parameter: height */,
251 MoBiLE_Plant * /* plant */);
252
254 template <class _S>
255 void
256 update_root_fraction_sigmoid( double /* adaption rate of fine roots distribution */,
257 unsigned int /* deepest rooted soillayer */,
258 double /* sigmoid curve parameter: min */,
259 double /* sigmoid curve parameter: max */,
260 double /* sigmoid curve parameter: width */,
261 double /* sigmoid curve parameter: height */,
262 _S _fFrt_sl,
263 unsigned int nb_layers);
264
265 void
266 update_root_fraction_exponential( double /* adaption rate of fine roots distribution */,
267 unsigned int /* deepest rooted soillayer */,
268 double /* exponential factor */,
269 MoBiLE_Plant * /* plant */);
271 template <class _S>
272 void
273 update_root_fraction_exponential( double /* adaption rate of fine roots distribution */,
274 unsigned int /* deepest rooted soillayer */,
275 double /* exponential factor */,
276 _S _fFrt_sl,
277 unsigned int nb_layers);
278
279 void
280 update_roots_static( const double /* FTS_TOT_ */,
281 unsigned int &/* root_q_vt_ */,
282 MoBiLE_Plant * /* _vt */,
283 ldndc::growable_array < BaseRootSystemDNDC*, 1000, 1 > &/* root_system */,
284 double /* rootgrowthrestriction */);
285 void
286 specific_root_length( unsigned int const &/* root_q_vt_ */,
287 MoBiLE_Plant * /* _vt */,
288 lvector_t< double > &/*specifificrootlength*/);
289
290 void
291 reduce_root_system( unsigned int &/* root_q_vt_ */,
292 MoBiLE_Plant * /* _vt */,
293 double /* massreduction */);
294
295 void
296 reduce_root_system( unsigned int &/* root_q_vt_ */,
297 MoBiLE_Plant * /* _vt */,
298 lvector_t< double > /*layerspecificmassreduction*/);
299
300 void
301 update_rootlength( unsigned int &/* root_q_vt_ */,
302 MoBiLE_Plant * /* _vt */,
303 double /* deltamass */);
304 void
305 update_rootlength( unsigned int &/* root_q_vt_ */,
306 MoBiLE_Plant * /* _vt */,
307 lvector_t< double > /* deltamass in every rooted soil layer */);
308
309 void
310 update_roots_dynamic( const double /* FTS_TOT_ */,
311 unsigned int &/* root_q_vt_ */,
312 MoBiLE_Plant * /* _vt */,
313 double /* deltamassFrt */);
314
315 lvector_t< double >
316 root_restrictions_coarse_fragments( unsigned int /* iterator_potentially_deepest_rooted_layer */);
317 lvector_t< double >
318 root_restrictions_soil_strength( unsigned int /* iterator_potentially_deepest_rooted_layer */);
320 lvector_t< double >
321 root_restrictions_bulk_density( unsigned int /* iterator_potentially_deepest_rooted_layer */);
323 lvector_t< double >
324 root_relative_water_content( unsigned int /* iterator_potentially_deepest_rooted_layer */);
325
326 lvector_t< double >
327 root_restrictions_aeration( unsigned int /* iterator_potentially_deepest_rooted_layer */,
328 MoBiLE_Plant * /* _vt */);
329
330 lvector_t< double >
331 root_restrictions_temperature( unsigned int /* iterator_potentially_deepest_rooted_layer */,
332 MoBiLE_Plant * /* _vt */);
333
334 void
335 update_rooting_depth( const double /*target_rooting_depth*/,
336 double &/* layerrestrictions */,
337 unsigned int & /* root_q_vt_ */,
338 MoBiLE_Plant * /* _vt */);
339
340 void
341 target_rooting_depth_increase( double &_rooting_depth_increase,
342 unsigned int &_sl_min_no_roots,
343 double const _dt_per_day,
344 MoBiLE_Plant* const _p);
345
347 unsigned int
348 first_layer_below( double /* rooting depth */) const;
349
350
351 void
352 nitrogen_uptake( unsigned int _deepest_rooted_layer,
353 double &n_plant,
354 double n_opt,
355 double _fts_tot,
356 lvector_t< double > _no3_sl,
357 lvector_t< double > _no3_uptake_sl,
358 lvector_t< double > _nh4_sl,
359 lvector_t< double > _nh4_uptake_sl,
360 lvector_t< double > _don_sl,
361 lvector_t< double > _don_uptake_sl,
362 lvector_t< double > _temp_sl,
363 MoBiLE_Plant * /* plant */);
364};
365
366}
367
368#endif /* !LD_ROOTSYSTEM_H_ */
Spatially explicit groundwater model.
Definition airchemistryput.h:21
Interface of the fine root system of a plant: rooting depth, distribution of fine root mass and lengt...
Definition ld_rootsystem.h:34
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:554
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:1360
input_class_soillayers_t const * m_soillayers
soil layer input (number of layers)
Definition ld_rootsystem.h:223
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:658
substate_microclimate_t & mc_
microclimate state (soil temperature)
Definition ld_rootsystem.h:230
unsigned int first_layer_below(double) const
Number of rooted soil layers for a given rooting depth [m].
Definition ld_rootsystem.cpp:605
lvector_t< double > root_relative_water_content(unsigned int)
Relative water content between wilting point and field capacity for every layer [0-1].
Definition ld_rootsystem.cpp:826
RootSystemDNDC(MoBiLE_State *, cbm::io_kcomm_t *)
Connects the root system to the model state (soil, microclimate, water, vegetation).
Definition ld_rootsystem.cpp:56
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:246
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:991
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:126
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:1219
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:765
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:1192
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:705
lvector_t< double > root_restrictions_bulk_density(unsigned int)
Bulk density part of the soil strength restriction for every layer [0-1].
Definition ld_rootsystem.cpp:791
MoBiLE_PlantVegetation * m_veg
vegetation
Definition ld_rootsystem.h:236
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:1284
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:915
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:81
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:1096
substate_soilchemistry_t & sc_
soil state (layer depths and thicknesses, stones, density, texture)
Definition ld_rootsystem.h:228
LD_PlantFunctions m_pf
plant functions (e.g., temperature dependency of nitrogen uptake)
Definition ld_rootsystem.h:226
substate_physiology_t & ph_
physiology state
Definition ld_rootsystem.h:232
substate_watercycle_t & wc_
water state (water content, wilting point, field capacity)
Definition ld_rootsystem.h:234
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:629
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:870