LandscapeDNDC 1.37.0
Loading...
Searching...
No Matches
ldndc::RootSystemDNDC Struct Reference

Fine root system used by PlaMox and, for the distribution functions and nitrogen uptake, by other physiology modules (see Root system). More...

#include <models/physiology/ld_rootsystem.h>

Inheritance diagram for ldndc::RootSystemDNDC:
Collaboration diagram for ldndc::RootSystemDNDC:

Public Member Functions

 RootSystemDNDC (MoBiLE_State *, cbm::io_kcomm_t *)
 Connects the root system to the model state (soil, microclimate, water, vegetation).
 
void reset (MoBiLE_Plant *)
 Resets rooting depth, fine root mass and the fine root distribution across soil layers of a plant to zero.
 
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 ZRTMC, and determines the number of rooted layers.
 
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).
 
template<class _S>
void update_root_fraction_sigmoid (double, unsigned int, double, double, double, double, _S _fFrt_sl, unsigned int nb_layers)
 Sigmoid root distribution applied to an arbitrary array of root fractions.
 
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 distribution).
 
template<class _S>
void update_root_fraction_exponential (double, unsigned int, double, _S _fFrt_sl, unsigned int nb_layers)
 Exponential root distribution applied to an arbitrary array of root fractions.
 
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).
 
void specific_root_length (unsigned int const &, MoBiLE_Plant *, lvector_t< double > &)
 Specific root length of every evaluated layer (Root length and density).
 
void reduce_root_system (unsigned int &, MoBiLE_Plant *, double)
 Removes root mass uniformly from all layers (respiration, exudation); the root distribution stays the same and root length is reduced accordingly.
 
void reduce_root_system (unsigned int &, MoBiLE_Plant *, lvector_t< double >)
 Removes root mass from individual layers (e.g., senescence depending on layer conditions); root length, total root mass and the root distribution are updated.
 
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 layers according to the current fractions (see Root length and density).
 
void update_rootlength (unsigned int &, MoBiLE_Plant *, lvector_t< double >)
 Root length change for root mass changes of individual layers (see Root length and density).
 
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).
 
lvector_t< double > root_restrictions_coarse_fragments (unsigned int)
 Root growth restriction by coarse fragments (stones) for every layer (Root growth restrictions).
 
lvector_t< double > root_restrictions_soil_strength (unsigned int)
 Root growth restriction by soil strength for every layer (Root growth restrictions).
 
lvector_t< double > root_restrictions_bulk_density (unsigned int)
 Bulk density part of the soil strength restriction for every layer [0-1].
 
lvector_t< double > root_relative_water_content (unsigned int)
 Relative water content between wilting point and field capacity for every layer [0-1].
 
lvector_t< double > root_restrictions_aeration (unsigned int, MoBiLE_Plant *)
 Root growth restriction by oxygen shortage for every layer (Root growth restrictions).
 
lvector_t< double > root_restrictions_temperature (unsigned int, MoBiLE_Plant *)
 Root growth restriction by soil temperature for every layer (Root growth restrictions).
 
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 model) and updates the number of rooted layers.
 
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).
 
unsigned int first_layer_below (double) const
 Number of rooted soil layers for a given rooting depth [m].
 
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).
 

Public Attributes

input_class_soillayers_t const * m_soillayers
 soil layer input (number of layers)
 
LD_PlantFunctions m_pf
 plant functions (e.g., temperature dependency of nitrogen uptake)
 
substate_soilchemistry_t & sc_
 soil state (layer depths and thicknesses, stones, density, texture)
 
substate_microclimate_t & mc_
 microclimate state (soil temperature)
 
substate_physiology_t & ph_
 physiology state
 
substate_watercycle_t & wc_
 water state (water content, wilting point, field capacity)
 
MoBiLE_PlantVegetation * m_veg
 vegetation
 

Detailed Description

Fine root system used by PlaMox and, for the distribution functions and nitrogen uptake, by other physiology modules (see Root system).

Member Function Documentation

◆ first_layer_below()

unsigned int ldndc::RootSystemDNDC::first_layer_below ( double _rooting_depth) const

Number of rooted soil layers for a given rooting depth [m].

Number of rooted soil layers for a given rooting depth, i.e., the index of the first soil layer that does not hold any roots.

Layer depths are not commensurate with the root elongation, so the layer that contains the root tip counts as rooted. Used for the target and the actual rooting depth alike.

Parameters
_rooting_depthrooting depth [m]
Returns
number of rooted layers, at most the number of soil layers
606{
607 for ( size_t sl = 0; sl < m_soillayers->soil_layer_cnt(); ++sl)
608 {
609 if ( cbm::flt_greater( sc_.depth_sl[sl], _rooting_depth))
610 {
611 return static_cast< unsigned int >( sl+1);
612 }
613 }
614 return static_cast< unsigned int >( m_soillayers->soil_layer_cnt());
615}
input_class_soillayers_t const * m_soillayers
soil layer input (number of layers)
Definition ld_rootsystem.h:223
substate_soilchemistry_t & sc_
soil state (layer depths and thicknesses, stones, density, texture)
Definition ld_rootsystem.h:228

References m_soillayers, and sc_.

Referenced by set_rooting_depth(), target_rooting_depth_increase(), and update_rooting_depth().

Here is the caller graph for this function:

◆ nitrogen_uptake()

void ldndc::RootSystemDNDC::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 * _vt )
virtual

Uptake of NH4, NO3 and DON from the rooted layers (Nitrogen uptake).

Parameters
_deepest_rooted_layerindex of the deepest rooted layer (inclusive)
_n_plantplant nitrogen [kgN m-2] (updated)
_n_optoptimum plant nitrogen [kgN m-2]
_fts_totlength of the time step [d]
_no3_slnitrate of every layer [kgN m-2] (updated)
_no3_uptake_slnitrate uptake of every layer [kgN m-2] (accumulated)
_nh4_slammonium of every layer [kgN m-2] (updated)
_nh4_uptake_slammonium uptake of every layer [kgN m-2] (accumulated)
_don_sldissolved organic nitrogen of every layer [kgN m-2] (updated)
_don_uptake_slDON uptake of every layer [kgN m-2] (accumulated)
_temp_slsoil temperature of every layer [oC]
_vtplant

Implements ldndc::BaseRootSystemDNDC.

1372{
1373 /* Nitrogen status update */
1374 double const n_demand( _n_opt - _n_plant);
1375
1376 if ( cbm::flt_greater_zero( n_demand))
1377 {
1378 double n_up_total(0.0);
1379 for (size_t sl = 0; sl <= _deepest_rooted_layer; sl++)
1380 {
1381 double const mFrt( cbm::bound_min( 0.01, _vt->mFrt) * _vt->fFrt_sl[sl]);
1382 if ( !cbm::flt_greater_zero( mFrt))
1383 {
1384 break;
1385 }
1386
1387 // temperature dependency
1388 double const fact_t( m_pf.nitrogen_uptake_temperature_dependency(
1389 0.8 * (*_vt)->TLIMIT(),
1390 1.2 * (*_vt)->TLIMIT(),
1391 _temp_sl[sl]));
1392
1393 // potential uptake of NH4, NO3 and DON
1394 double const nh4_up( cbm::bound_max( (*_vt)->US_NH4() * mFrt * fact_t * _fts_tot
1395 * _nh4_sl[sl] / (_nh4_sl[sl] + (*_vt)->K_MM_NITROGEN_UPTAKE() * sc_.h_sl[sl]),
1396 0.9 * _nh4_sl[sl]));
1397 double const no3_up( cbm::bound_max( (*_vt)->US_NO3() * mFrt * fact_t * _fts_tot
1398 * _no3_sl[sl] / (_no3_sl[sl] + (*_vt)->K_MM_NITROGEN_UPTAKE() * sc_.h_sl[sl]),
1399 0.9 * _no3_sl[sl] ));
1400 double const don_up( cbm::bound_max( (*_vt)->US_NO3() * mFrt * fact_t * _fts_tot
1401 * _don_sl[sl] / (_don_sl[sl] + (*_vt)->K_MM_NITROGEN_UPTAKE() * sc_.h_sl[sl]),
1402 0.9 * _don_sl[sl]));
1403 n_up_total += nh4_up + no3_up + don_up;
1404 }
1405
1406
1407 double const scale( ( n_up_total > 0.0) ? cbm::bound_max(n_demand / n_up_total, 1.0) : 0.0);
1408
1409 if ( cbm::flt_greater_zero( scale))
1410 {
1411 for (size_t sl = 0; sl <= _deepest_rooted_layer; sl++)
1412 {
1413 double const mFrt( cbm::bound_min( 0.01, _vt->mFrt) * _vt->fFrt_sl[sl]);
1414
1415 if ( !cbm::flt_greater_zero( mFrt))
1416 {
1417 break;
1418 }
1419
1420 double const fact_t( m_pf.nitrogen_uptake_temperature_dependency(
1421 0.8 * (*_vt)->TLIMIT(),
1422 1.2 * (*_vt)->TLIMIT(),
1423 _temp_sl[sl]));
1424
1425 double const nh4_up( scale * cbm::bound_max( (*_vt)->US_NH4() * mFrt * fact_t * _fts_tot
1426 * _nh4_sl[sl] / (_nh4_sl[sl] + (*_vt)->K_MM_NITROGEN_UPTAKE() * sc_.h_sl[sl]),
1427 0.9 * _nh4_sl[sl]));
1428 double const no3_up( scale * cbm::bound_max( (*_vt)->US_NO3() * mFrt * fact_t * _fts_tot
1429 * _no3_sl[sl] / (_no3_sl[sl] + (*_vt)->K_MM_NITROGEN_UPTAKE() * sc_.h_sl[sl]),
1430 0.9 * _no3_sl[sl] ));
1431 double const don_up( scale * cbm::bound_max( (*_vt)->US_NO3() * mFrt * fact_t * _fts_tot
1432 * _don_sl[sl] / (_don_sl[sl] + (*_vt)->K_MM_NITROGEN_UPTAKE() * sc_.h_sl[sl]),
1433 0.9 * _don_sl[sl]));
1434 if ( cbm::flt_greater_zero( nh4_up))
1435 {
1436 _nh4_uptake_sl[sl] += nh4_up;
1437 _nh4_sl[sl] -= nh4_up;
1438 if ( _nh4_sl[sl] < 0.0)
1439 {
1440 _nh4_sl[sl] = 0.0;
1441 }
1442 _n_plant += nh4_up;
1443 }
1444
1445 if ( cbm::flt_greater_zero( no3_up))
1446 {
1447 _no3_uptake_sl[sl] += no3_up;
1448 _no3_sl[sl] -= no3_up;
1449 if ( _no3_sl[sl] < 0.0)
1450 {
1451 _no3_sl[sl] = 0.0;
1452 }
1453 _n_plant += no3_up;
1454 }
1455
1456 if ( cbm::flt_greater_zero(don_up))
1457 {
1458 _don_uptake_sl[sl] += don_up;
1459 _don_sl[sl] -= don_up;
1460 if ( _don_sl[sl] < 0.0)
1461 {
1462 _don_sl[sl] = 0.0;
1463 }
1464 _n_plant += don_up;
1465 }
1466 }
1467 }
1468 }
1469}
LD_PlantFunctions m_pf
plant functions (e.g., temperature dependency of nitrogen uptake)
Definition ld_rootsystem.h:226

References m_pf, and sc_.

◆ reduce_root_system() [1/2]

void ldndc::RootSystemDNDC::reduce_root_system ( unsigned int & _sl_below_roots,
MoBiLE_Plant * _p,
double _delta_dw_frt )
virtual

Removes root mass uniformly from all layers (respiration, exudation); the root distribution stays the same and root length is reduced accordingly.

Parameters
_sl_below_rootsnumber of rooted soil layers
_pplant
_delta_dw_frtroot mass loss [kgDW m-2] (> 0)

Implements ldndc::BaseRootSystemDNDC.

1287{
1288 //layer specific root length reduction
1289 update_rootlength( _sl_below_roots, _p, -_delta_dw_frt);
1290 //root mass reduction
1291 _p->mFrt -= _delta_dw_frt;
1292}
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

References update_rootlength().

Here is the call graph for this function:

◆ reduce_root_system() [2/2]

void ldndc::RootSystemDNDC::reduce_root_system ( unsigned int & _sl_below_roots,
MoBiLE_Plant * _p,
lvector_t< double > _delta_dw_frt_sl )
virtual

Removes root mass from individual layers (e.g., senescence depending on layer conditions); root length, total root mass and the root distribution are updated.

Parameters
_sl_below_rootsnumber of rooted soil layers
_pplant
_delta_dw_frt_slroot mass loss of every rooted layer [kgDW m-2] (> 0)

Implements ldndc::BaseRootSystemDNDC.

1308{
1309 //layer specific root length reduction
1310 update_rootlength( _sl_below_roots, _p, -_delta_dw_frt_sl);
1311
1312 //root mass reduction
1313 double const dw_frt_new( _p->mFrt - _delta_dw_frt_sl.sum());
1314 for ( size_t sl = 0; sl < _sl_below_roots; ++sl)
1315 {
1316 _p->fFrt_sl[sl] = (_p->mFrt * _p->fFrt_sl[sl] - _delta_dw_frt_sl[sl]) / dw_frt_new;
1317 }
1318 _p->mFrt = dw_frt_new;
1319}

References update_rootlength().

Here is the call graph for this function:

◆ reset()

void ldndc::RootSystemDNDC::reset ( MoBiLE_Plant * _p)
virtual

Resets rooting depth, fine root mass and the fine root distribution across soil layers of a plant to zero.

Note
Root length (rootlength_sl) is not reset here.

Implements ldndc::BaseRootSystemDNDC.

82{
83 _p->rooting_depth = 0.0;
84 _p->mFrt = 0.0;
85 for ( size_t sl = 0; sl < _p->nb_soillayers(); ++sl)
86 {
87 _p->fFrt_sl[sl] = 0.0;
88 }
89}

◆ root_relative_water_content()

lvector_t< double > ldndc::RootSystemDNDC::root_relative_water_content ( unsigned int _sl_no_roots)

Relative water content between wilting point and field capacity for every layer [0-1].

Relative water content between wilting point and field capacity, \( \theta_{f,i} = (\theta_i - \theta_{wp,i}) / (\theta_{fc,i} - \theta_{wp,i}) \) bounded to [0, 1].

Parameters
_sl_no_rootsnumber of soil layers to evaluate
Returns
relative water content for every evaluated layer [0-1]
827{
828 lvector_t< double > thetaf_sl( _sl_no_roots, 1.0);
829 for( unsigned int sl = 0; sl < _sl_no_roots; ++sl)
830 {
831 if( cbm::flt_greater( wc_.wc_wp_sl[sl], wc_.wc_sl[sl]))
832 {
833 thetaf_sl[sl] = 0.0;
834 }
835 else if( cbm::flt_greater_equal( wc_.wc_fc_sl[sl], wc_.wc_sl[sl]))
836 {
837 thetaf_sl[sl] = (wc_.wc_sl[sl] - wc_.wc_wp_sl[sl])/(wc_.wc_fc_sl[sl] - wc_.wc_wp_sl[sl]);
838 }
839 else
840 {
841 thetaf_sl[sl] = 1.0;
842 }
843 }
844 return thetaf_sl;
845}
substate_watercycle_t & wc_
water state (water content, wilting point, field capacity)
Definition ld_rootsystem.h:234

References wc_.

Referenced by root_restrictions_soil_strength(), and update_roots_dynamic().

Here is the caller graph for this function:

◆ root_restrictions_aeration()

lvector_t< double > ldndc::RootSystemDNDC::root_restrictions_aeration ( unsigned int _sl_no_roots,
MoBiLE_Plant * _p )
virtual

Root growth restriction by oxygen shortage for every layer (Root growth restrictions).

Parameters
_sl_no_rootsnumber of soil layers to evaluate
_pplant
Returns
restriction for every evaluated layer [0-1]

Implements ldndc::BaseRootSystemDNDC.

872{
873 lvector_t< double > layer_restrictions( _sl_no_roots, 1.0);
874 // new version employing O2 content in soil directly rather than water filled pore space
875 for( unsigned int sl = 0; sl < _sl_no_roots; ++sl)
876 {
877 if ( !cbm::flt_greater_zero( (*_p)->RS_CONDUCT()))
878 {
879 layer_restrictions[sl] = cbm::bound_min( 0.0, 1.0 - _p->hypoxia_sl[sl]);
880 }
881 }
882
883 return layer_restrictions;
884}

Referenced by update_roots_dynamic().

Here is the caller graph for this function:

◆ root_restrictions_bulk_density()

lvector_t< double > ldndc::RootSystemDNDC::root_restrictions_bulk_density ( unsigned int _sl_no_roots)

Bulk density part of the soil strength restriction for every layer [0-1].

Bulk density part \( S_{BD,i} \) of the soil strength restriction (Root growth restrictions).

Parameters
_sl_no_rootsnumber of soil layers to evaluate
Returns
restriction for every evaluated layer [0-1]
792{
793 lvector_t< double > layer_restrictions( _sl_no_roots, 1.0);
794 for( unsigned int sl = 0; sl < _sl_no_roots; ++sl)
795 {
796 // limits for structured field soil via clay content (fine earth)
797 double const bdo( 1.72 - 0.6 * sc_.clay_sl[sl]);
798 double const bdx( 1.85 - 0.7 * sc_.clay_sl[sl]);
799 // Reduction due to stones is already contained in coarse fragments.
800 double const density_without_stones( (sc_.dens_sl[sl] - sc_.stone_frac_sl[sl] * cbm::DMIN) / (1. - sc_.stone_frac_sl[sl]));
801 if( cbm::flt_greater( density_without_stones, bdo))
802 {
803 if( cbm::flt_greater( density_without_stones, bdx))
804 {
805 layer_restrictions[sl] = 0.0;
806 }
807 else
808 {
809 layer_restrictions[sl] = (bdx - density_without_stones)/(bdx-bdo);
810 }
811 }
812 }
813 return layer_restrictions;
814}

References sc_.

Referenced by root_restrictions_soil_strength(), and update_roots_dynamic().

Here is the caller graph for this function:

◆ root_restrictions_coarse_fragments()

lvector_t< double > ldndc::RootSystemDNDC::root_restrictions_coarse_fragments ( unsigned int _sl_no_roots)
virtual

Root growth restriction by coarse fragments (stones) for every layer (Root growth restrictions).

Parameters
_sl_no_rootsnumber of soil layers to evaluate
Returns
restriction for every evaluated layer [0-1]

Implements ldndc::BaseRootSystemDNDC.

706{
707 lvector_t< double > layer_restrictions( _sl_no_roots, 1.0);
708 for( unsigned int sl = 0; sl < _sl_no_roots; ++sl)
709 {
710 layer_restrictions[sl] = 1.0 - sc_.stone_frac_sl[sl];
711 }
712 return layer_restrictions;
713}

References sc_.

Referenced by update_roots_dynamic().

Here is the caller graph for this function:

◆ root_restrictions_soil_strength()

lvector_t< double > ldndc::RootSystemDNDC::root_restrictions_soil_strength ( unsigned int _sl_no_roots)
virtual

Root growth restriction by soil strength for every layer (Root growth restrictions).

Parameters
_sl_no_rootsnumber of soil layers to evaluate
Returns
restriction for every evaluated layer [0-1]

Implements ldndc::BaseRootSystemDNDC.

766{
767 lvector_t< double > layer_restrictions = root_restrictions_bulk_density( _sl_no_roots);
768 lvector_t< double > const thetaf_sl = root_relative_water_content( _sl_no_roots);
769 for( unsigned int sl = 0; sl < _sl_no_roots; ++sl)
770 {
771 // take water content into account (soil hardening)
772 layer_restrictions[sl] *= sin( cbm::PI/2. * thetaf_sl[sl]);
773 if( !cbm::flt_in_range_lu( 0., layer_restrictions[sl], 1.))
774 {
775 LOGERROR( "layerrestriction soil strength in layer ", sl, " < 0 or > 1: ", layer_restrictions[sl]);
776 }
777 }
778
779 return layer_restrictions;
780}
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
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

References root_relative_water_content(), and root_restrictions_bulk_density().

Referenced by update_roots_dynamic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ root_restrictions_temperature()

lvector_t< double > ldndc::RootSystemDNDC::root_restrictions_temperature ( unsigned int _sl_no_roots,
MoBiLE_Plant *  )
virtual

Root growth restriction by soil temperature for every layer (Root growth restrictions).

Parameters
_sl_no_rootsnumber of soil layers to evaluate
Returns
restriction for every evaluated layer [0-1]

Implements ldndc::BaseRootSystemDNDC.

917{
918 double const t_min( 0.0);//(*_p)->TLIMIT());
919 double const t_max( 45.0);
920 lvector_t< double > layer_restrictions( _sl_no_roots, 1.0);
921 for( unsigned int sl = 0; sl < _sl_no_roots; ++sl)
922 {
923 if( cbm::flt_greater( t_min, mc_.temp_sl[sl]))
924 {
925 layer_restrictions[sl] = 0.0;
926 }
927 else
928 {
929 if( cbm::flt_greater( t_max, mc_.temp_sl[sl]))
930 {
931 double const Topt( t_min + (t_max - t_min) / 2.0);
932 layer_restrictions[sl] = sin( cbm::PI / 2.0 * (mc_.temp_sl[sl] - t_min) /
933 (Topt - t_min));
934 }
935 else
936 {
937 layer_restrictions[sl] = 0.0;
938 }
939 }
940 if( !cbm::flt_in_range_lu( 0., layer_restrictions[sl], 1.))
941 {
942 LOGERROR( "layerrestriction temperature in layer ", sl, " < 0 or > 1: ", layer_restrictions[sl]);
943 }
944 }
945
946 return layer_restrictions;
947}
substate_microclimate_t & mc_
microclimate state (soil temperature)
Definition ld_rootsystem.h:230

References mc_.

Referenced by update_roots_dynamic().

Here is the caller graph for this function:

◆ set_rooting_depth()

void ldndc::RootSystemDNDC::set_rooting_depth ( unsigned int & _root_q_vt,
MoBiLE_Plant * _p,
double _rooting_depth,
double _max_rooting_depth = invalid_dbl )
virtual

Sets the rooting depth, limited by a given maximum or, if none is given, by the species parameter ZRTMC, and determines the number of rooted layers.

The number of rooted layers follows the same definition as in the dynamic root model (first_layer_below()): the layer that contains the root tip is rooted; if the rooting depth reaches the bottom of the soil profile, all layers are rooted. The rooting depth itself is not limited by the soil depth.

Used by ArableDNDC, GrasslandDNDC and Oryza2000.

Parameters
_root_q_vtnumber of rooted soil layers (output)
_pplant
_rooting_depthnew rooting depth [m]
_max_rooting_depthoptional maximum rooting depth [m]

Implements ldndc::BaseRootSystemDNDC.

662{
663 if ( cbm::is_valid( _max_rooting_depth))
664 {
665 _p->rooting_depth = ( _rooting_depth > _max_rooting_depth) ? _max_rooting_depth : _rooting_depth;
666 }
667 else
668 {
669 _p->rooting_depth = ( _rooting_depth > (*_p)->ZRTMC()) ? (*_p)->ZRTMC() : _rooting_depth;
670 }
671
672 if ( cbm::flt_equal_zero( _p->rooting_depth))
673 {
674 _root_q_vt = 0u;
675 }
676 else
677 {
678 unsigned int const layer_cnt( static_cast< unsigned int >( std::min( _p->nb_soillayers(),
679 static_cast<size_t>(m_soillayers->soil_layer_cnt()))));
680 _root_q_vt = std::min( first_layer_below( _p->rooting_depth), layer_cnt);
681 }
682}
unsigned int first_layer_below(double) const
Number of rooted soil layers for a given rooting depth [m].
Definition ld_rootsystem.cpp:605

References first_layer_below(), and m_soillayers.

Here is the call graph for this function:

◆ specific_root_length()

void ldndc::RootSystemDNDC::specific_root_length ( unsigned int const & _sl_below_roots,
MoBiLE_Plant * _p,
lvector_t< double > & specifific_root_length_sl )
virtual

Specific root length of every evaluated layer (Root length and density).

Parameters
_sl_below_rootsnumber of layers to evaluate \( n \)
_pplant
specifific_root_length_slspecific root length of every evaluated layer [m kgDW-1] (output)

Implements ldndc::BaseRootSystemDNDC.

1195{
1196 for ( size_t sl = 0; sl < _sl_below_roots; ++sl)
1197 {
1198 double const srl_min( (*_p)->SRL_MAX() * (1.0 - (*_p)->SRL_DECLINE()));
1199 double const scale(cbm::bound( 0.0, 1.0 - sc_.depth_sl[sl] / sc_.depth_sl[_sl_below_roots-1], 1.0));
1200 // GS = growth stage elem [0,1]
1201 specifific_root_length_sl[sl] = (*_p)->SRL_MAX() - _p->dvsFlush * ((*_p)->SRL_MAX() - srl_min) * scale;
1202 }
1203}

References sc_.

Referenced by update_roots_dynamic(), and update_roots_static().

Here is the caller graph for this function:

◆ target_rooting_depth_increase()

void ldndc::RootSystemDNDC::target_rooting_depth_increase ( double & _rooting_depth_increase,
unsigned int & _sl_min_no_roots,
double const _dt_per_day,
MoBiLE_Plant *const _p )
virtual

Target increase of the rooting depth under optimum conditions (Target rooting depth).

Parameters
_rooting_depth_increasetarget increase of the rooting depth [m] (output)
_sl_min_no_rootsnumber of rooted layers at the target depth (output)
_dt_per_daylength of the time step [d]
_pplant

Implements ldndc::BaseRootSystemDNDC.

558{
559 if ( cbm::flt_greater_zero( (*_p)->FRT_DGR_GDD()))
560 {
561 // thermal time: elongation per degree day with the soil temperature at the root front
562 // (same base and cap as the growing degree days of the plant), limited by FRT_DGR_MAX (if given)
563 unsigned int const sl_front( first_layer_below( _p->rooting_depth) - 1);
564 double const delta_gdd( cbm::bound( 0.0,
565 mc_.temp_sl[sl_front] - (*_p)->GDD_BASE_TEMPERATURE(),
566 (*_p)->GDD_MAX_TEMPERATURE()));
567 double rate( (*_p)->FRT_DGR_GDD() * delta_gdd);
568 if ( cbm::flt_greater_zero( (*_p)->FRT_DGR_MAX()))
569 {
570 rate = cbm::bound_max( rate, (*_p)->FRT_DGR_MAX());
571 }
572 _rooting_depth_increase = rate * _dt_per_day;
573 }
574 else
575 {
576 // linear in time as in Jones 1991
577 _rooting_depth_increase = (*_p)->FRT_DGR_MAX() * _dt_per_day;
578 }
579
580 bool const gdd_ok( cbm::flt_greater( (*_p)->GDD_ROOTS_GROWN(), _p->growing_degree_days));
581 if ( !gdd_ok)
582 {
583 _rooting_depth_increase = 0.0;
584 }
585 _rooting_depth_increase = cbm::bound( 0.0, _rooting_depth_increase, (*_p)->ZRTMC() - _p->rooting_depth);
586
587 // first non-rooted layer (same definition as in update_rooting_depth)
588 _sl_min_no_roots = first_layer_below( _p->rooting_depth + _rooting_depth_increase);
589}

References first_layer_below(), and mc_.

Referenced by update_roots_dynamic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_root_fraction_exponential() [1/2]

template<class _S>
void ldndc::RootSystemDNDC::update_root_fraction_exponential ( double _adaption_rate,
unsigned int _deepest_rooted_layer,
double _fact_exp,
_S _fFrt_sl,
unsigned int nb_layers )

Exponential root distribution applied to an arbitrary array of root fractions.

Exponential root distribution (Exponential root distribution) applied to an arbitrary array of root fractions.

Parameters
_adaption_rateadaption rate \( a \) [0-1]
_deepest_rooted_layernumber of rooted soil layers \( n_r \)
_fact_exp\( k \) [m-1]
_fFrt_slroot fractions to update
nb_layerssize of _fFrt_sl; entries of non-rooted layers are set to 0
1123{
1124 ldndc_kassert( cbm::flt_greater_equal( 1.0, _adaption_rate));
1125
1126 double fFrt_sum( 0.0);
1127 for ( size_t sl = 0; sl < _deepest_rooted_layer; ++sl)
1128 {
1129 double const fFrt_target( exp(-_fact_exp * sc_.depth_sl[sl]) * sc_.h_sl[sl]);
1130 _fFrt_sl[sl] -= (_fFrt_sl[sl] - fFrt_target) * _adaption_rate;
1131 _fFrt_sl[sl] = cbm::bound_min( 0.0, _fFrt_sl[sl]);
1132 fFrt_sum += _fFrt_sl[sl];
1133 }
1134
1135 if ( cbm::flt_greater_zero( fFrt_sum))
1136 {
1137 for ( size_t sl = 0; sl < _deepest_rooted_layer; ++sl)
1138 {
1139 _fFrt_sl[sl] /= fFrt_sum;
1140 }
1141 for ( size_t sl = _deepest_rooted_layer; sl < nb_layers; ++sl)
1142 {
1143 _fFrt_sl[sl] = 0.0;
1144 }
1145 }
1146 else
1147 {
1148 for ( size_t sl = 0; sl < nb_layers; ++sl)
1149 {
1150 _fFrt_sl[sl] = 0.0;
1151 }
1152 }
1153}

References sc_.

◆ update_root_fraction_exponential() [2/2]

void ldndc::RootSystemDNDC::update_root_fraction_exponential ( double _adaption_rate,
unsigned int _deepest_rooted_layer,
double _fact_exp,
MoBiLE_Plant * _vt )
virtual

Updates the fine root distribution of a plant with the exponential shape (Exponential root distribution).

Parameters
_adaption_rateadaption rate \( a \) [0-1]
_deepest_rooted_layernumber of rooted soil layers \( n_r \)
_fact_exp\( k \) [m-1]
_vtplant (its fFrt_sl is updated)

Implements ldndc::BaseRootSystemDNDC.

1100{
1101 //not needed if parent function is called with MoBiLE_Plant*
1102 update_root_fraction_exponential( _adaption_rate, _deepest_rooted_layer, _fact_exp, _vt->fFrt_sl, _vt->nb_soillayers());
1103}
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

References update_root_fraction_exponential().

Referenced by update_root_fraction_exponential(), and update_roots_dynamic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_root_fraction_sigmoid() [1/2]

template<class _S>
void ldndc::RootSystemDNDC::update_root_fraction_sigmoid ( double _adaption_rate,
unsigned int _deepest_rooted_layer,
double _root_min,
double _root_max,
double _root_width,
double _root_height,
_S _fFrt_sl,
unsigned int _nb_layers )

Sigmoid root distribution applied to an arbitrary array of root fractions.

Sigmoid root distribution (Sigmoid root distribution) applied to an arbitrary array of root fractions.

Parameters
_adaption_rateadaption rate \( a \) [0-1]
_deepest_rooted_layernumber of rooted soil layers \( n_r \)
_root_min\( r_{min} \) [-]
_root_max\( r_{max} \), depth of maximum root density [cm]
_root_width\( r_{width} \) [cm2]
_root_height\( r_{height} \) [-]
_fFrt_slroot fractions to update
_nb_layerssize of _fFrt_sl; entries of non-rooted layers are set to 0
1033{
1034 ldndc_kassert( cbm::flt_greater_equal( 1.0, _adaption_rate));
1035
1036 double fFrt_sum( 0.0);
1037 for ( size_t sl = 0; sl < _deepest_rooted_layer; ++sl)
1038 {
1039 double const fFrt_target( (exp( -( cbm::sqr( (sc_.depth_sl[sl] * cbm::CM_IN_M) - _root_max) / _root_width))
1040 / _root_height + _root_min)
1041 * sc_.h_sl[sl]);
1042 _fFrt_sl[sl] -= (_fFrt_sl[sl] - fFrt_target) * _adaption_rate;
1043 _fFrt_sl[sl] = cbm::bound_min( 0.0, _fFrt_sl[sl]);
1044 fFrt_sum += _fFrt_sl[sl];
1045 }
1046
1047 if ( cbm::flt_greater_zero( fFrt_sum))
1048 {
1049 for ( size_t sl = 0; sl < _deepest_rooted_layer; ++sl)
1050 {
1051 _fFrt_sl[sl] /= fFrt_sum;
1052 }
1053 for ( size_t sl = _deepest_rooted_layer; sl < _nb_layers; ++sl)
1054 {
1055 _fFrt_sl[sl] = 0.0;
1056 }
1057 }
1058 else
1059 {
1060 for ( size_t sl = 0; sl < _nb_layers; ++sl)
1061 {
1062 _fFrt_sl[sl] = 0.0;
1063 }
1064 }
1065}

References sc_.

◆ update_root_fraction_sigmoid() [2/2]

void ldndc::RootSystemDNDC::update_root_fraction_sigmoid ( double _adaption_rate,
unsigned int _deepest_rooted_layer,
double _root_min,
double _root_max,
double _root_width,
double _root_height,
MoBiLE_Plant * _vt )
virtual

Updates the fine root distribution of a plant with the sigmoid shape (Sigmoid root distribution).

Parameters
_adaption_rateadaption rate \( a \) [0-1]
_deepest_rooted_layernumber of rooted soil layers \( n_r \)
_root_min\( r_{min} \) [-]
_root_max\( r_{max} \), depth of maximum root density [cm]
_root_width\( r_{width} \) [cm2]
_root_height\( r_{height} \) [-]
_vtplant (its fFrt_sl is updated)

Implements ldndc::BaseRootSystemDNDC.

998{
999 update_root_fraction_sigmoid( _adaption_rate,
1000 _deepest_rooted_layer,
1001 _root_min,
1002 _root_max,
1003 _root_width,
1004 _root_height,
1005 _vt->fFrt_sl,
1006 _vt->nb_soillayers());
1007}
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

References update_root_fraction_sigmoid().

Referenced by update_root_fraction_sigmoid(), and update_roots_dynamic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_rooting_depth()

void ldndc::RootSystemDNDC::update_rooting_depth ( const double target_rooting_depthincrease,
double & growthrestriction,
unsigned int & root_q_vt_,
MoBiLE_Plant * _p )
virtual

Increases the rooting depth by the restricted target increment (step 4 of the Dynamic root growth model) and updates the number of rooted layers.

Parameters
target_rooting_depthincreasetarget increase under optimum conditions [m]
growthrestrictioncombined restriction at the root front [0-1]
root_q_vt_number of rooted soil layers (output)
_pplant

Implements ldndc::BaseRootSystemDNDC.

633{
634 _p->rooting_depth = cbm::bound_max( _p->rooting_depth + target_rooting_depthincrease * growthrestriction, (*_p)->ZRTMC());
635
636 root_q_vt_ = first_layer_below( _p->rooting_depth);
637}

References first_layer_below().

Referenced by update_roots_dynamic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_rootlength() [1/2]

void ldndc::RootSystemDNDC::update_rootlength ( unsigned int & _sl_below_roots,
MoBiLE_Plant * _p,
double _delta_dw_frt )
virtual

Root length change for a root mass change of the whole root system, which is distributed over the layers according to the current fractions (see Root length and density).

Must be called before the root mass is changed.

Parameters
_sl_below_rootsnumber of rooted soil layers
_pplant
_delta_dw_frtroot mass change of the whole root system [kgDW m-2] (< 0 for losses)

Implements ldndc::BaseRootSystemDNDC.

1222{
1223 lvector_t< double > delta_dw_frt_sl( _sl_below_roots, 0.0);
1224 for ( size_t sl = 0; sl < _sl_below_roots; ++sl)
1225 {
1226 delta_dw_frt_sl[sl] = _delta_dw_frt * _p->fFrt_sl[sl];
1227 }
1228 update_rootlength( _sl_below_roots, _p, delta_dw_frt_sl);
1229}

References update_rootlength().

Referenced by reduce_root_system(), reduce_root_system(), and update_rootlength().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_rootlength() [2/2]

void ldndc::RootSystemDNDC::update_rootlength ( unsigned int & _sl_below_roots,
MoBiLE_Plant * _p,
lvector_t< double > _delta_dw_frt_sl )
virtual

Root length change for root mass changes of individual layers (see Root length and density).

Must be called before the root mass is changed. The mean specific root length of each layer is kept and bounded by SRL_MAX with respect to the root mass after the change; no lower bound is applied, since it would undo the SRL reduction of the Dynamic root growth model. Layers with root mass but without root length get \( L_i = SRL_{min} \, m_i \).

Parameters
_sl_below_rootsnumber of rooted soil layers
_pplant
_delta_dw_frt_slroot mass change of every rooted layer [kgDW m-2] (< 0 for losses)

Implements ldndc::BaseRootSystemDNDC.

1251{
1252 for ( size_t sl = 0; sl < _sl_below_roots; ++sl)
1253 {
1254 double const srl_min( (*_p)->SRL_MAX() * (1.0 - (*_p)->SRL_DECLINE()));
1255 double const dw_frt_sl( _p->mFrt * _p->fFrt_sl[sl]);
1256 double const dw_frt_sl_new( cbm::bound_min( 0.0, dw_frt_sl + _delta_dw_frt_sl[sl]));
1257 if ( cbm::flt_greater_zero( _p->rootlength_sl[sl]) &&
1258 cbm::flt_greater_zero( dw_frt_sl))
1259 {
1260 // determine average SRL in this soil layer
1261 double const srl_mean( _p->rootlength_sl[sl] / dw_frt_sl);
1262 _p->rootlength_sl[sl] = cbm::bound( 0.0,
1263 srl_mean * dw_frt_sl_new,
1264 (*_p)->SRL_MAX() * dw_frt_sl_new);
1265 }
1266 else
1267 {
1268 _p->rootlength_sl[sl] = srl_min * dw_frt_sl_new;
1269 }
1270 }
1271}

◆ update_roots_dynamic()

void ldndc::RootSystemDNDC::update_roots_dynamic ( const double FTS_TOT_,
unsigned int & _sl_min_no_roots,
MoBiLE_Plant * _p,
double _dw_frt_growth )
virtual

Root growth of one time step with the dynamic approach (Dynamic root growth model).

Parameters
FTS_TOT_length of the time step [d]
_sl_min_no_rootsnumber of rooted soil layers (updated)
_pplant; mFrt already includes the new growth
_dw_frt_growthfine root growth of this time step [kgDW m-2]

Implements ldndc::BaseRootSystemDNDC.

250{
251 unsigned int sl_min_no_roots_tminusone( _sl_min_no_roots);
252
253 // dry weight of fine roots before growth
254 // (not considered so far for root length)
255 double const dw_frt_tminusone( cbm::bound_min( 0.0, _p->mFrt - _dw_frt_growth));
256
257 // dry weight of fine roots that can be redistributed
258 double const dw_frt_redistribute( (*_p)->REDISTRIBUTION_ROOT() * FTS_TOT_ * dw_frt_tminusone);
259 double const dw_frt_redistribute_and_growth( dw_frt_redistribute + _dw_frt_growth);
260
261 // reduce root length by redistributed part (proportionally in all layers, i.e., mean SRL per layer is kept)
262 if ( cbm::flt_greater_zero( dw_frt_tminusone))
263 {
264 double const f_remain( cbm::bound( 0.0, 1.0 - dw_frt_redistribute / dw_frt_tminusone, 1.0));
265 for ( size_t sl = 0; sl < sl_min_no_roots_tminusone; ++sl)
266 {
267 _p->rootlength_sl[sl] *= f_remain;
268 }
269 }
270
271 // root mass in every layer before growth and redistribution
272 lvector_t< double > mFrt_sl_tminusone( sl_min_no_roots_tminusone, 0.0);
273 for ( size_t sl = 0; sl < sl_min_no_roots_tminusone; ++sl)
274 {
275 mFrt_sl_tminusone[sl] = _p->fFrt_sl[sl] * cbm::bound_min( 0.0, _p->mFrt - _dw_frt_growth - dw_frt_redistribute);
276 }
277
278 // target rooting depth (step 2) and growth restrictions (step 3)
279 double delta_rooting_depth_target( 0.0);
280 unsigned int sl_min_no_roots_target( 0);
281 target_rooting_depth_increase( delta_rooting_depth_target,
282 sl_min_no_roots_target,
283 FTS_TOT_,
284 _p);
285
286 unsigned int const sl_restrictions( std::max( sl_min_no_roots_target, sl_min_no_roots_tminusone));
287 lvector_t< double > root_res_coarse_fragments_sl = root_restrictions_coarse_fragments( sl_restrictions);
288 lvector_t< double > root_res_soil_strength_sl = root_restrictions_soil_strength( sl_restrictions);
289 lvector_t< double > root_res_aeration_sl = root_restrictions_aeration( sl_restrictions, _p);
290 lvector_t< double > root_res_temperature_sl = root_restrictions_temperature( sl_restrictions, _p);
291
292 // optional weighting of the placement of new roots by soil water (ROOT_DISTRIBUTION_WATER > 0):
293 // the soil strength restriction then only considers bulk density, water enters via the weighting
294 double const distribution_water( (*_p)->ROOT_DISTRIBUTION_WATER());
295 bool const have_distribution_water( cbm::flt_greater_zero( distribution_water));
296 lvector_t< double > root_res_bulk_density_sl = root_restrictions_bulk_density( sl_restrictions);
297 lvector_t< double > root_water_sl = root_relative_water_content( sl_restrictions);
298
299 // pathway through biopores and cracks (ROOT_SOIL_STRENGTH_MIN > 0):
300 // the soil strength restriction does not fall below this minimum
301 double const soil_strength_min( (*_p)->ROOT_SOIL_STRENGTH_MIN());
302 if ( cbm::flt_greater_zero( soil_strength_min))
303 {
304 for ( size_t sl = 0; sl < sl_restrictions; ++sl)
305 {
306 root_res_soil_strength_sl[sl] = soil_strength_min + (1.0 - soil_strength_min) * root_res_soil_strength_sl[sl];
307 root_res_bulk_density_sl[sl] = soil_strength_min + (1.0 - soil_strength_min) * root_res_bulk_density_sl[sl];
308 }
309 }
310
311 // depth growth with thermal time (FRT_DGR_GDD > 0) already includes the temperature dependency
312 bool const have_thermal_time_depth_growth( cbm::flt_greater_zero( (*_p)->FRT_DGR_GDD()));
313
314 // actual rooting depth with restriction at the root front (step 4);
315 // stones reduce the root density (step 5) but not the elongation of the root front
316 if( cbm::flt_greater_zero( dw_frt_redistribute_and_growth) && (sl_min_no_roots_target > 0))
317 {
318 unsigned int sl_max_roots( sl_min_no_roots_target-1);
319 double root_res_all( pow( std::min( root_res_soil_strength_sl[sl_max_roots],
320 root_res_aeration_sl[sl_max_roots]),
321 0.5));
322 if ( !have_thermal_time_depth_growth)
323 {
324 root_res_all = std::min( root_res_all, root_res_temperature_sl[sl_max_roots]);
325 }
326
327 update_rooting_depth( delta_rooting_depth_target, root_res_all, _sl_min_no_roots, _p);
328 // actual depth never exceeds target depth, i.e., restrictions are available for all rooted layers
329 ldndc_kassert( _sl_min_no_roots <= sl_restrictions);
330 }
331
332 size_t const sl_min_no_roots_common( std::min( {_sl_min_no_roots,
333 sl_min_no_roots_tminusone,
334 sl_min_no_roots_target}));
335 size_t const sl_min_no_roots_max( std::max( {_sl_min_no_roots,
336 sl_min_no_roots_tminusone,
337 sl_min_no_roots_target}));
338
339 // root mass in every layer before new mass is placed
340 lvector_t< double > mFrt_sl( _sl_min_no_roots, 0.0);
341
342 // initialize with static part of old biomass
343 for (size_t sl = 0; sl < sl_min_no_roots_common; ++sl)
344 {
345 mFrt_sl[sl] = mFrt_sl_tminusone[sl];
346 }
347
348 if ( cbm::flt_greater_zero( dw_frt_redistribute_and_growth))
349 {
350 // placement of new root mass (step 5): optimum profile ...
351 lvector_t< double > fFrt_opt_sl( _sl_min_no_roots, 0.0);
352 if( cbm::flt_equal_zero( (*_p)->EXP_ROOT_DISTRIBUTION()))
353 {
354 update_root_fraction_sigmoid( 1.0, _sl_min_no_roots, 0.005, 10.0, 200.0, 10.0, fFrt_opt_sl, _sl_min_no_roots);
355 }
356 else
357 {
358 update_root_fraction_exponential( 1.0, _sl_min_no_roots, (*_p)->EXP_ROOT_DISTRIBUTION(), fFrt_opt_sl, _sl_min_no_roots);
359 }
360
361 // ... weighted with the restrictions to target masses ...
362 lvector_t< double > fFrt_opt_rest_sl( _sl_min_no_roots, 0.0);
363 lvector_t< double > mFrt_opt_rest_sl( _sl_min_no_roots, 0.0);
364 double normalize_opt_rest( 0.0);
365 for ( size_t sl = 0; sl < _sl_min_no_roots; ++sl)
366 {
367 double root_res_all( 0.0);
368 if ( have_distribution_water)
369 {
370 root_res_all = std::min( pow( std::min( {root_res_coarse_fragments_sl[sl],
371 root_res_bulk_density_sl[sl],
372 root_res_aeration_sl[sl]}),
373 0.5),
374 root_res_temperature_sl[sl])
375 * pow( root_water_sl[sl], distribution_water);
376 }
377 else
378 {
379 root_res_all = std::min( pow( std::min( {root_res_coarse_fragments_sl[sl],
380 root_res_soil_strength_sl[sl],
381 root_res_aeration_sl[sl]}),
382 0.5),
383 root_res_temperature_sl[sl]);
384 }
385 fFrt_opt_rest_sl[sl] = root_res_all * fFrt_opt_sl[sl];
386 normalize_opt_rest += fFrt_opt_rest_sl[sl];
387 }
388
389 if ( cbm::flt_greater_zero( normalize_opt_rest))
390 {
391 for ( size_t sl = 0; sl < _sl_min_no_roots; ++sl)
392 {
393 mFrt_opt_rest_sl[sl] = fFrt_opt_rest_sl[sl] / normalize_opt_rest * _p->mFrt; // mass(t=i)
394 }
395 }
396 else
397 {
398 for ( size_t sl = 0; sl < _sl_min_no_roots; ++sl)
399 {
400 mFrt_opt_rest_sl[sl] = fFrt_opt_sl[sl] * _p->mFrt; // mass(t=i)
401 }
402 }
403
404 // ... deficits (negative values set to 0, roots are removed elsewhere) ...
405 lvector_t< double > delta_mFrt_pot_sl( _sl_min_no_roots, 0.0);
406 double normalize_delta_mFrt_pot( 0.0);
407 for ( size_t sl = 0; sl < _sl_min_no_roots; ++sl)
408 {
409 delta_mFrt_pot_sl[sl] = cbm::bound_min( 0.0, mFrt_opt_rest_sl[sl] - mFrt_sl[sl]); // t=i - t=i-1 overall >0
410 normalize_delta_mFrt_pot += delta_mFrt_pot_sl[sl];
411 }
412
413 // ... and distribution of the new mass proportionally to the deficits
414 if( cbm::flt_greater_zero( normalize_delta_mFrt_pot))
415 {
416 for ( size_t sl = 0; sl < _sl_min_no_roots; ++sl)
417 {
418 mFrt_sl[sl] += dw_frt_redistribute_and_growth * delta_mFrt_pot_sl[sl] / normalize_delta_mFrt_pot; // t=i
419 }
420 }
421 else
422 {
423 // no potential growth (for instance, fully frozen ground)
424 // However, the root mass must currently go somewhere..
425 // todo: potentially better to allocate less C to roots
426 for ( size_t sl = 0; sl < _sl_min_no_roots; ++sl)
427 {
428 mFrt_sl[sl] += dw_frt_redistribute_and_growth * _p->fFrt_sl[sl];
429 }
430 }
431
432 // new root distribution
433 double mFrt_normalize( 0.0);
434 for ( size_t sl = 0; sl < _sl_min_no_roots; ++sl)
435 {
436 mFrt_normalize += mFrt_sl[sl];
437 }
438 if ( cbm::flt_greater_zero( mFrt_normalize))
439 {
440 for ( size_t sl = 0; sl < _sl_min_no_roots; ++sl)
441 {
442 _p->fFrt_sl[sl] = mFrt_sl[sl] / mFrt_normalize;
443 }
444 for ( size_t sl = _sl_min_no_roots; sl < _p->nb_soillayers(); ++sl)
445 {
446 _p->fFrt_sl[sl] = 0.0;
447 }
448 }
449 else if ( _sl_min_no_roots > 0)
450 {
451 for ( size_t sl = 0; sl < _sl_min_no_roots; ++sl)
452 {
453 _p->fFrt_sl[sl] = 1.0 / double(_sl_min_no_roots);
454 }
455 for ( size_t sl = _sl_min_no_roots; sl < _p->nb_soillayers(); ++sl)
456 {
457 _p->fFrt_sl[sl] = 0.0;
458 }
459 }
460 else
461 {
462 for ( size_t sl = _sl_min_no_roots; sl < _p->nb_soillayers(); ++sl)
463 {
464 _p->fFrt_sl[sl] = 0.0;
465 }
466 }
467 } // end if deltamass > 0
468
469 // root length (step 6): specific root length, reduced by stones and soil strength
470 lvector_t< double > specifific_root_length_sl( sl_min_no_roots_max, 0.0);
471 specific_root_length( sl_min_no_roots_max, _p, specifific_root_length_sl);
472 // use restrictions for SRL
473 for( size_t sl = 0; sl < sl_min_no_roots_target; ++sl)
474 {
475 specifific_root_length_sl[sl] /= (4.0 - 3.0 * std::min( root_res_coarse_fragments_sl[sl],
476 root_res_soil_strength_sl[sl]));
477 }
478
479 // root length in every soil layer
480 for ( size_t sl = 0; sl < sl_min_no_roots_common; ++sl)
481 {
482 double const deltamass_sl( mFrt_sl[sl] - mFrt_sl_tminusone[sl]);
483 if ( cbm::flt_greater_equal_zero( deltamass_sl))
484 {
485 _p->rootlength_sl[sl] = cbm::bound_max( _p->rootlength_sl[sl] + specifific_root_length_sl[sl] * deltamass_sl,
486 (*_p)->SRL_MAX() * mFrt_sl[sl]);
487 }
488 else if ( cbm::flt_greater_zero( mFrt_sl_tminusone[sl]))
489 {
490 double const srl_min( (*_p)->SRL_MAX() * (1.0 - (*_p)->SRL_DECLINE()));
491 double const srl_mean( _p->rootlength_sl[sl] / mFrt_sl_tminusone[sl]);
492 _p->rootlength_sl[sl] = cbm::bound_min( srl_min * mFrt_sl[sl],
493 _p->rootlength_sl[sl] + srl_mean * deltamass_sl);
494 }
495 else
496 {
497 _p->rootlength_sl[sl] = specifific_root_length_sl[sl] * mFrt_sl[sl];
498 }
499 }
500
501 for ( size_t sl = sl_min_no_roots_common; sl < _sl_min_no_roots; ++sl)
502 {
503 if ( cbm::flt_greater_zero( mFrt_sl[sl]))
504 {
505 _p->rootlength_sl[sl] = cbm::bound_max( _p->rootlength_sl[sl] + specifific_root_length_sl[sl] * mFrt_sl[sl],
506 (*_p)->SRL_MAX() * mFrt_sl[sl]);
507 }
508 else
509 {
510 _p->rootlength_sl[sl] = 0.0;
511 }
512 }
513
514 for ( size_t sl = _sl_min_no_roots; sl < m_soillayers->soil_layer_cnt(); ++sl)
515 {
516 _p->rootlength_sl[sl] = 0.0;
517 }
518}
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
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_temperature(unsigned int, MoBiLE_Plant *)
Root growth restriction by soil temperature for every layer (Root growth restrictions).
Definition ld_rootsystem.cpp:915
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

References m_soillayers, root_relative_water_content(), root_restrictions_aeration(), root_restrictions_bulk_density(), root_restrictions_coarse_fragments(), root_restrictions_soil_strength(), root_restrictions_temperature(), specific_root_length(), target_rooting_depth_increase(), update_root_fraction_exponential(), update_root_fraction_sigmoid(), and update_rooting_depth().

Here is the call graph for this function:

◆ update_roots_static()

void ldndc::RootSystemDNDC::update_roots_static ( const double FTS_TOT_,
unsigned int & root_q_vt_,
MoBiLE_Plant * _vt,
ldndc::growable_array< BaseRootSystemDNDC *, 1000, 1 > & root_system,
double rootgrowthrestriction )
virtual

Root growth of one time step with the static approach (Static root growth model).

Parameters
FTS_TOT_length of the time step [d]
root_q_vt_number of rooted soil layers (updated)
_vtplant
root_systemroot systems of all plants (indexed by plant slot)
rootgrowthrestrictionfactor reducing root extension [0-1]

Implements ldndc::BaseRootSystemDNDC.

131{
132 if (cbm::flt_less(_vt->rooting_depth, (*_vt)->ZRTMC()))
133 {
134 _vt->rooting_depth += rootgrowthrestriction * (*_vt)->FRT_DGR_MAX() * FTS_TOT_;
135 }
136
137 //update rooted layers
138 root_q_vt_ = m_soillayers->soil_layer_cnt();
139 for (size_t sl = 0; sl < m_soillayers->soil_layer_cnt(); ++sl)
140 {
141 if (cbm::flt_greater(sc_.depth_sl[sl], _vt->rooting_depth))
142 {
143 /* The layer depths are not necessarily commensurate with FRT_DGR_MAX. So the current layer probably still holds roots.
144 * For the first non-rooted layer the index needs to be shifted. */
145 root_q_vt_ = (sl + 1);
146 break;
147 }
148 }
149
150 //root distribution
151 if( cbm::flt_equal_zero( (*_vt)->EXP_ROOT_DISTRIBUTION()))
152 {
153 root_system[_vt->slot]->update_root_fraction_sigmoid( 1.0, root_q_vt_, 0.005, 10.0, 200.0, 10.0, _vt);
154 }
155 else
156 {
157 root_system[_vt->slot]->update_root_fraction_exponential( 1.0, root_q_vt_, (*_vt)->EXP_ROOT_DISTRIBUTION(), _vt);
158 }
159
160 // specific root length of every rooted layer
161 lvector_t< double > specifific_root_length_sl(root_q_vt_, 99.0);
162 specific_root_length( root_q_vt_, _vt, specifific_root_length_sl);
163
164 // root length in every rooted layer
165 for (size_t sl = 0; sl <= root_q_vt_ - 1; ++sl)
166 {
167 //~ _vt->rootlength_sl[sl] = specifific_root_length_sl[sl] * _vt->fFrt_sl[sl] * (deltamassFrt + _vt->mFrt);
168 _vt->rootlength_sl[sl] = specifific_root_length_sl[sl] * _vt->fFrt_sl[sl] * _vt->mFrt;
169 }
170}

References m_soillayers, sc_, and specific_root_length().

Here is the call graph for this function: