LandscapeDNDC 1.37.0
Loading...
Searching...
No Matches
ldndc::PhysiologyGrowthPSIM Class Reference

Physiology model PSIM (Physiological Simulation Model) for trees and grass, see PSIM - Physiological Simulation Model for the model description. More...

#include <models/physiology/psim/psim.h>

Public Types

enum  canopy_nitrogen_uptake_e
 

Public Member Functions

bool have_forest_structure ()
 

Public Attributes

cbm::string_t branchfraction_opt
 
cbm::string_t crownlength_opt
 
bool competition_opt
 
bool rootgrowth_opt
 
bool don_uptake_opt
 
double clumping_factor
 
cbm::string_t timemode_opt
 
int stand_structure_opt
 
double target_biomass
 
int target_treenumber
 

Static Public Attributes

static const double CCOMNOX = 1.0
 
static const double CSATNH3 = 50.0
 
static const double CSATNOX = 5.0
 
static const double EPOTNOX = 1.0
 
static const double FDON_AVAILABLE = 0.1
 
static const double FRFRT = 0.5
 
static const double FMIN = 0.05
 
static const double PAMM = 0.17
 
static const double PGDD = 0.0075
 
static const double PMIN = 0.06
 
static const double PNIT = 0.34
 
static const double PPHLOE = 0.06
 
static const double PREDFRT = 1.72
 
static const double PREDSAP = 0.855
 
static const double TGLIM = 6.0
 
static const double TRMAX = 45.0
 
static const double TRMIN = -7.0
 
static const double TROPT = 20.0
 
static const double UPOTNH3 = 10000.0
 
static const double SACC_TAU = 12.75
 
static const double SACC_X0 = -3.57
 
static const double SACC_SMAX = 6.0
 

Protected Member Functions

void PSIM_ResizeVegetationVectors ()
 
void PSIM_StepInit ()
 
lerr_t PSIM_PlantingEvent ()
 initializes plants after planting events
 
void PSIM_HydraulicConductance ()
 
void PSIM_Photosynthesis ()
 
void PSIM_Potentialtranspiration ()
 
void PSIM_ResetFlushing ()
 
void PSIM_ResetPhenology (MoBiLE_Plant *)
 
void PSIM_Reset (MoBiLE_Plant *)
 
void PSIM_ResetBiomassFromLastYear ()
 
void PSIM_UpdateNitrogenConc ()
 
lerr_t PSIM_AgriculturalManagement ()
 grazing and cutting of grass (Management)
 
void PSIM_BudBurst ()
 
void PSIM_Senescence ()
 
void PSIM_CarAllocation ()
 
void PSIM_SoilCarbonRelease ()
 
void PSIM_NitAllocation ()
 
void PSIM_Respiration ()
 
void PSIM_NitrogenFixation ()
 
void PSIM_NitrogenUptake ()
 
void PSIM_BiomassUpdate ()
 
void PSIM_PhotosynthesisRates ()
 
void PSIM_DroughtStress ()
 
void PSIM_NitrogenBalance ()
 
lerr_t PSIM_VegStructure ()
 dimensional growth, crowding, mortality and disturbance events of trees (Stand structure)
 
void PSIM_BalanceCheck (size_t)
 
bool subdaily_timemode ()
 
lerr_t PSIM_Harvest ()
 harvest of plants (Management)
 
void PSIM_StepOut ()
 

Private Attributes

lvector_t< double > carbonuptake_vt
 
lvector_t< double > rFolLeaf_vt
 
lvector_t< double > carbonuptake_acc_vt
 
lvector_t< double > rFolLeaf_acc_vt
 
lvector_t< double > sacc_vt
 
lvector_t< double > sWoodAboveSen_vt
 
std::map< int, RootSystemDNDC > root_system
 Root system.
 

Detailed Description

Physiology model PSIM (Physiological Simulation Model) for trees and grass, see PSIM - Physiological Simulation Model for the model description.

Author
Ruediger Grote

Member Enumeration Documentation

◆ canopy_nitrogen_uptake_e

methods for nitrogen uptake through the canopy (option "nuptakecanopy")

139 {
140 NOUPTAKE,
141 STOMATALUPTAKE,
142 DIRECTUPTAKE
143 };

Member Function Documentation

◆ have_forest_structure()

bool ldndc::PhysiologyGrowthPSIM::have_forest_structure ( )
Returns
true if structural (dimensional) tree growth is considered in the current year
801{
802 if ( stand_structure_opt < 0)
803 {
804 return false;
805 }
806 else
807 {
808 ldate_t::td_scalar_t nd_simulated_years( lclock()->seconds() / (3600 * 24 * 365));
809 return ( nd_simulated_years >= stand_structure_opt);
810 }
811}
int stand_structure_opt
Definition psim.h:131

References have_forest_structure(), and stand_structure_opt.

Referenced by have_forest_structure(), and PSIM_ResetBiomassFromLastYear().

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

◆ PSIM_AgriculturalManagement()

lerr_t ldndc::PhysiologyGrowthPSIM::PSIM_AgriculturalManagement ( )
protected

grazing and cutting of grass (Management)

Returns
error code
1647{
1648 m_eventgraze.update_available_freshfood_c( m_veg, species_groups_select_t< species::grass >());
1649
1650 for ( PlantIterator vt = m_veg->begin(); vt != m_veg->end(); ++vt)
1651 {
1652 MoBiLE_Plant *p = (*vt);
1653 if ( p->group() == "grass")
1654 {
1655 lerr_t rc_graze = m_eventgraze.event_graze_physiology( *vt);
1656 if ( (rc_graze != LDNDC_ERR_EVENT_MATCH) &&
1657 (rc_graze != LDNDC_ERR_EVENT_EMPTY_QUEUE))
1658 {
1659 KLOGERROR( "PSIM: grazing not successful [species=", (*vt)->name(), "]");
1660 return rc_graze;
1661 }
1662 }
1663 }
1664
1665 // cutting event by external module
1666 lerr_t rc_cut = m_eventcut.event_cut_physiology( m_veg, species_groups_select_t< species::grass >());
1667 if ( (rc_cut != LDNDC_ERR_EVENT_MATCH) &&
1668 (rc_cut != LDNDC_ERR_EVENT_EMPTY_QUEUE))
1669 {
1670 KLOGERROR( "PSIM: cutting not successful");
1671 return rc_cut;
1672 }
1673 else if (rc_cut == LDNDC_ERR_EVENT_MATCH)
1674 {
1675 for (PlantIterator vt = m_veg->begin(); vt != m_veg->end(); ++vt)
1676 {
1677 MoBiLE_Plant* p = (*vt);
1678 if ( m_treedyn.OnStructureChange(p))
1679 {
1680 KLOGERROR( "PSIM: update of plant structure after cutting failed [species=", p->name(), "]");
1681 return LDNDC_ERR_FAIL;
1682 }
1683 }
1684 }
1685
1686 return LDNDC_ERR_OK;
1687}

References PSIM_AgriculturalManagement().

Referenced by PSIM_AgriculturalManagement().

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

◆ PSIM_BalanceCheck()

void ldndc::PhysiologyGrowthPSIM::PSIM_BalanceCheck ( size_t _i)
protected

carbon and nitrogen balance of all plants (Carbon and nitrogen balance)

1393{
1394 if (_i == 1)
1395 {
1396 tot_c = 0.0;
1397 tot_n = 0.0;
1398 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
1399 {
1400 MoBiLE_Plant *p = (*vt);
1401 tot_c += p->total_biomass() * cbm::CCDM;
1402 tot_n += p->total_nitrogen();
1403 }
1404 m_treedyn.exported_dw = 0.0;
1405 m_treedyn.exported_n = 0.0;
1406 return;
1407 }
1408
1409 double c_end( 0.0), n_end( 0.0); // plant carbon and nitrogen at the end of the time step [kg m-2]
1410 double c_upt( 0.0), n_upt( 0.0); // carbon and nitrogen input [kg m-2]
1411 double c_resp( 0.0); // respiration [kg C m-2]
1412 double c_exsu( 0.0); // root exudation [kg C m-2]
1413 double c_lit( 0.0), n_lit( 0.0); // litter [kg m-2]
1414 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
1415 {
1416 MoBiLE_Plant *p = (*vt);
1417 c_end += p->total_biomass() * cbm::CCDM;
1418 n_end += p->total_nitrogen();
1419
1420 c_upt += carbonuptake_vt[p->slot];
1421 n_upt += uptNH4Old_vt[p->slot] + uptNO3Old_vt[p->slot] + uptDONOld_vt[p->slot]
1422 + uptNOxOld_vt[p->slot] + uptNHyOld_vt[p->slot] + uptN2FixOld_vt[p->slot];
1423
1424 c_resp += rFolOld_vt[p->slot] + rFrtOld_vt[p->slot] + rSapOld_vt[p->slot] + rBudOld_vt[p->slot]
1425 + rTraOld_vt[p->slot] + p->rGro;
1426 c_exsu += p->exsuLoss;
1427
1428 c_lit += cbm::CCDM * (p->sFol + p->sBud + p->sWoodAbove);
1429 n_lit += p->nLitFol + p->nLitBud + p->nLitWoodAbove;
1430 for ( size_t sl = 0; sl < sl_.soil_layer_cnt(); ++sl)
1431 {
1432 c_lit += cbm::CCDM * (p->sFrt_sl[sl] + p->sWoodBelow_sl[sl]);
1433 n_lit += p->nLitFrt_sl[sl] + p->nLitWoodBelow_sl[sl];
1434 }
1435 }
1436
1437 // export by disturbance events (thinning, harvest)
1438 double const c_exp( m_treedyn.exported_dw * cbm::CCDM);
1439 double const n_exp( m_treedyn.exported_n);
1440
1441 double const c_leak( c_end - (tot_c + c_upt - c_resp - c_exsu - c_lit - c_exp));
1442 if ( std::abs( c_leak) > cbm::DIFFMAX * std::max( 1.0, tot_c))
1443 {
1444 KLOGWARN( "PSIM: carbon balance not closed [leak=", c_leak, " kgC m-2, start=", tot_c,
1445 ", uptake=", c_upt, ", respiration=", c_resp, ", exudation=", c_exsu,
1446 ", litter=", c_lit, ", export=", c_exp, ", end=", c_end, "]");
1447 }
1448
1449 double const n_leak( n_end - (tot_n + n_upt - n_lit - n_exp));
1450 if ( std::abs( n_leak) > cbm::DIFFMAX * std::max( 1.0, tot_n))
1451 {
1452 KLOGWARN( "PSIM: nitrogen balance not closed [leak=", n_leak, " kgN m-2, start=", tot_n,
1453 ", uptake=", n_upt, ", litter=", n_lit, ", export=", n_exp, ", end=", n_end, "]");
1454 }
1455}
lvector_t< double > carbonuptake_vt
Definition psim.h:286

References carbonuptake_vt, and PSIM_BalanceCheck().

Referenced by PSIM_BalanceCheck(), and PSIM_NitrogenUptake().

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

◆ PSIM_BiomassUpdate()

void ldndc::PhysiologyGrowthPSIM::PSIM_BiomassUpdate ( )
protected

update of compartment biomasses and free available carbon (Biomass update)

3555{
3556 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
3557 {
3558 MoBiLE_Plant *p = (*vt);
3559
3560 // remembering starting values
3561 double const fFacOld = p->f_fac;
3562
3563 double const mFolOld = p->mFol;
3564 double const mBudOld = p->mBud;
3565 double const mFrtOld = p->mFrt;
3566 double const mSapOld = p->mSap;
3567 double const mLivOld = mFolOld + mBudOld + mFrtOld + mSapOld;
3568
3569 // increase of dry matter
3570 double const groFol = p->dcFol / cbm::CCDM;
3571 double const groBud = p->dcBud / cbm::CCDM;
3572 double const groFrt = p->dcFrt / cbm::CCDM;
3573 double const groSap = p->dcSap / cbm::CCDM;
3574 double const groSum = groBud + groFrt + groSap;
3575
3576 /* biomass adjustment according to the shift in free available carbon
3577 * following the basic assumption that free available carbon is proportionally
3578 * distributed between or taken from the compartments but leaving reserves unchanged.
3579 * The biomass remaining after senescence is used for weighting, so that compartments
3580 * that are shed completely (e.g., foliage at the end of the season) do not become negative.*/
3581 double const sFrtSum( cbm::sum( p->sFrt_sl, sl_.soil_layer_cnt()));
3582 double const wFol( std::max( 0.0, mFolOld - p->sFol));
3583 double const wBud( std::max( 0.0, mBudOld - p->sBud - mBudLoss_vt[p->slot]));
3584 double const wFrt( std::max( 0.0, mFrtOld - sFrtSum));
3585 double const wSap( std::max( 0.0, mSapOld - p->sSap));
3586 double const wSum( wFol + wBud + wFrt + wSap);
3587 if ( cbm::flt_greater_zero( wSum))
3588 {
3589 double const redistribC( p->dcFac / cbm::CCDM);
3590 p->mFol += (redistribC * wFol / wSum);
3591 p->mBud += (redistribC * wBud / wSum);
3592 p->mFrt += (redistribC * wFrt / wSum);
3593 p->mSap += (redistribC * wSap / wSum);
3594 }
3595
3596 // considering growth and loss effects on compartment biomasses
3597 p->mFol += (groFol - p->sFol + mBudLoss_vt[p->slot]);
3598 p->mBud += (groBud - p->sBud - mBudLoss_vt[p->slot]);
3599 p->mFrt += (groFrt - sFrtSum);
3600 p->mSap += (groSap - p->sSap);
3601 p->mCor += (p->sSap - sWoodAboveSen_vt[p->slot] - p->sWoodBelow);
3602
3603 if ( !cbm::flt_greater_zero( p->mFol)) p->mFol = 0.0;
3604 if ( !cbm::flt_greater_zero( p->mBud)) p->mBud = 0.0;
3605 if ( !cbm::flt_greater_zero( p->mFrt)) p->mFrt = 0.0;
3606 if ( !cbm::flt_greater_zero( p->mSap)) p->mSap = 0.0;
3607
3608 // biomass and foliage area in layers
3609 m_pf.update_foliage_layer_biomass_and_lai((*vt), fl_cnt_, 0.0);
3610
3611 // change foliage biomass in age classes due to growth and senescence
3612 if ( p->nb_ageclasses() == 1)
3613 {
3614 p->mFol_na[0] = p->mFol;
3615 }
3616 else
3617 {
3618 // allowing foliage mass increase in plants with non-annual growth behaviour
3619 p->mFol_na[0] += cbm::bound_min( 0.0, groFol + mBudLoss_vt[p->slot] - p->sFol_na[0]);
3620 for ( size_t na = 1; na < p->nb_ageclasses(); ++na)
3621 {
3622 p->mFol_na[na] = cbm::bound_min( 0.0, p->mFol_na[na] - p->sFol_na[na]);
3623 }
3624 }
3625
3626 // total living biomass after growth (kgDM)
3627 double const mLivNew( p->mFol + p->mBud + p->mFrt + p->mSap);
3628
3632 if ( cbm::flt_greater( mLivNew, 0.001))
3633 {
3634 // ratio of free available carbohydrates
3635 double const senSum = cbm::sum( p->sFrt_sl, sl_.soil_layer_cnt()) + p->sSap + p->sFol;
3636 p->f_fac = (fFacOld * (mLivOld - senSum) * cbm::CCDM + vt->FFACMAX() * groSum * cbm::CCDM + p->dcFac ) / (mLivNew * cbm::CCDM);
3637
3638 if ( !cbm::flt_greater_zero( p->f_fac)) p->f_fac = 0.0;
3639 }
3640 else
3641 {
3642 p->f_fac = 0.0;
3643 }
3644
3645 // peak foliage amount
3646 if ( cbm::flt_greater( p->mFol, p->mFolMax))
3647 {
3648 p->mFolMax = p->mFol;
3649 }
3650 }
3651}
lvector_t< double > sWoodAboveSen_vt
Definition psim.h:320

References PSIM_BiomassUpdate(), and sWoodAboveSen_vt.

Referenced by PSIM_BiomassUpdate(), and PSIM_NitrogenUptake().

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

◆ PSIM_BudBurst()

void ldndc::PhysiologyGrowthPSIM::PSIM_BudBurst ( )
protected

phenology of flushing (Phenology)

1991{
1992 // Budburst runs only daily
1993 if ( !lclock()->is_position( TMODE_POST_DAILY))
1994 {
1995 return;
1996 }
1997
1998 // relative daylength normalized to 12 hours
1999 double const dayl_norm( meteo::daylength( m_setup->latitude(), this->lclock()->yearday()) / (0.5 * cbm::HR_IN_DAY));
2000 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
2001 {
2002 MoBiLE_Plant *p = (*vt);
2003
2004 if ( cbm::flt_greater_zero( nd_leaftemp_vt[p->slot]))
2005 {
2006 p->growing_degree_days += (nd_leaftemp_vt[p->slot] * dayl_norm);
2007 }
2008
2009 // duration of insufficient water supply (used for early senescence of grasses)
2010 if ( cbm::flt_greater( vt->H2OREF_SENESCENCE(), p->f_h2o))
2011 {
2012 dry_days[p->slot] += 1;
2013 }
2014 else
2015 {
2016 dry_days[p->slot] = 0;
2017 }
2018
2019 // chilling days are estimated from average annual temperature and amplitude (Linkosalo et al. 2008)
2020 double const help_1( 0.5 * cl_.annual_temperature_amplitude());
2021 double const help_2( -(cl_.annual_temperature_average() - help_1) / help_1);
2022 double const chilldays( 2.0 * acos( 1.0 - ( std::max( 0.0, help_2))) * lclock()->days_in_year() / ( 2.0 * cbm::PI));
2023
2024 // foliage emerges according to temperature requirements considering chilling
2025 double const gddstart( 100.0 + vt->GDDFOLSTART() * exp( -PGDD * chilldays));
2026 if ( cbm::flt_greater_equal( p->growing_degree_days, gddstart) && (p->dEmerg == -1))
2027 {
2028 if ( cbm::flt_greater_equal( p->f_h2o, vt->H2OREF_FLUSHING())
2029 && cbm::flt_greater_equal(0.0, psidecline_cum_vt[p->slot]))
2030 {
2031 p->dEmerg = lclock()->yearday();
2032 }
2033 }
2034 // after temperature requirements are met, flushing goes on if water supply is sufficient
2035 else if ( p->dEmerg > 0 && cbm::flt_greater_equal( p->f_h2o, vt->H2OREF_FLUSHING()))
2036 {
2037 days_since_emergence[p->slot] += 1;
2038 }
2039
2040 // save development state of last day
2041 p->dvsFlushOld = p->dvsFlush;
2042 p->dvsFlush = m_pf.update_dvs_flush( *vt, days_since_emergence[p->slot]);
2043 }
2044}
static const double PGDD
Definition psim.h:64

References PGDD, and PSIM_BudBurst().

Referenced by PSIM_BudBurst().

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

◆ PSIM_CarAllocation()

void ldndc::PhysiologyGrowthPSIM::PSIM_CarAllocation ( )
protected

carbon allocation (Carbon allocation and growth)

2436{
2437 double mFrtSum( 0.0);
2438 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
2439 {
2440 mFrtSum += (*vt)->mFrt;
2441 }
2442
2443 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
2444 {
2445 MoBiLE_Plant * p = *vt;
2446
2447 // amount of dry matter that is transfered from buds into foliage
2448 if ( p->dvsFlush > p->dvsFlushOld )
2449 mBudLoss_vt[p->slot] = std::min( p->mBud, p->mBudStart * (p->dvsFlush - p->dvsFlushOld)) * SIM_DAY_FRACTION;
2450 else
2451 mBudLoss_vt[p->slot] = 0.0;
2452
2453 // living biomass that contains general reserve tissue (kgDM)
2454 double const mLiv( p->mBud + p->mFol + p->mFrt + p->mSap);
2455
2456 // actual amount of free available carbon (kgC)
2457 double const fac( mLiv * cbm::CCDM * p->f_fac);
2458
2459 // maximum amount of free available carbon (kgC)
2460 double const facMax( mLiv * cbm::CCDM * vt->FFACMAX());
2461
2462 // available carbon for growth (assimilation - transport respiration from last timestep)
2463 // (growth and maintenance respiration is directly substracted from tissue)
2464 double const cPool( carbonuptake_vt[p->slot] - rTraOld_vt[p->slot]);
2465
2466 // optimum biomasses
2467 // - optimum foliage biomass (equal to actual biomass)
2468 double mFolOpt = p->mFol;
2469
2470 // - optimum fine root biomass (depends on foliage biomass but is restricted by soil temperature)
2471 double temp( temp_sl[0]);
2472 if ( mFrtSum > 0.0)
2473 {
2474 temp = 0.0;
2475 for ( size_t sl = 0; sl < sl_.soil_layer_cnt(); ++sl)
2476 {
2477 temp += (temp_sl[sl] * ph_.mfrt_sl( m_veg, sl));
2478 }
2479 temp /= mFrtSum;
2480 }
2481
2482 double mFrtOpt(p->mFrt);
2483 if ( temp >= TGLIM)
2484 {
2485 mFrtOpt = vt->QRF() * p->mFol;
2486
2487 // increase optimum fine root biomass when nitrogen concentration is below optimum
2488 if ( (ncFolOpt[p->slot] > p->ncFol) && cbm::flt_greater_zero( p->ncFol) )
2489 {
2490 mFrtOpt *= ncFolOpt[p->slot] / p->ncFol;
2491 }
2492 }
2493
2494 // - optimum bud (fruit) and optimum sapwood biomass (depends on optimum foliage biomass and phenological state)
2495 double mBudOpt(0.0);
2496
2497 // -- herbaceous
2498 if ( ( !cbm::flt_greater_zero( p->qsfm)) && ( !(*p)->IS_WOOD()))
2499 {
2500 mBudOpt = m_pf.get_optimum_foliage_biomass_grass( *vt);
2501 mSapOpt_vt[p->slot] = 0.0;
2502
2503 }
2504 // -- woody
2505 else if ( cbm::flt_greater_zero( p->mFolMax) && (*p)->IS_WOOD())
2506 {
2507 // for evergreen species bud demand is the difference between potential and actual foliage mass, not considering new foliage
2508 if (p->nb_ageclasses() > 1.0)
2509 {
2510 // sum of remaining foliage fractions over all age classes (new foliage: 1)
2511 double dvsSum(1.0);
2512 for (size_t na = 1; na < p->nb_ageclasses(); ++na)
2513 {
2514 unsigned int foliage_age(m_pf.get_foliage_age(PSIM_YEAR_START, 1, na));
2515 dvsSum += 1.0 - m_pf.get_dvs_mortality_of_age_class(m_pf.get_foliage_age_of_senescence(vt, 0.0), vt->NDMORTA(), foliage_age);
2516 }
2517
2518 mBudOpt = m_pf.get_optimum_foliage_biomass_trees(*vt) / dvsSum;
2519 }
2520 // for deciduous species bud demand is equal to potential foliage mass
2521 else
2522 {
2523 mBudOpt = m_pf.get_optimum_foliage_biomass_trees(*vt);
2524 }
2525
2526 // flushing demand is reduced by insufficient sapwood area
2527 // - current sapwood area demand
2528 double const d_saparea( p->lai() * p->qsfa);
2529 if (d_saparea > 0.0)
2530 qsaparea_vt[p->slot] = std::min(1.0, p->sap_area / d_saparea);
2531 else
2532 qsaparea_vt[p->slot] = 1.0;
2533
2534 // note: a reduction of the optimum bud biomass according to xylem availability (qsaparea_vt) is currently
2535 // not applied (up to a certain degree, lost xylem can be balanced by higher efficiency of the remaining tubes)
2536
2537 // - optimum sapwood biomass (depends on foliage and bud biomass)
2538 if (cbm::flt_equal_zero(mSapOpt_vt[p->slot])) // initialization (e.g. after planting)
2539 mSapOpt_vt[p->slot] = p->qsfm * std::max(p->mFol, p->mBud);
2540 else if ( cbm::flt_greater(qsaparea_vt[p->slot], 0.0)
2541 && cbm::flt_greater(1.0, qsaparea_vt[p->slot]) ) // according to sapwood area deficit for the current foliage
2542 mSapOpt_vt[p->slot] = std::max(p->qsfm * p->mFol, p->mSap / qsaparea_vt[p->slot]);
2543 else if (cbm::flt_greater_zero(p->mFol)) // according to leaf biomass
2544 mSapOpt_vt[p->slot] = p->qsfm * p->mFol;
2545 else // no demand
2546 mSapOpt_vt[p->slot] = p->mSap;
2547 }
2548
2549 // factors increasing the demand of fine roots and buds by the ratio of sapwood to their biomass
2550 // (higher priority of these small compartments if they are below their optimum)
2551 double fFrt(0.0);
2552 if (cbm::flt_greater_zero(p->mFrt) && cbm::flt_greater(mFrtOpt, p->mFrt))
2553 fFrt = p->mSap / p->mFrt;
2554 else
2555 fFrt = 1.0;
2556
2557 double fBud(0.0);
2558 if (cbm::flt_greater_zero(p->mBud) && cbm::flt_greater(mBudOpt, p->mBud))
2559 fBud = p->mSap / p->mBud;
2560 else
2561 fBud = 1.0;
2562
2563 // growth demand potential (defined as difference between optimum/maximum and actual biomass)
2564 double demFol = 1.0 * std::max(0.0, mFolOpt - p->mFol) * cbm::CCDM * SIM_DAY_FRACTION / (1.0 - vt->FYIELD()) + rFolOld_vt[p->slot];
2565 double demFrt = fFrt * std::max(0.0, mFrtOpt - p->mFrt) * cbm::CCDM * SIM_DAY_FRACTION / (1.0 - vt->FYIELD()) + rFrtOld_vt[p->slot];
2566 double demSap = 1.0 * std::max(0.0, mSapOpt_vt[p->slot] - p->mSap) * cbm::CCDM * SIM_DAY_FRACTION / (1.0 - vt->FYIELD()) + rSapOld_vt[p->slot];
2567 double demBud = fBud * std::max(0.0, mBudOpt - p->mBud) * cbm::CCDM * SIM_DAY_FRACTION / (1.0 - vt->FYIELD()) + rBudOld_vt[p->slot];
2568 double demTot = demFol + demFrt + demSap + demBud;
2569
2570 // allocation factors
2571 double afcFol( 0.0); // fraction of growth going into foliage
2572 double afcFrt( 0.0); // fraction of growth going into fine roots
2573 double afcSap( 0.0); // fraction of growth going into sapwood
2574 double afcBud( 0.0); // fraction of growth going into buds
2575 double rest( 0.0); // excess carbon not required to fulfill allocation demands
2576
2577 // allocation into free available carbon reserves has priority
2578 if (cbm::flt_greater_equal( cPool, facMax - fac)) p->dcFac = facMax - fac; else p->dcFac = cPool;
2579 double const cPool_fac = cbm::bound_min(0.0, cPool - p->dcFac);
2580
2581 // allocation according demand
2582 // - demand can be fully supplied
2583 if ( (demTot <= cPool_fac) && cbm::flt_greater_zero(cPool_fac))
2584 {
2585 afcFol = demFol / cPool_fac;
2586 afcFrt = demFrt / cPool_fac;
2587 afcSap = demSap / cPool_fac;
2588 afcBud = demBud / cPool_fac;
2589 rest = 1.0 - afcFol - afcFrt - afcSap - afcBud;
2590 }
2591 // - demand can not be fully supplied
2592 else if ( cbm::flt_greater_zero(cPool_fac))
2593 {
2594 afcFol = demFol / demTot;
2595 afcFrt = demFrt / demTot;
2596 afcSap = demSap / demTot;
2597 afcBud = demBud / demTot;
2598 }
2599
2600 // allocation of residual carbon
2601 if ( cbm::flt_greater_zero(rest))
2602 {
2603 // - for herbaceous species (grass and herbs) distribution according to root/foliage ratio
2604 if ( !(*p)->IS_WOOD())
2605 {
2606 afcFrt += (rest * vt->QRF() / (2.0 + vt->QRF()));
2607 afcFol += (rest * 1.0 / (2.0 + vt->QRF()));
2608 afcBud += (rest * 1.0 / (2.0 + vt->QRF()));
2609 }
2610 // - for woody species
2611 else
2612 {
2613 // determined growth and bud demand > 0
2614 if ( (vt->FREEGROWTH() == false) && (p->mBud < mBudOpt))
2615 {
2616 afcBud += rest;
2617 }
2618 // free growth: remaining carbon is allocated to foliage and sapwood
2619 else if ( vt->FREEGROWTH() == true)
2620 {
2621 afcSap += (rest * p->qsfm / (1.0 + p->qsfm));
2622 afcFol += (rest * (1.0 - p->qsfm / (1.0 + p->qsfm)));
2623 }
2624 // overshooting carbon goes into wood growth
2625 else
2626 {
2627 afcSap += rest;
2628 }
2629 }
2630
2631 }
2632
2633 // increase or decrease of carbon
2634 p->dcFol = cPool_fac * afcFol - rFolOld_vt[p->slot];
2635 p->dcFrt = cPool_fac * afcFrt - rFrtOld_vt[p->slot];
2636 p->dcSap = cPool_fac * afcSap - rSapOld_vt[p->slot];
2637 p->dcBud = cPool_fac * afcBud - rBudOld_vt[p->slot];
2638
2639 // all negative increase is taken from the free available carbon pool
2640 if (p->dcFol < 1.0e-8)
2641 {
2642 p->dcFac += p->dcFol;
2643 p->dcFol = 0.0;
2644 }
2645 if (p->dcFrt < 1.0e-8)
2646 {
2647 p->dcFac += p->dcFrt;
2648 p->dcFrt = 0.0;
2649 }
2650 if (p->dcSap < 1.0e-8)
2651 {
2652 p->dcFac += p->dcSap;
2653 p->dcSap = 0.0;
2654 }
2655 if (p->dcBud < 1.0e-8)
2656 {
2657 p->dcFac += p->dcBud;
2658 p->dcBud = 0.0;
2659 }
2660
2661 // consideration of growth respiration
2662 p->dcFol *= (1.0 - vt->FYIELD());
2663 p->dcFrt *= (1.0 - vt->FYIELD());
2664 p->dcSap *= (1.0 - vt->FYIELD());
2665 p->dcBud *= (1.0 - vt->FYIELD());
2666
2667 // fine-root growth must not overshoot the optimum fine-root biomass within one time step
2668 // (the priority factor fFrt = mSap/mFrt otherwise lets fine roots grow far beyond mFrtOpt in a single
2669 // subdaily step, which leads to pulsed growth and a limit cycle); the priority of fine roots in the
2670 // allocation is kept, the excess carbon goes to sapwood (woody) or foliage (herbaceous)
2671 double const dcFrtMax( std::max( 0.0, mFrtOpt - p->mFrt) * cbm::CCDM);
2672 if ( p->dcFrt > dcFrtMax)
2673 {
2674 double const excess( p->dcFrt - dcFrtMax);
2675 p->dcFrt = dcFrtMax;
2676 if ( (*p)->IS_WOOD())
2677 {
2678 p->dcSap += excess;
2679 }
2680 else
2681 {
2682 p->dcFol += excess;
2683 }
2684 }
2685
2686 // the same for buds (priority factor fBud = mSap/mBud): bud growth must not overshoot the optimum bud biomass
2687 double const dcBudMax( std::max( 0.0, mBudOpt - p->mBud) * cbm::CCDM);
2688 if ( p->dcBud > dcBudMax)
2689 {
2690 double const excess( p->dcBud - dcBudMax);
2691 p->dcBud = dcBudMax;
2692 if ( (*p)->IS_WOOD())
2693 {
2694 p->dcSap += excess;
2695 }
2696 else
2697 {
2698 p->dcFol += excess;
2699 }
2700 }
2701 }
2702}
static const double TGLIM
Definition psim.h:76
temp
Definition figures.py:62

References carbonuptake_vt, PSIM_CarAllocation(), and TGLIM.

Referenced by PSIM_CarAllocation().

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

◆ PSIM_DroughtStress()

void ldndc::PhysiologyGrowthPSIM::PSIM_DroughtStress ( )
protected

soil water availability for each plant (Soil water availability)

3940{
3941 double f_area_sum( 0.0);
3942 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
3943 {
3944 MoBiLE_Plant *p = (*vt);
3945 f_area_sum += p->f_area;
3946 }
3947 f_area_sum = cbm::bound_max( f_area_sum, 1.0);
3948
3949 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
3950 {
3951 MoBiLE_Plant *p = (*vt);
3952 p->f_h2o = this->m_state->get_fh2o( *vt, m_sipar->CP_WP(), f_area_sum);
3953 }
3954}

References PSIM_DroughtStress().

Referenced by PSIM_DroughtStress(), and PSIM_NitrogenUptake().

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

◆ PSIM_Harvest()

lerr_t ldndc::PhysiologyGrowthPSIM::PSIM_Harvest ( )
protected

harvest of plants (Management)

Returns
error code
1203{
1204 EventAttributes const * ev_harv = NULL;
1205 while ( (ev_harv = this->m_HarvestEvents.pop()) != NULL)
1206 {
1207 MoBiLE_Plant * p = m_veg->get_plant( ev_harv->get( "/name", "?"));
1208 if ( !p)
1209 {
1210 KLOGERROR( "PSIM: harvest of unknown species [species=", ev_harv->get( "/name", "?"), "]");
1211 return LDNDC_ERR_RUNTIME_ERROR;
1212 }
1213
1214 double sFol_harvest( 0.0);
1215 double nLitFol_harvest( 0.0);
1216 double sBud_harvest( 0.0);
1217 double sWoodAbove_harvest( 0.0);
1218 double nLitWoodAbove_harvest( 0.0);
1219
1220 double * sWoodBelow_harvest_sl = new double[sl_.soil_layer_cnt()];
1221 double * nLitWoodBelow_harvest_sl = new double[sl_.soil_layer_cnt()];
1222 double * sFrt_harvest_sl = new double[sl_.soil_layer_cnt()];
1223 double * nLitFrt_harvest_sl = new double[sl_.soil_layer_cnt()];
1224
1225 for (size_t sl = 0; sl < sl_.soil_layer_cnt(); ++sl)
1226 {
1227 sWoodBelow_harvest_sl[sl] = 0.0;
1228 nLitWoodBelow_harvest_sl[sl] = 0.0;
1229 sFrt_harvest_sl[sl] = 0.0;
1230 nLitFrt_harvest_sl[sl] = 0.0;
1231 }
1232
1233 int nd_harvest = m_treedyn.HandleEventsHarvest( io_kcomm,
1234 sFol_harvest, nLitFol_harvest, sBud_harvest,
1235 sWoodAbove_harvest, nLitWoodAbove_harvest,
1236 sWoodBelow_harvest_sl, nLitWoodBelow_harvest_sl,
1237 sFrt_harvest_sl, nLitFrt_harvest_sl);
1238
1239 if ( nd_harvest > 0)
1240 {
1241 // aboveground litter
1242 sc_.c_raw_lit_1_above += ((sFol_harvest + sBud_harvest) * (1.0 - (*p)->CELLULOSE() - (*p)->LIGNIN())) * cbm::CCDM;
1243 sc_.c_raw_lit_2_above += ((sFol_harvest + sBud_harvest) * (*p)->CELLULOSE()) * cbm::CCDM;
1244 sc_.c_raw_lit_3_above += ((sFol_harvest + sBud_harvest) * (*p)->LIGNIN()) * cbm::CCDM;
1245
1246 sc_.n_raw_lit_1_above += nLitFol_harvest * (1.0 - (*p)->CELLULOSE() - (*p)->LIGNIN());
1247 sc_.n_raw_lit_2_above += nLitFol_harvest * (*p)->CELLULOSE();
1248 sc_.n_raw_lit_3_above += nLitFol_harvest * (*p)->LIGNIN();
1249
1250 sc_.accumulated_c_litter_above += (sFol_harvest + sBud_harvest) * cbm::CCDM;
1251 sc_.accumulated_n_litter_above += nLitFol_harvest;
1252
1253 sc_.c_wood += sWoodAbove_harvest * cbm::CCDM;
1254 sc_.accumulated_c_litter_wood_above += sWoodAbove_harvest * cbm::CCDM;
1255
1256 sc_.n_wood += nLitWoodAbove_harvest;
1257 sc_.accumulated_n_litter_wood_above += nLitWoodAbove_harvest;
1258
1259 // belowground wood and fine roots
1260 for ( size_t sl = 0; sl < sl_.soil_layer_cnt(); sl++)
1261 {
1262 sc_.c_wood_sl[sl] += sWoodBelow_harvest_sl[sl] * cbm::CCDM;
1263 sc_.accumulated_c_litter_wood_below_sl[sl] += sWoodBelow_harvest_sl[sl] * cbm::CCDM;
1264
1265 sc_.n_wood_sl[sl] += nLitWoodBelow_harvest_sl[sl];
1266 sc_.accumulated_n_litter_wood_below_sl[sl] += nLitWoodBelow_harvest_sl[sl];
1267
1268 sc_.c_raw_lit_1_sl[sl] += sFrt_harvest_sl[sl] * (1.0 - (*p)->CELLULOSE() - (*p)->LIGNIN()) * cbm::CCDM;
1269 sc_.c_raw_lit_2_sl[sl] += sFrt_harvest_sl[sl] * (*p)->CELLULOSE() * cbm::CCDM;
1270 sc_.c_raw_lit_3_sl[sl] += sFrt_harvest_sl[sl] * (*p)->LIGNIN() * cbm::CCDM;
1271 sc_.accumulated_c_litter_below_sl[sl] += sFrt_harvest_sl[sl] * cbm::CCDM;
1272
1273 sc_.n_raw_lit_1_sl[sl] += nLitFrt_harvest_sl[sl] * (1.0 - (*p)->CELLULOSE() - (*p)->LIGNIN());
1274 sc_.n_raw_lit_2_sl[sl] += nLitFrt_harvest_sl[sl] * (*p)->CELLULOSE();
1275 sc_.n_raw_lit_3_sl[sl] += nLitFrt_harvest_sl[sl] * (*p)->LIGNIN();
1276 sc_.accumulated_n_litter_below_sl[sl] += nLitFrt_harvest_sl[sl];
1277 }
1278 }
1279
1280 delete[] sWoodBelow_harvest_sl;
1281 delete[] nLitWoodBelow_harvest_sl;
1282 delete[] sFrt_harvest_sl;
1283 delete[] nLitFrt_harvest_sl;
1284
1285 p->dcFol = 0.0;
1286 p->dcSap = 0.0;
1287 p->dcBud = 0.0;
1288 p->dcFrt = 0.0;
1289 p->dcFac = 0.0;
1290
1291 p->rRes = 0.0;
1292 p->rGro = 0.0;
1293 p->rGroBelow = 0.0;
1294 p->rFol = 0.0;
1295 p->rSap = 0.0;
1296 p->rSapBelow = 0.0;
1297 p->rBud = 0.0;
1298 p->rFrt = 0.0;
1299 p->rTra = 0.0;
1300
1301 p->sBud = 0.0;
1302 p->sSap = 0.0;
1303 p->sWoodAbove = 0.0;
1304 p->sWoodBelow = 0.0;
1305 p->sFol = 0.0;
1306 for ( size_t na = 0; na < p->nb_ageclasses(); ++na)
1307 {
1308 p->sFol_na[na] = 0.0;
1309 }
1310
1311 p->nLitFol = 0.0;
1312 p->nLitWoodAbove = 0.0;
1313 p->nLitBud = 0.0;
1314 p->n_retention = 0.0;
1315
1316 p->exsuLoss = 0.0;
1317
1318 carbonuptake_vt[p->slot] = 0.0;
1319 sacc_vt[p->slot] = invalid_dbl;
1320 rFolLeaf_vt[p->slot] = 0.0;
1321 carbonuptake_acc_vt[p->slot] = 0.0;
1322 rFolLeaf_acc_vt[p->slot] = 0.0;
1323
1324 for ( size_t sl = 0; sl < sl_.soil_layer_cnt(); ++sl)
1325 {
1326 p->sFrt_sl[sl] = 0.0;
1327 p->nLitFrt_sl[sl] = 0.0;
1328 }
1329
1330 mSapOpt_vt[p->slot] = 0.0;
1331 mSapOld_vt[p->slot] = 0.0;
1332 mCorOld_vt[p->slot] = 0.0;
1333
1334 uptNH4Max_vt[p->slot] = 0.0;
1335 uptNO3Max_vt[p->slot] = 0.0;
1336 uptDONMax_vt[p->slot] = 0.0;
1337 uptNWetMax_vt[p->slot] = 0.0;
1338 uptNWet_vt[p->slot] = 0.0;
1339 uptNTot_vt[p->slot] = 0.0;
1340
1341 for ( size_t sl = 0; sl < sl_.soil_layer_cnt(); ++sl)
1342 {
1343 uptNH4Max_vtsl[p->slot][sl] = 0.0;
1344 uptNO3Max_vtsl[p->slot][sl] = 0.0;
1345 uptDONMax_vtsl[p->slot][sl] = 0.0;
1346 }
1347
1348 rFolOld_vt[p->slot] = 0.0;
1349 rBudOld_vt[p->slot] = 0.0;
1350 rSapOld_vt[p->slot] = 0.0;
1351 rFrtOld_vt[p->slot] = 0.0;
1352 rTraOld_vt[p->slot] = 0.0;
1353 exsuLossOld_vt[p->slot] = 0.0;
1354
1355 uptNH4_vt[p->slot] = 0.0;
1356 uptNO3_vt[p->slot] = 0.0;
1357 uptNH3_vt[p->slot] = 0.0;
1358 uptDON_vt[p->slot] = 0.0;
1359
1360 uptNH4Old_vt[p->slot] = 0.0;
1361 uptNO3Old_vt[p->slot] = 0.0;
1362 uptNH3Old_vt[p->slot] = 0.0;
1363 uptDONOld_vt[p->slot] = 0.0;
1364
1365 uptNOxOld_vt[p->slot] = 0.0;
1366 uptNHyOld_vt[p->slot] = 0.0;
1367 uptN2FixOld_vt[p->slot] = 0.0;
1368
1369 PSIM_Reset( p);
1370
1371 root_system.erase( p->slot);
1372 }
1373
1374 return LDNDC_ERR_OK;
1375}
void PSIM_Reset(MoBiLE_Plant *)
Definition psim.cpp:1533
lvector_t< double > carbonuptake_acc_vt
Definition psim.h:290
lvector_t< double > rFolLeaf_acc_vt
Definition psim.h:292
std::map< int, RootSystemDNDC > root_system
Root system.
Definition psim.h:416
lvector_t< double > sacc_vt
Definition psim.h:315
lvector_t< double > rFolLeaf_vt
Definition psim.h:288

References carbonuptake_acc_vt, carbonuptake_vt, PSIM_Harvest(), PSIM_Reset(), rFolLeaf_acc_vt, rFolLeaf_vt, root_system, and sacc_vt.

Referenced by PSIM_Harvest(), and PSIM_NitrogenUptake().

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

◆ PSIM_HydraulicConductance()

void ldndc::PhysiologyGrowthPSIM::PSIM_HydraulicConductance ( )
protected

plant water potential and hydraulic conductance (Hydraulic conductance)

1745{
1746 // transpiration demand of the last time step (per ground area, m) given from potential demand derived from different stomata methods
1747 double transpiration_demand(wc_.accumulated_potentialtranspiration - accumulated_potentialtranspiration_old);
1748 accumulated_potentialtranspiration_old = wc_.accumulated_potentialtranspiration;
1749
1750 // relative recovery of plant water deficit from the last time step
1751 double rehydrationindex(0.0);
1752 if (cbm::flt_greater_zero(plant_waterdeficit_old))
1753 {
1754 rehydrationindex = cbm::bound(0.0,
1755 (plant_waterdeficit_old - wc_.plant_waterdeficit) / plant_waterdeficit_old,
1756 1.0);
1757 }
1758 plant_waterdeficit_old = wc_.plant_waterdeficit;
1759
1760 // number of hours per day
1761 double const daylength_hours(meteo::daylength(m_setup->latitude(), this->lclock()->yearday()));
1762
1763 // day/night transitions
1764 bool const is_night( cbm::flt_equal_zero( mc_.shortwaveradiation_in));
1765 bool const after_daytime( is_night && daytime);
1766 bool const after_nighttime( !is_night && !daytime);
1767 daytime = !is_night;
1768
1769 // setting soil to root hydraulic conductance equal to soil conductance
1770 double const lai_sum(m_veg->lai());
1771 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
1772 {
1773 MoBiLE_Plant* p = *vt;
1774
1775 // length of timestep [s]
1776 double const tslength = double(cbm::SEC_IN_HR) * double(cbm::HR_IN_DAY) / double(this->lclock_ref().time_resolution());
1777
1778 // transform transpiration units from m timestep-1 to mol m-2leaf s-1 and relate it to daylength
1779 // TODO: find a better way to differentiate transpiration into vegetation classes
1780 double transp_mol(0.0);
1781 double const dayl(meteo::daylength(m_setup->latitude(), this->lclock()->yearday()));
1782 if ( cbm::flt_greater_zero( lai_sum))
1783 {
1784 double transp_vt = transpiration_demand * p->lai() / lai_sum;
1785 transp_mol = transp_vt * cbm::MM_IN_M * cbm::G_IN_KG / (tslength * cbm::MH2O * p->lai());
1786 // daily time steps: transpiration occurs during daylight only
1787 if ( (this->lclock_ref().time_resolution() == 1) && cbm::flt_greater_zero( dayl))
1788 {
1789 transp_mol /= (dayl / cbm::HR_IN_DAY);
1790 }
1791 }
1792
1793 // soil layer water potential at which roots get detached (in MPa, positive units)
1794 double psi_detach(m_sipar->CP_WP() * cbm::MPA_IN_MH2O); // 150 mWS (1.5 MPa) is the predefined value for the water content at wilting point
1795
1796 // plant (root) hydraulic conductance calculated from soil water potential, weighted by fine root abundance
1797 double const SCALE_WP(1.2);
1798 p->psi_sr = 0.0;
1799 for (size_t sl = 0; sl < sl_.soil_layer_cnt(); ++sl)
1800 {
1801 double const wc( cbm::bound( 1.001 * wc_.wc_res_sl[sl],
1802 wc_.wc_sl[sl],
1803 0.999 * wc_.wc_sat_sl[sl]));
1804
1805 // soil layer water potential (in MPa, positive units)
1806 double const psi_sl( ldndc::capillary_pressure( wc, wc_.vga_sl[sl], wc_.vgn_sl[sl], wc_.vgm_sl[sl],
1807 wc_.wc_sat_sl[sl], wc_.wc_res_sl[sl] ) * cbm::MPA_IN_MH2O );
1808
1809 // soil to root water potential (MPa) weighted by fine root abundance
1810 p->psi_sr += ( std::min(SCALE_WP * m_sipar->CP_WP() * cbm::MPA_IN_MH2O, psi_sl) * p->fFrt_sl[sl] );
1811 }
1812
1813 p->psi_sr *= -1.0;
1814 psi_detach *= -1.0;
1815
1816 // plant water potential calculated considering previous declines (without gravitational impact)
1817 double psi_vt(std::max(p->psi_sr, psi_detach) + psidecline_cum_vt[p->slot]);
1818
1819 // canopy water potential
1820 // (calculated in a lumped fashion, alternatively define psi for each canopy layer separately)
1821 // - average canopy height
1822 double h_weighted(0.0); // [m]
1823 double height_cum(0.0); // [m]
1824 for (size_t fl = 0; fl < p->nb_foliagelayers(); ++fl)
1825 {
1826 height_cum += 0.5 * ph_.h_fl[fl];
1827 h_weighted += height_cum * p->fFol_fl[fl];
1828 height_cum += 0.5 * ph_.h_fl[fl];
1829 }
1830
1831 // - increase of water potential due to vertical transport (gravitational impact)
1832 double const dpsi = h_weighted * cbm::MPA_IN_KPA * cbm::KPA_IN_PA * cbm::DWAT * cbm::DM3_IN_M3 * cbm::G;
1833
1834 // decrease and recovery of plant water potential
1835 // - multiplier of transpiration induced tension (0 during the night, 1 during the day)
1836 int night(1);
1837 // - state determination after daytime
1838 if ( is_night)
1839 {
1840 night = 0;
1841
1842 if ( after_daytime)
1843 {
1844 // weighting by leaf/wood ratio as proxy for capacitance change, assuming that transpiration
1845 // primarily affects the crown tissue (foliage and branches) in relation to all living tissue
1846 // NOTE1: assuming that the degree of capacitance deficit (if it occurs) is the same in all compartments
1847 // NOTE2: doesn't consider a possible capacitance change with relative water content
1848 double const qcapacitance = (p->mFol + p->f_branch * p->mSap) / (p->mFol + p->mSap + p->mFrt);
1849
1850 // recovery of cumulative plant water potential
1851 // - due to rehysdration if stem water potential is considered (assumes that relative rehydration and plant water potential recovers in parallel)
1852 if (wc_.transpiration_method == substate_watercycle_t::TREEWATERDEFICIT)
1853 {
1854 psidecline_cum_vt[p->slot] *= std::min(1.0, (1.0 - rehydrationindex_cum_vt[p->slot]));
1855 }
1856 // - buffered by capacitance (assumes that the recovery is slowed down according to the relation between affected and total tissue)
1857 else
1858 {
1859 psidecline_cum_vt[p->slot] *= std::min(1.0, (1.0 - qcapacitance));
1860 }
1861
1862 // in case of root detachment (soil water potential below wilting point) plant water potential decline is accumulated
1863 if (cbm::flt_greater_equal(psi_detach, p->psi_sr))
1864 {
1865 psidecline_cum_vt[p->slot] += std::min(0.0, (psidecline_daycum_vt[p->slot] / daylength_hours) * qcapacitance);
1866 }
1867
1868 // reset of the cumulative rehydration index
1869 rehydrationindex_cum_vt[p->slot] = 0.0;
1870
1871 // reset the cumulative water potential deficit
1872 psidecline_daycum_vt[p->slot] = 0.0;
1873 }
1874 }
1875 // - state determination during daytime
1876 else
1877 {
1878 // calculations directly after nighttime
1879 if ( after_nighttime)
1880 {
1881 // predawn canopy water potential
1882 p->psi_pd = psi_vt - dpsi;
1883
1884 // predawn (minimum) tree water deficit = maximum diurnal radius
1885 (*vt)->twd_pd_vt = (*vt)->stem_shrinkage;
1886 (*vt)->twd_max_vt = 0.0;
1887 }
1888
1889 // minimum shrinkage (maximum tree water deficit) during the day
1890 if ((*vt)->stem_shrinkage > (*vt)->twd_max_vt)
1891 {
1892 (*vt)->twd_max_vt = (*vt)->stem_shrinkage;
1893 }
1894 }
1895
1896 // relative xylem conductivity based on current plant water potential
1897 double krc_rel_vt = 1.0 - (1.0 - std::exp(-std::pow(psi_vt / vt->PSI_REF(), vt->PSI_EXP())));
1898 krc_rel_vt = std::max(0.001, krc_rel_vt);
1899
1900 // canopy hydraulic potential in MPa (negative) due to water loss (only at daytime) considering height induced gradient
1901 p->psi_cr = psi_vt;
1902 if (cbm::flt_greater_zero(krc_rel_vt))
1903 {
1904 p->psi_cr = psi_vt - (transp_mol * double(night) / (vt->CWP_REF() * krc_rel_vt)) - dpsi; // CWP_REF is the conductance of the whole pathlength
1905 }
1906
1907 // mean canopy water potential (not important, but smoothing between timesteps)
1908 p->psi_mean = (p->psi_pd + p->psi_cr) * 0.5;
1909
1910 // drop in plant water potential (!) due to evaporative demand cumulated over the day
1911 psidecline_daycum_vt[p->slot] += std::min(0.0, (p->psi_cr + dpsi - psi_vt));
1912
1913 // daily cumulative reduction of drop in water potential after refilling (rehydration_index is in fraction per hour, needed in fraction per day)
1914 rehydrationindex_cum_vt[p->slot] += rehydrationindex;
1915 rehydrationindex_cum_vt[p->slot] = cbm::bound(0.0, rehydrationindex_cum_vt[p->slot], 1.0);
1916
1917 // overall root-to-canopy (plant hydraulic) conductance considering current day demands (in mol MPa-1 s-1 m-2)
1918 double k_rc_rel_mean = 1.0 - (1.0 - std::exp(-std::pow(p->psi_mean / vt->PSI_REF(), vt->PSI_EXP())));
1919 k_rc_rel_mean = std::max(0.001, k_rc_rel_mean);
1920
1921 // whole plant resistances (in MPa s m2 mol-1)
1922 // NOTE: resistance is reversible and is not affected by xylem senescence (e.g. embolism);
1923 // an increase of resistance with the loss of sapwood area (qsaparea_vt) is not considered
1924 p->xylem_resistance = vt->RPMIN(); // 1/RPMIN is the conductance in the crown area
1925 if (cbm::flt_greater_zero(k_rc_rel_mean))
1926 {
1927 p->xylem_resistance /= k_rc_rel_mean;
1928 }
1929
1930 } // vegetation type loop end
1931}

References PSIM_HydraulicConductance().

Referenced by PSIM_HydraulicConductance().

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

◆ PSIM_NitAllocation()

void ldndc::PhysiologyGrowthPSIM::PSIM_NitAllocation ( )
protected

nitrogen allocation (Nitrogen allocation)

2755{
2756 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
2757 {
2758 MoBiLE_Plant *p = (*vt);
2759
2760 // amount of nitrogen that is transferred from buds into foliage
2761 double const nBudLoss = mBudLoss_vt[p->slot] * p->ncBud;
2762 n_bud_to_fol_vt[p->slot] += nBudLoss;
2763
2764 // nitrogen available for allocation includes uptake from previous time step and retention from senescent tissues.
2765 // Previous time step uptakes include (uptxOld)
2766 // - uptake soil (DON, NH4, NO3)
2767 // - uptake from air (NHy, NOx)
2768 // - N2 fixation
2769 // retention from senescent tissues: n_retention
2770 double const nPool( uptDONOld_vt[p->slot] + uptNH4Old_vt[p->slot] + uptNO3Old_vt[p->slot]
2771 + uptNOxOld_vt[p->slot] + uptNHyOld_vt[p->slot] + uptN2FixOld_vt[p->slot]
2772 + p->n_retention);
2773
2774 // optimum nitrogen contents (with updated biomass values)
2775 double nFolOpt( m_pf.optimum_nitrogen_content_foliage( p)); // optimum foliage nitrogen content
2776 double nBudOpt( m_pf.optimum_nitrogen_content_buds( p)); // optimum Bud nitrogen contents
2777
2778 double const nFrtOpt = vt->NC_FINEROOTS_MAX() * (p->mFrt + p->dcFrt / cbm::CCDM);
2779 double const nSapOpt = vt->NCSAPOPT() * (p->mSap + p->dcSap / cbm::CCDM);
2780
2781 // nitrogen demand
2782 double const demFol = std::max(0.0, nFolOpt - p->n_fol()) * SIM_DAY_FRACTION;
2783 double const demSap = std::max(0.0, nSapOpt - p->n_sap()) * SIM_DAY_FRACTION;
2784 double demBud = std::max(0.0, nBudOpt - p->n_bud()) * SIM_DAY_FRACTION;
2785 double demFrt = std::max(0.0, nFrtOpt - p->n_frt()) * SIM_DAY_FRACTION;
2786 double const demTot = demFol + demFrt + demSap + demBud;
2787
2788 double afnFol( 0.0); // fraction of distributed nitrogen going into foliage
2789 double afnFrt( 0.0); // fraction of distributed nitrogen going into fine roots
2790 double afnSap( 0.0); // fraction of distributed nitrogen going into sapwood
2791 double afnBud( 0.0); // fraction of distributed nitrogen going into buds
2792
2793 if ( cbm::flt_greater_zero( nPool))
2794 {
2795 // demand can be fully supplied
2796 if ( demTot <= nPool)
2797 {
2798 afnFol = demFol / nPool;
2799 afnFrt = demFrt / nPool;
2800 afnSap = demSap / nPool;
2801 afnBud = demBud / nPool;
2802 }
2803 // demand can not be fully supplied
2804 else
2805 {
2806 // The demand potential of buds and fine roots is increased in species with ongoing growth,
2807 // reflecting a higher priority than indicated by their relatively small biomass (buds)
2808 // or position relative to nutrient uptake (roots).
2809 double const virDem( demTot - demBud - demFrt +
2810 std::max(1.0, vt->RBUDDEM()) * demBud +
2811 std::max(1.0, vt->RBUDDEM()) * demFrt);
2812 demBud *= std::max(1.0, vt->RBUDDEM());
2813 demFrt *= std::max(1.0, vt->RBUDDEM());
2814 afnFol = demFol / virDem;
2815 afnFrt = demFrt / virDem;
2816 afnSap = demSap / virDem;
2817 afnBud = demBud / virDem;
2818 }
2819 }
2820
2821 // excess nitrogen is distributed beween compartments
2822 double const rest( 1.0 - afnFol - afnFrt - afnSap - afnBud);
2823 if ( cbm::flt_greater_zero( rest))
2824 {
2825 double const n_total( p->mFol * ncFolOpt[p->slot] + p->mBud * ncBudOpt[p->slot]
2826 + p->mFrt * vt->NC_FINEROOTS_MAX() + p->mSap * vt->NCSAPOPT());
2827
2828 if ( cbm::flt_greater_zero( n_total))
2829 {
2830 afnFol += (rest * p->mFol * ncFolOpt[p->slot] / n_total);
2831 afnBud += (rest * p->mBud * ncBudOpt[p->slot] / n_total);
2832 afnFrt += (rest * p->mFrt * vt->NC_FINEROOTS_MAX() / n_total);
2833 afnSap += (rest * p->mSap * vt->NCSAPOPT() / n_total);
2834 }
2835 }
2836
2837 // nitrogen contents
2838 double const nFol( nFol_vt[p->slot] + nPool * afnFol);
2839 double const nFrt( nFrt_vt[p->slot] + nPool * afnFrt);
2840 double const nSap( nSap_vt[p->slot] + nPool * afnSap);
2841 double const nBud( nBud_vt[p->slot] + nPool * afnBud);
2842 n_fol_gain_vt[p->slot] += nPool * afnFol;
2843 n_frt_gain_vt[p->slot] += nPool * afnFrt;
2844 n_sap_gain_vt[p->slot] += nPool * afnSap;
2845 n_bud_gain_vt[p->slot] += nPool * afnBud;
2846
2847 // nitrogen concentrations
2848 if (p->mFol > 0.0) p->ncFol = std::max(0.0,nFol / (p->mFol + p->dcFol / cbm::CCDM)); else p->ncFol = 0.0;
2849 if (p->mFrt > 0.0) p->ncFrt = std::max(0.0,nFrt / (p->mFrt + p->dcFrt / cbm::CCDM)); else p->ncFrt = 0.0;
2850 if (p->mSap > 0.0) p->ncSap = std::max(0.0,nSap / (p->mSap + p->dcSap / cbm::CCDM)); else p->ncSap = 0.0;
2851 if (p->mBud > 0.0) p->ncBud = std::max(0.0,nBud / (p->mBud + p->dcBud / cbm::CCDM)); else p->ncBud = 0.0;
2852
2853 // foliage nitrogen concentration including the nitrogen transferred with buds into new foliage
2854 // (prevents zero concentrations at the beginning of flushing)
2855 if (nBudLoss > 0.0)
2856 {
2857 p->ncFol = (p->n_fol() + nBudLoss) / (p->mFol + mBudLoss_vt[p->slot]);
2858 }
2859
2860 // nitrogen exceeding the optimum concentrations of sapwood, buds, foliage and fine roots
2861 // is transferred into the core wood (up to its optimum concentration)
2862 if ( cbm::flt_greater_zero( p->mCor))
2863 {
2864 // - from sapwood
2865 if (p->mSap > 0.0 && p->ncSap > vt->NCSAPOPT())
2866 {
2867 double const transfer = std::min(p->mCor * (vt->NCSAPOPT() - p->ncCor),
2868 p->mSap * (p->ncSap - vt->NCSAPOPT())) * SIM_DAY_FRACTION;
2869 p->ncCor = (p->n_cor() + transfer) / p->mCor;
2870 p->ncSap = (p->n_sap() - transfer) / p->mSap;
2871 n_sap_to_cor_vt[p->slot] += transfer;
2872 }
2873 // - from buds
2874 if (p->mBud > 0.0 && p->ncBud > ncBudOpt[p->slot])
2875 {
2876 double const transfer = std::min(p->mCor * (vt->NCSAPOPT() - p->ncCor),
2877 p->mBud * (p->ncBud - ncBudOpt[p->slot])) * SIM_DAY_FRACTION;
2878 p->ncCor = (p->n_cor() + transfer) / p->mCor;
2879 p->ncBud = (p->n_bud() - transfer) / p->mBud;
2880 n_bud_to_cor_vt[p->slot] += transfer;
2881 }
2882
2883 // - from foliage
2884 if (p->mFol > 0.0 && p->ncFol > ncFolOpt[p->slot])
2885 {
2886 double const transfer = std::min(p->mCor * (vt->NCSAPOPT() - p->ncCor),
2887 p->mFol * (p->ncFol - ncFolOpt[p->slot])) * SIM_DAY_FRACTION;
2888 p->ncCor = (p->n_cor() + transfer) / p->mCor;
2889 p->ncFol = (p->n_fol() - transfer) / p->mFol;
2890 n_fol_to_cor_vt[p->slot] += transfer;
2891 }
2892 // - from fine roots
2893 if (p->mFrt > 0.0 && p->ncFrt > vt->NC_FINEROOTS_MAX())
2894 {
2895 double const transfer = std::min(p->mCor * (vt->NCSAPOPT() - p->ncCor),
2896 p->mFrt * (p->ncFrt - vt->NC_FINEROOTS_MAX())) * SIM_DAY_FRACTION;
2897 p->ncCor = (p->n_cor() + transfer) / p->mCor;
2898 p->ncFrt = (p->n_frt() - transfer) / p->mFrt;
2899 n_frt_to_cor_vt[p->slot] += transfer;
2900 }
2901 }
2902
2903 // remaining nitrogen demand
2904 nDem_vt[p->slot] = ( std::max(0.0, ncFolOpt[p->slot] - p->ncFol) * p->mFol
2905 + std::max(0.0, ncBudOpt[p->slot] - p->ncBud) * p->mBud
2906 + std::max(0.0, vt->NC_FINEROOTS_MAX() - p->ncFrt) * p->mFrt
2907 + std::max(0.0, vt->NCSAPOPT() - p->ncSap) * p->mSap) * SIM_DAY_FRACTION;
2908 }
2909}

References PSIM_NitAllocation().

Referenced by PSIM_NitAllocation().

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

◆ PSIM_NitrogenBalance()

void ldndc::PhysiologyGrowthPSIM::PSIM_NitrogenBalance ( )
protected

nitrogen concentrations at the end of a time step (Nitrogen concentrations)

3969{
3970 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
3971 {
3972 MoBiLE_Plant *p = (*vt);
3973
3974 // - N amounts in each compartment
3975 double n_rest( 0.0);
3976 if ( cbm::flt_greater_zero( p->mFol))
3977 {
3978 p->ncFol = (nFol_vt[p->slot] - n_fol_to_cor_vt[p->slot] + n_bud_to_fol_vt[p->slot] - p->nLitFol
3979 - n_fol_to_redistribute_vt[p->slot] + n_fol_gain_vt[p->slot]) / p->mFol;
3980 }
3981 else
3982 {
3983 n_rest += (nFol_vt[p->slot] - n_fol_to_cor_vt[p->slot] + n_bud_to_fol_vt[p->slot] - p->nLitFol
3984 - n_fol_to_redistribute_vt[p->slot] + n_fol_gain_vt[p->slot]);
3985 p->mFol = 0.0;
3986 p->ncFol = 0.0;
3987 }
3988
3989 if ( cbm::flt_greater_zero( p->mFrt))
3990 {
3991 p->ncFrt = (n_rest + nFrt_vt[p->slot] - n_frt_to_cor_vt[p->slot] - cbm::sum( p->nLitFrt_sl, sl_.soil_layer_cnt())
3992 - n_frt_to_redistribute_vt[p->slot] + n_frt_gain_vt[p->slot]) / p->mFrt;
3993 n_rest = 0.0;
3994 }
3995 else
3996 {
3997 n_rest += (nFrt_vt[p->slot] - n_frt_to_cor_vt[p->slot] - cbm::sum( p->nLitFrt_sl, sl_.soil_layer_cnt())
3998 - n_frt_to_redistribute_vt[p->slot] + n_frt_gain_vt[p->slot]);
3999 p->mFrt = 0.0;
4000 p->ncFrt = 0.0;
4001 }
4002
4003 if ( cbm::flt_greater_zero( p->mSap))
4004 {
4005 p->ncSap = (n_rest + nSap_vt[p->slot] - n_sap_to_cor_vt[p->slot] - n_sap_to_litter_vt[p->slot]
4006 - n_sap_to_redistribute_vt[p->slot] + n_sap_gain_vt[p->slot]) / p->mSap;
4007 n_rest = 0.0;
4008 }
4009 else
4010 {
4011 n_rest += (nSap_vt[p->slot] - n_sap_to_cor_vt[p->slot] - n_sap_to_litter_vt[p->slot]
4012 - n_sap_to_redistribute_vt[p->slot] + n_sap_gain_vt[p->slot]);
4013 p->mSap = 0.0;
4014 p->ncSap = 0.0;
4015 }
4016
4017 if ( cbm::flt_greater_equal( p->mBud, 0.000001))
4018 {
4019 p->ncBud = (n_rest + nBud_vt[p->slot] - n_bud_to_cor_vt[p->slot] - n_bud_to_fol_vt[p->slot] - p->nLitBud
4020 - n_bud_to_redistribute_vt[p->slot] + n_bud_gain_vt[p->slot]) / p->mBud;
4021 n_rest = 0.0;
4022 }
4023 else
4024 {
4025 n_rest += (nBud_vt[p->slot] - n_bud_to_cor_vt[p->slot] - n_bud_to_fol_vt[p->slot] - p->nLitBud
4026 - n_bud_to_redistribute_vt[p->slot] + n_bud_gain_vt[p->slot]);
4027 // remaining bud biomass (e.g., at the end of flushing) becomes litter (nitrogen is kept in n_rest)
4028 p->sBud += p->mBud;
4029 p->mBud = 0.0;
4030 p->ncBud = 0.0;
4031 }
4032 if ( cbm::flt_greater_zero( p->mCor))
4033 {
4034 p->ncCor = (n_rest + nCor_vt[p->slot] + n_fol_to_cor_vt[p->slot] + n_frt_to_cor_vt[p->slot] + n_sap_to_cor_vt[p->slot] + n_bud_to_cor_vt[p->slot]) / p->mCor;
4035 n_rest = 0.0;
4036 }
4037 else
4038 {
4039 n_rest += (nCor_vt[p->slot] + n_fol_to_cor_vt[p->slot] + n_frt_to_cor_vt[p->slot] + n_sap_to_cor_vt[p->slot] + n_bud_to_cor_vt[p->slot]);
4040 p->mCor = 0.0;
4041 p->ncCor = 0.0;
4042 }
4043 }
4044}

References PSIM_NitrogenBalance().

Referenced by PSIM_NitrogenBalance(), and PSIM_NitrogenUptake().

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

◆ PSIM_NitrogenFixation()

void ldndc::PhysiologyGrowthPSIM::PSIM_NitrogenFixation ( )
protected

nitrogen fixation (Nitrogen fixation)

3511{
3512 for (PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
3513 {
3514 MoBiLE_Plant* p = (*vt);
3515
3516 if (vt->INI_N_FIX() > 0.0 && vt->SAVANNA())
3517 {
3518 /* daily mean temperature is used also for subdaily simulations according to a regional/global function for daily N fixation */
3519 p->n2_fixation = nDem_vt[p->slot] * vt->INI_N_FIX() * NitrogenFixation_->get_nitrogen_fixation(vt, this->mc_.nd_airtemperature);
3520 p->rTra += p->n2_fixation * vt->NFIX_CEFF();
3521 nDem_vt[p->slot] -= p->n2_fixation;
3522 }
3523 else if (vt->INI_N_FIX() > 0.0)
3524 {
3525 /* note: nDem_vt refers to the current time step, i.e., INI_N_FIX is the fraction of
3526 * the nitrogen demand of the time step that is covered by fixation */
3527 p->n2_fixation = nDem_vt[p->slot] * vt->INI_N_FIX();
3528 p->rTra += p->n2_fixation * vt->NFIX_CEFF();
3529 nDem_vt[p->slot] -= p->n2_fixation;
3530 }
3531 }
3532}

References PSIM_NitrogenFixation().

Referenced by PSIM_NitrogenFixation().

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

◆ PSIM_NitrogenUptake()

void ldndc::PhysiologyGrowthPSIM::PSIM_NitrogenUptake ( )
protected

◆ PSIM_Photosynthesis()

void ldndc::PhysiologyGrowthPSIM::PSIM_Photosynthesis ( )
protected

photosynthesis and stomatal conductance by BerryBall (Photosynthesis)

991{
992 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
993 {
994 MoBiLE_Plant *p = *vt;
995
996 for (size_t fl = 0; fl < p->nb_foliagelayers(); ++fl)
997 {
998 m_photo.vpd_fl[fl] = mc_.vpd_fl[fl];
999 // relative humidity of the canopy layer (microclimate model), above canopy value if not provided
1000 m_photo.rh_fl[fl] = cbm::flt_greater_zero( mc_.rh_fl[fl]) ? mc_.rh_fl[fl] : cl_.rel_humidity_subday( lclock_ref());
1001 m_photo.temp_fl[fl] = mc_.temp_fl[fl];
1002 m_photo.parsun_fl[fl] = mc_.parsun_fl[fl];
1003 m_photo.parshd_fl[fl] = mc_.parshd_fl[fl];
1004 m_photo.tFol_fl[fl] = mc_.tFol_fl[fl];
1005 m_photo.co2_concentration_fl[fl] = ac_.ts_co2_concentration_fl[fl];
1006 m_photo.sunlitfoliagefraction_fl[fl] = mc_.ts_sunlitfoliagefraction_fl[fl];
1007 }
1008 m_photo.nd_airpressure = mc_.nd_airpressure;
1009
1010 m_photo.set_vegetation_base_state( p);
1011
1012 m_photo.set_vegetation_non_stomatal_water_limitation_state( p->xylem_resistance, p->psi_mean, p->psi_sr, p->psi_pd);
1013
1014 m_photo.solve();
1015
1016 m_photo.get_vegetation_state( p);
1017
1018 // BerryBall returns net assimilation: gross assimilation is stored as carbon uptake and
1019 // leaf dark respiration is accounted as maintenance respiration of the foliage (see PSIM_Respiration)
1020 double const conv( cbm::SEC_IN_DAY * m_photo.day_fraction * cbm::MOL_IN_UMOL * cbm::MC * cbm::KG_IN_G);
1021 for ( size_t fl = 0; fl < p->nb_foliagelayers(); ++fl)
1022 {
1023 double const r_leaf_fl( p->rd_fl[fl] * p->lai_fl[fl] * conv);
1024 p->carbonuptake_fl[fl] += r_leaf_fl;
1025 rFolLeaf_acc_vt[p->slot] += r_leaf_fl;
1026 carbonuptake_acc_vt[p->slot] += p->carbonuptake_fl[fl];
1027 }
1028 }
1029}

References carbonuptake_acc_vt, PSIM_Photosynthesis(), and rFolLeaf_acc_vt.

Referenced by PSIM_Photosynthesis().

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

◆ PSIM_PhotosynthesisRates()

void ldndc::PhysiologyGrowthPSIM::PSIM_PhotosynthesisRates ( )
protected

enzyme activities of photosynthesis (Daily enzyme activity)

3736{
3737 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
3738 {
3739 MoBiLE_Plant *p = (*vt);
3740
3741 // state of acclimation of evergreen foliage: delayed response to daily air temperature,
3742 // updated once per day (initialized with the current temperature)
3743 if ( cbm::is_invalid( sacc_vt[p->slot]))
3744 {
3745 sacc_vt[p->slot] = mc_.nd_airtemperature;
3746 }
3747 else if ( lclock()->is_position( TMODE_POST_DAILY))
3748 {
3749 sacc_vt[p->slot] += (mc_.nd_airtemperature - sacc_vt[p->slot]) / SACC_TAU;
3750 }
3751
3752 // phenological state
3753 bool const evergreen( (p->nb_ageclasses() > 1) && cbm::flt_greater_zero( p->mFol));
3754 double const pstatus( evergreen ?
3755 (p->dvsFlush * p->mFol_na[0] + (1.0 - p->dvsMort) * (cbm::sum( p->mFol_na, p->nb_ageclasses()) - p->mFol_na[0])) / p->mFol :
3756 std::min( p->dvsFlush, 1.0 - p->dvsMort));
3757
3758 // drought stress impact on enzyme activity
3759 // NOTE: consideration of water potential effects is only warranted if the whole hydraulic model is used,
3760 // i.e., with stomatal conductance according to Eller et al. 2020
3761 double fwat(1.0);
3762 if (m_photo.stomatalconductance_method == eller_2020 && p->dvsFlush > 0.99)
3763 {
3764 fwat = ldndc::non_stomatal_water_limitation( p->psi_pd, (*p)->A_REF(), (*p)->A_EXP() );
3765 }
3766
3767 // - in case drought stress decreases, its decrease is limited by recovery rate (legacy effect)
3768 const double RECOVER(0.01); // fraction recovery per hour
3769 if (fwat > p->fwatOld)
3770 {
3771 double const tslength = double(cbm::HR_IN_DAY) / double(this->lclock_ref().time_resolution());
3772 fwat = std::min(fwat, p->fwatOld + RECOVER * tslength);
3773 }
3774 p->fwatOld = fwat;
3775
3776 // enzyme activity
3777 // (activity of isoprene and monoterpene enzymes are unchanged during the dormant season)
3778 double nFolOpt(m_pf.optimum_nitrogen_content_foliage(p));
3779 double const ncFol_top = (p->mFol * p->ncFol / nFolOpt) * vt->NCFOLOPT();
3780
3781 if ( cbm::flt_greater_zero( pstatus))
3782 {
3783 for ( size_t fl = 0; fl < fl_cnt_; ++fl)
3784 {
3785 if ( cbm::flt_greater_zero( p->m_fol_fl(fl)) &&
3786 cbm::flt_greater_zero( p->sla_fl[fl]))
3787 {
3788 // nitrogen concentration in dependence on specific leaf area
3789 // (exponent should be consistent with the one used in m_pf.optimum_nitrogen_content_foliage())
3790 double const ncFol_fl( ncFol_top * pow( vt->SLAMIN() / p->sla_fl[fl], 0.3));
3791
3792 // dependency of photosynthesis linearly related to nitrogen (Reynolds et al. 1992)
3793 double const fnit( cbm::bound( 0.0, (ncFol_fl - vt->NC_FOLIAGE_MIN()) / (vt->NCFOLOPT() - vt->NC_FOLIAGE_MIN()), 1.0));
3794
3795 // seasonality factor
3796 double fdorm(0.0);
3797 // - deciduous
3798 if (p->nb_ageclasses() == 1)
3799 {
3800 if ( p->dvsFlush < 1.0)
3801 {
3802 fdorm = cbm::sqr( p->dvsFlush);
3803 }
3804 else
3805 {
3806 fdorm = 1.0 - cbm::sqr( p->dvsMort);
3807 }
3808 }
3809 // - evergreen: state of acclimation (Maekelae et al. 2004)
3810 else
3811 {
3812 fdorm = std::min( 1.0, std::max( 0.0, sacc_vt[p->slot] - SACC_X0) / SACC_SMAX);
3813 }
3814
3815 fdorm = cbm::bound( 0.0, fdorm, 1.0);
3816
3817 // temperature acclimation of the jmax/vcmax ratio (currently not applied, ftemp = 1)
3818 // NOTE: it is not clear to which growth temperature the standard values of vcmax25 and jmax25 refer
3819 // and whether a reduction of their ratio should decrease jmax, increase vcmax or both
3820 double const ftemp(1.0);
3821
3822 // activity of rubisco under standard conditions
3823 p->vcAct25_fl[fl] = vt->VCMAX25() * fnit * fdorm * fwat;
3824 // activity of maximum electron transport rate under standard conditions
3825 p->jAct25_fl[fl] = p->vcAct25_fl[fl] * vt->QJVC() * ftemp;
3826 // activity of dark respiration under standard conditions
3827 p->rdAct25_fl[fl] = p->vcAct25_fl[fl] * vt->QRD25();
3828 }
3829 else
3830 {
3831 p->vcAct25_fl[fl] = 0.0;
3832 p->jAct25_fl[fl] = 0.0;
3833 p->rdAct25_fl[fl] = 0.0;
3834 }
3835 }
3836 }
3837 else
3838 {
3839 for ( size_t fl = 0; fl < fl_cnt_; ++fl)
3840 {
3841 p->vcAct25_fl[fl] = 0.0;
3842 p->jAct25_fl[fl] = 0.0;
3843 p->rdAct25_fl[fl] = 0.0;
3844 }
3845 }
3846 }
3847}
static const double SACC_TAU
Definition psim.h:86
static const double SACC_SMAX
Definition psim.h:90
static const double SACC_X0
Definition psim.h:88
double non_stomatal_water_limitation(double const &_var, double const &_var_ref, double const &_var_scale)
Non stomatal water limitation.
Definition ld_droughtstress.cpp:144

References ldndc::non_stomatal_water_limitation(), PSIM_PhotosynthesisRates(), SACC_SMAX, SACC_TAU, sacc_vt, and SACC_X0.

Referenced by PSIM_NitrogenUptake(), and PSIM_PhotosynthesisRates().

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

◆ PSIM_PlantingEvent()

lerr_t ldndc::PhysiologyGrowthPSIM::PSIM_PlantingEvent ( )
protected

initializes plants after planting events

Returns
error code
603{
604 std::vector< std::pair< MoBiLE_Plant *, species::wood_properties_t const * > > trees_planted;
605
606 EventAttributes const * ev_plant = NULL;
607 while ( (ev_plant = m_PlantEvents.pop()) != NULL)
608 {
609 MoBiLE_Plant *vt = m_veg->get_plant( ev_plant->get( "/name", "?"));
610 if ( !vt)
611 {
612 KLOGERROR( "Handling plant event failed [species=", ev_plant->get( "/name", "?"),"]");
613 return LDNDC_ERR_RUNTIME_ERROR;
614 }
615
616 species_t const * sp = NULL;
617 if ( m_species)
618 {
619 sp = m_species->get_species( vt->cname());
620 }
621
622 root_system.insert( { vt->slot, RootSystemDNDC( m_state, io_kcomm) } );
623
624 /* plants that are not part of the event input (e.g., planted dynamically by
625 * eventhandler:succession) are initialized from the event attributes */
626 species::wood_properties_t wood_ev;
627 species::grass_properties_t grass_ev;
628 species::crop_properties_t crop_ev;
629 if ( !sp)
630 {
631 species::species_properties_t * props[3] = { &wood_ev, &grass_ev, &crop_ev };
632 wood_ev.initialize();
633 grass_ev.initialize();
634 crop_ev.initialize();
635 for ( int k = 0; k < 3; ++k)
636 {
637 props[k]->initial_biomass = ev_plant->get( "/initial-biomass", invalid_dbl);
638 props[k]->fractional_cover = ev_plant->get( "/fractional-cover", 1.0);
639 props[k]->height_max = ev_plant->get( "/maximum-height", invalid_dbl);
640 props[k]->height_min = ev_plant->get( "/minimum-height", invalid_dbl);
641 props[k]->root_depth = ev_plant->get( "/root-depth", invalid_dbl);
642 }
643 wood_ev.dbh = ev_plant->get( "/diameter-at-breast-height", invalid_dbl);
644 wood_ev.number = ev_plant->get( "/tree-number", invalid_dbl);
645 wood_ev.volume = ev_plant->get( "/tree-volume", invalid_dbl);
646 wood_ev.reduc_fac_c = ev_plant->get( "/reduction-factor-of-carbon", 1.0);
647 crop_ev.seedling_number = ev_plant->get( "/seedling-number", invalid_dbl);
648 }
649
650 lerr_t rc_plant = LDNDC_ERR_OK;
651 char const * group = ev_plant->get( "/group", "?");
652 if ( cbm::is_equal( group, "wood"))
653 {
654 rc_plant = m_pf.initialize_tree( vt, sp ? sp->wood() : &wood_ev, crownlength_opt, competition_opt);
655
656 // note: trees are currently not collected for a repeated initialization (see below)
657 //trees_planted.push_back( std::make_pair( vt, sp->wood()));
658 }
659 else if ( cbm::is_equal( group, "grass"))
660 {
661 rc_plant = m_pf.initialize_grass( vt, sp ? sp->grass() : &grass_ev);
662 }
663 else if ( cbm::is_equal( group, "crop"))
664 {
665 rc_plant = m_pf.initialize_crop( vt, sp ? sp->crop() : &crop_ev);
666 }
667 if ( rc_plant)
668 {
669 KLOGERROR( "Plant initialization failed [species=", vt->name(),"]");
670 return LDNDC_ERR_FAIL;
671 }
672
673 // initialize local state variables after planting
674 if ( vt->dEmerg > 0)
675 {
676 if ( (int)lclock()->yearday() > vt->dEmerg)
677 {
678 days_since_emergence[vt->slot] = (int)(lclock()->yearday()) - vt->dEmerg;
679 }
680 else
681 {
682 // use 366 on purpose to ensure always: days_since_emergence > 0
683 days_since_emergence[vt->slot] = (int)(lclock()->yearday()) + (366 - vt->dEmerg);
684 }
685 }
686 else
687 {
688 days_since_emergence[vt->slot] = 0;
689 }
690
691 if ( lclock()->yearday() >= PSIM_YEAR_START)
692 {
693 phenological_year[vt->slot] = lclock()->year();
694 }
695 else
696 {
697 phenological_year[vt->slot] = lclock()->year() - 1;
698 }
699
700 foliage_age_of_start_senescence[vt->slot] = m_pf.get_foliage_age_of_senescence( vt, 0.0);
701
702 for ( size_t na = 0; na < vt->nb_ageclasses(); ++na)
703 {
704 foliage_age_na[vt->slot][na] = m_pf.get_foliage_age( PSIM_YEAR_START, lclock()->yearday(), na);
705 }
706 }
707
708
709 /* each tree was initialized without knowing the trees planted after it:
710 * a repeated initialization would let all trees see each other (shared crown cover, competition)
711 * NOTE: currently inactive since trees_planted is not filled (see above) */
712 if ( trees_planted.size() > 1)
713 {
714 for (size_t t = 0; t < trees_planted.size(); ++t)
715 {
716 lerr_t rc_plant = m_pf.initialize_tree(trees_planted[t].first, trees_planted[t].second,
718 if (rc_plant)
719 {
720 KLOGERROR("Plant initialization failed [species=", trees_planted[t].first->name(), "]");
721 return LDNDC_ERR_FAIL;
722 }
723 }
724 }
725
726 return LDNDC_ERR_OK;
727}
cbm::string_t crownlength_opt
Definition psim.h:115
bool competition_opt
Definition psim.h:118

References competition_opt, crownlength_opt, PSIM_PlantingEvent(), and root_system.

Referenced by PSIM_PlantingEvent().

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

◆ PSIM_Potentialtranspiration()

void ldndc::PhysiologyGrowthPSIM::PSIM_Potentialtranspiration ( )
protected

potential transpiration (Potential transpiration)

3864{
3865 double potential_transpiration_sum( 0.0);
3866
3867 for ( PlantIterator vt = m_veg->begin(); vt != m_veg->end(); ++vt)
3868 {
3869 MoBiLE_Plant *p( *vt);
3870
3871 double potential_transpiration_vt( 0.0);
3872 if (vt->IS_WOOD())
3873 {
3874 if ( wc_.transpiration_method == substate_watercycle_t::WATERUSEEFFICIENCY)
3875 {
3876 // carbon uptake of the respective species (not of the whole vegetation), vapour pressure
3877 // deficit of the time step and soil water availability weighted by the fine root distribution
3879 sl_.soil_layer_cnt(),
3880 mc_.ts_watervaporsaturationdeficit,
3881 cbm::sum( p->carbonuptake_fl, fl_cnt_),
3882 vt->WUECMAX(),
3883 vt->WUECMIN(),
3884 p->fFrt_sl,
3885 wc_.wc_sl,
3886 wc_.wc_wp_sl,
3887 wc_.wc_fc_sl);
3888 }
3889 else // transpiration_method == "treewaterdeficit", "potentialtranspiration"
3890 {
3891 potential_transpiration_vt += potential_transpiration_stomatal_conductance_limited(
3892 p->nb_foliagelayers(),
3893 vt->GSMIN(),
3894 vt->GSMAX(),
3895 p->lai_fl,
3896 mc_.vpd_fl,
3897 p->relativeconductance_fl) * cbm::HR_IN_DAY * lclock()->day_fraction();
3898 }
3899 }
3900 else
3901 {
3902 // carbon uptake of the respective species (not of the whole vegetation)
3903 potential_transpiration_vt += potential_transpiration_unlimited(
3904 ac_.nd_co2_concentration,
3905 cbm::sum( p->carbonuptake_fl, fl_cnt_),
3906 vt->WUECMAX());
3907 }
3908
3909 p->f_ptransp = potential_transpiration_vt;
3910 potential_transpiration_sum += potential_transpiration_vt;
3911 wc_.accumulated_potentialtranspiration += potential_transpiration_vt;
3912 }
3913
3914 for ( PlantIterator vt = m_veg->begin(); vt != m_veg->end(); ++vt)
3915 {
3916 MoBiLE_Plant* p( *vt);
3917 if (cbm::flt_greater_zero( potential_transpiration_sum))
3918 {
3919 p->f_ptransp /= potential_transpiration_sum;
3920 }
3921 else
3922 {
3923 p->f_ptransp = 0.0;
3924 }
3925 }
3926}
double potential_transpiration_soil_atmosphere_limited_root_scaled(size_t _soil_layer_cnt, double _vpd, double _carbon_uptake, double _wuecmax, double _wuecmin, double const *_frt_sl, lvector_t< double > const &_wc, lvector_t< double > const &_wc_min, lvector_t< double > const &_wc_max)
Returns potential transpiration in [m].
Definition ld_transpiration.cpp:231
double potential_transpiration_stomatal_conductance_limited(size_t, double gsmin, double gsmax, double *_lai_fl, lvector_t< double > _vpd_fl, double *_relative_conductance_fl)
Returns potential transpiration in [m].
Definition ld_transpiration.cpp:302
double potential_transpiration_unlimited(double _co2, double _carbon_uptake, double _wuecmax)
Returns potential transpiration in [m].
Definition ld_transpiration.cpp:55

References ldndc::potential_transpiration_soil_atmosphere_limited_root_scaled(), ldndc::potential_transpiration_stomatal_conductance_limited(), ldndc::potential_transpiration_unlimited(), and PSIM_Potentialtranspiration().

Referenced by PSIM_Potentialtranspiration().

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

◆ PSIM_Reset()

void ldndc::PhysiologyGrowthPSIM::PSIM_Reset ( MoBiLE_Plant * _p)
protected

reset of species specific fluxes at the beginning of a time step or after harvest

1534{
1535 n_bud_to_fol_vt[_p->slot] = 0.0;
1536 n_sap_to_cor_vt[_p->slot] = 0.0;
1537 n_bud_to_cor_vt[_p->slot] = 0.0;
1538 n_fol_to_cor_vt[_p->slot] = 0.0;
1539 n_frt_to_cor_vt[_p->slot] = 0.0;
1540 n_sap_to_litter_vt[_p->slot] = 0.0;
1541
1542 n_sap_to_redistribute_vt[_p->slot] = 0.0;
1543 n_bud_to_redistribute_vt[_p->slot] = 0.0;
1544 n_fol_to_redistribute_vt[_p->slot] = 0.0;
1545 n_frt_to_redistribute_vt[_p->slot] = 0.0;
1546
1547 n_sap_gain_vt[_p->slot] = 0.0;
1548 n_bud_gain_vt[_p->slot] = 0.0;
1549 n_fol_gain_vt[_p->slot] = 0.0;
1550 n_frt_gain_vt[_p->slot] = 0.0;
1551
1552 uptNH4_vt[_p->slot] = 0.0;
1553 uptNO3_vt[_p->slot] = 0.0;
1554 uptNH3_vt[_p->slot] = 0.0;
1555 uptDON_vt[_p->slot] = 0.0;
1556
1557 // note: canopy layer uptake of NHy and NOx (nhy_uptake_fl, nox_uptake_fl) refers to all plants
1558 // and is reset for each time step in PSIM_NitrogenUptake
1559
1560 _p->nox_uptake = 0.0;
1561 _p->nhy_uptake = 0.0;
1562 _p->n2_fixation = 0.0;
1563
1564 fsub_vt[_p->slot] = 0.0;
1565 mBudLoss_vt[_p->slot] = 0.0;
1566 sWoodAboveSen_vt[_p->slot] = 0.0;
1567 ncFolOpt[_p->slot] = 0.0;
1568 ncBudOpt[_p->slot] = 0.0;
1569 nDem_vt[_p->slot] = 0.0;
1570 nFol_vt[_p->slot] = 0.0;
1571 nFrt_vt[_p->slot] = 0.0;
1572 nSap_vt[_p->slot] = 0.0;
1573 nCor_vt[_p->slot] = 0.0;
1574 nBud_vt[_p->slot] = 0.0;
1575
1576 ts_leaftemp_vt[_p->slot] = 0.0;
1577 nd_leaftemp_vt[_p->slot] = 0.0;
1578}

References PSIM_Reset(), and sWoodAboveSen_vt.

Referenced by PSIM_Harvest(), PSIM_Reset(), and PSIM_StepInit().

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

◆ PSIM_ResetBiomassFromLastYear()

void ldndc::PhysiologyGrowthPSIM::PSIM_ResetBiomassFromLastYear ( )
protected

static stand structure: removal of annual wood increment (Static stand structure)

836{
837 if ( (lclock()->yearday() == PSIM_YEAR_START) &&
838 lclock()->is_position( TMODE_POST_DAILY))
839 {
840 bool reduce_biomass( have_forest_structure() ? false : true);
841
842 if( (target_biomass > 0.0) || (target_treenumber > 0))
843 {
844 double bio_now( 0.0);
845 double n_now( 0.0);
846 for ( TreeIterator vt = m_veg->groupbegin< species::wood >();
847 vt != m_veg->groupend< species::wood >(); ++vt)
848 {
849 MoBiLE_Plant* p = (*vt);
850 bio_now += p->aboveground_biomass();
851 n_now += p->tree_number;
852 }
853
854 if ( (target_biomass > 0.0) && cbm::flt_greater( bio_now, target_biomass))
855 {
856 reduce_biomass = true;
857 }
858
859 if ( (target_treenumber > 0) && (n_now < target_treenumber))
860 {
861 // tree number increases with the relative biomass if a target biomass is given
862 double const treenumber_new( (target_biomass > 0.0 ?
863 cbm::bound( 0.1, bio_now / target_biomass, 1.0) : 1.0) * target_treenumber);
864
865 for ( TreeIterator vt = m_veg->groupbegin< species::wood >();
866 vt != m_veg->groupend< species::wood >(); ++vt)
867 {
868 MoBiLE_Plant *p = (*vt);
869
870 double const hd_competition_factor_old( !competition_opt ?
871 1.0 : m_treedyn.m_alm.height_competition_factor( p, m_veg));
872
873 double const tree_volume(cbm::flt_greater_zero(p->tree_number) ?
874 p->stand_volume() / p->tree_number : 0.0);
875
876 // potential height according to current stem volume
877 double height_pot( m_treedyn.m_alm.height_from_volume(
878 (*p)->CONIFEROUS(),
879 (*p)->TAP_P1(), (*p)->TAP_P2(), (*p)->TAP_P3(),
880 (*p)->HD_MAX(),
881 tree_volume));
882 double const height_fraction( cbm::flt_greater_zero( height_pot) ?
883 p->height_max / height_pot : 1.0);
884
885 // potential diameter at breast height according to current biomass
886 double const d_eff( m_treedyn.m_alm.effective_dbh(p->height_max, p->dbh, p->dbas, (*p)->HREF()));
887 double dbh_pot( m_treedyn.m_alm.diameter_at_breast_height_from_volume_and_height(
888 (*p)->CONIFEROUS(),
889 (*p)->TAP_P1(), (*p)->TAP_P2(), (*p)->TAP_P3(), (*p)->HREF(),
890 height_pot,
891 d_eff,
892 tree_volume));
893 double const dbh_fraction( cbm::flt_greater_zero( dbh_pot) ? p->dbh / dbh_pot : 1.0);
894
895 // potential diameter at ground height according to current biomass
896 double const dbas_pot = (m_treedyn.m_alm.diameter_at_ground(
897 dbh_pot,
898 height_pot,
899 tree_volume,
900 (*p)->HD_MIN(), (*p)->HD_MAX(), (*p)->HD_EXP(), (*p)->HREF(),
901 hd_competition_factor_old));
902
903 double const dbas_fraction( cbm::flt_greater_zero( dbas_pot) ? p->dbas / dbas_pot : 1.0);
904
905 p->tree_number = std::max( p->tree_number, treenumber_new);
906 m_treedyn.m_alm.restructure_vegetation(
907 p,
909 hd_competition_factor_old,
910 height_fraction,
911 dbas_fraction,
912 dbh_fraction);
913 }
914 }
915 }
916
917 if ( reduce_biomass)
918 {
919 for ( TreeIterator vt = m_veg->groupbegin< species::wood >();
920 vt != m_veg->groupend< species::wood >(); ++vt)
921 {
922 MoBiLE_Plant *p = (*vt);
923
924 // distributing below- and aboveground biomass according to tree section heights (consistent with assumptions of biomass/volume relations)
925 double const relative_belowground_fraction( 1.0 - p->fraction_aboveground().living);
926
927 if ( cbm::flt_greater_zero( mSapOld_vt[p->slot]) &&
928 cbm::flt_greater( p->mSap, mSapOld_vt[p->slot]))
929 {
930 double const sap_loss( p->mSap - mSapOld_vt[p->slot]); // difference in sapwood biomass between years
931 double const n_sap_loss( sap_loss * p->ncSap); // not strictly true if ncSap has changed during the year
932
933 p->sWoodAbove += (1.0 - relative_belowground_fraction) * sap_loss;
934 p->nLitWoodAbove += (1.0 - relative_belowground_fraction) * n_sap_loss;
935
936 for ( size_t sl = 0; sl < sl_.soil_layer_cnt(); ++sl)
937 {
938 p->sWoodBelow_sl[sl] += relative_belowground_fraction * sap_loss * p->fFrt_sl[sl];
939 p->nLitWoodBelow_sl[sl] += relative_belowground_fraction * n_sap_loss * p->fFrt_sl[sl];
940 }
941 p->mSap -= sap_loss;
942 }
943 mSapOld_vt[p->slot] = p->mSap;
944
945 if ( cbm::flt_greater_zero( mCorOld_vt[p->slot]) &&
946 cbm::flt_greater( p->mCor, mCorOld_vt[p->slot]))
947 {
948 double const cor_loss( p->mCor - mCorOld_vt[p->slot]);
949 double const n_cor_loss( cor_loss * p->ncCor);
950
951 p->sWoodAbove += (1.0 - relative_belowground_fraction) * cor_loss;
952 p->nLitWoodAbove += (1.0 - relative_belowground_fraction) * n_cor_loss;
953
954 for ( size_t sl = 0; sl < sl_.soil_layer_cnt(); ++sl)
955 {
956 p->sWoodBelow_sl[sl] += relative_belowground_fraction * cor_loss * p->fFrt_sl[sl];
957 p->nLitWoodBelow_sl[sl] += relative_belowground_fraction * n_cor_loss * p->fFrt_sl[sl];
958 }
959 p->mCor -= cor_loss;
960 }
961 mCorOld_vt[p->slot] = p->mCor;
962 }
963 }
964 }
965}
bool have_forest_structure()
Definition psim.cpp:800
double target_biomass
Definition psim.h:133
int target_treenumber
Definition psim.h:135

References competition_opt, crownlength_opt, have_forest_structure(), PSIM_ResetBiomassFromLastYear(), target_biomass, and target_treenumber.

Referenced by PSIM_ResetBiomassFromLastYear().

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

◆ PSIM_ResetFlushing()

void ldndc::PhysiologyGrowthPSIM::PSIM_ResetFlushing ( )
protected

reset of phenology at the end of a phenological season

1460{
1461 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
1462 {
1463 MoBiLE_Plant *p = (*vt);
1464
1465 if ( p->nb_ageclasses() > 1)
1466 {
1467 // for evergreen plants always reset at the beginning of the new year
1468 if ( (lclock()->yearday() >= PSIM_YEAR_START) &&
1469 (lclock()->year() > phenological_year[p->slot]))
1470 {
1471 phenological_year[p->slot] = lclock()->year();
1473 }
1474 }
1475 else
1476 {
1477 // for non-evergreen plants phenological season ends with full mortality
1478 if ( cbm::flt_greater_equal( p->dvsMort, 1.0))
1479 {
1480 // immediate reset if more than one phenological season is possible within one year
1481 if ( additional_season[p->slot] == true)
1482 {
1484
1485 // grasses: the flush of an additional season (after early, drought induced
1486 // senescence) may only use the bud reserve exceeding a minimum reserve that is
1487 // kept for the next regular season; otherwise repeated drought spells within
1488 // one rainy season exhaust the reserve and the grass cannot recover
1489 if ( p->groupId() == SPECIES_GROUP_GRASS)
1490 {
1491 double const reserve_keep( PSIM_GRASS_RESERVE_KEEP * m_pf.get_optimum_foliage_biomass_grass( p));
1492 p->mBudStart = cbm::bound_min( 0.0, p->mBud - reserve_keep);
1493 }
1494 }
1495 // for one phenological season per year always reset at the beginning of the new year
1496 else if ( (lclock()->yearday() >= PSIM_YEAR_START) &&
1497 (lclock()->year() > phenological_year[p->slot]))
1498 {
1499 phenological_year[p->slot] = lclock()->year();
1501 }
1502 }
1503 }
1504 }
1505}
void PSIM_ResetPhenology(MoBiLE_Plant *)
Definition psim.cpp:1509

References PSIM_ResetFlushing(), and PSIM_ResetPhenology().

Referenced by PSIM_ResetFlushing().

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

◆ PSIM_ResetPhenology()

void ldndc::PhysiologyGrowthPSIM::PSIM_ResetPhenology ( MoBiLE_Plant * _p)
protected

reset of phenological state variables and shift of foliage age classes

1510{
1511 _p->dEmerg = -1;
1512 foliage_age_of_start_senescence[_p->slot] = m_pf.get_foliage_age_of_senescence( _p, 0.0);
1513 days_since_emergence[_p->slot] = 0;
1514 _p->dvsFlush = 0.0;
1515 _p->dvsFlushOld = 0.0;
1516 _p->growing_degree_days = 0.0;
1517 _p->mFolMax = 0.0;
1518 _p->mBudStart = _p->mBud;
1519
1520 //shift foliage age class
1521 for ( int na = _p->nb_ageclasses()-1; na > 0; --na)
1522 {
1523 _p->mFol_na[na] = _p->mFol_na[na-1];
1524 foliage_age_na[_p->slot][static_cast< size_t >( na)] = foliage_age_na[_p->slot][static_cast< size_t >( na-1)];
1525 }
1526 _p->mFol_na[0] = 0.0;
1527 foliage_age_na[_p->slot][0] = 0;
1528 additional_season[_p->slot] = false;
1529}

References PSIM_ResetPhenology().

Referenced by PSIM_ResetFlushing(), and PSIM_ResetPhenology().

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

◆ PSIM_ResizeVegetationVectors()

void ldndc::PhysiologyGrowthPSIM::PSIM_ResizeVegetationVectors ( )
protected

resizes species specific vectors if new plants have been added

487{
488 // compare number of vegetation types
489 size_t const slot_cnt( m_veg->slot_cnt());
490 size_t const slot_cnt_old( additional_season.size());
491
492 if ( slot_cnt <= slot_cnt_old)
493 {
494 return;
495 }
496
497 additional_season.resize_and_preserve( slot_cnt, false);
498 dry_days.resize_and_preserve( slot_cnt, 0);
499 phenological_year.resize_and_preserve( slot_cnt, 0);
500 foliage_age_of_start_senescence.resize_and_preserve( slot_cnt, 0);
501 days_since_emergence.resize_and_preserve( slot_cnt, 0);
502
503 // average (effective) temperatures of all leaves of a vegetation type
504 ts_leaftemp_vt.resize_and_preserve( slot_cnt, 0.0);
505 nd_leaftemp_vt.resize_and_preserve( slot_cnt, 0.0);
506
507 uptNH4Max_vt.resize_and_preserve( slot_cnt, 0.0); // max. ammonium uptake from the soil
508 uptNO3Max_vt.resize_and_preserve( slot_cnt, 0.0); // max. nitrate uptake from the soil
509 uptDONMax_vt.resize_and_preserve( slot_cnt, 0.0); // max. dissolved organic nitrogen uptake from the soil
510 uptNWetMax_vt.resize_and_preserve( slot_cnt, 0.0); // max. canopy uptake from wet deposition (currently not considered)
511 uptNWet_vt.resize_and_preserve( slot_cnt, 0.0); // canopy uptake from wet deposition (currently not considered)
512 uptNTot_vt.resize_and_preserve( slot_cnt, 0.0); // total nitrogen uptake from the soil
513
514 rFolOld_vt.resize_and_preserve( slot_cnt, 0.0);
515 rBudOld_vt.resize_and_preserve( slot_cnt, 0.0);
516 rSapOld_vt.resize_and_preserve( slot_cnt, 0.0);
517 rFrtOld_vt.resize_and_preserve( slot_cnt, 0.0);
518 rTraOld_vt.resize_and_preserve( slot_cnt, 0.0);
519 exsuLossOld_vt.resize_and_preserve( slot_cnt, 0.0);
520
521 uptNH4_vt.resize_and_preserve( slot_cnt, 0.0);
522 uptNO3_vt.resize_and_preserve( slot_cnt, 0.0);
523 uptNH3_vt.resize_and_preserve( slot_cnt, 0.0);
524 uptDON_vt.resize_and_preserve( slot_cnt, 0.0);
525
526 uptNH4Old_vt.resize_and_preserve( slot_cnt, 0.0);
527 uptNO3Old_vt.resize_and_preserve( slot_cnt, 0.0);
528 uptNH3Old_vt.resize_and_preserve( slot_cnt, 0.0);
529 uptDONOld_vt.resize_and_preserve( slot_cnt, 0.0);
530
531 uptNOxOld_vt.resize_and_preserve( slot_cnt, 0.0);
532 uptNHyOld_vt.resize_and_preserve(slot_cnt, 0.0);
533 uptN2FixOld_vt.resize_and_preserve(slot_cnt, 0.0);
534
535 while ( slot_cnt > uptNH4Max_vtsl.size())
536 {
537 std::vector<double> help_sl( sl_.soil_layer_cnt(), 0.0);
538 uptNH4Max_vtsl.push_back( help_sl);
539 }
540 while ( slot_cnt > uptNO3Max_vtsl.size())
541 {
542 std::vector<double> help_sl( sl_.soil_layer_cnt(), 0.0);
543 uptNO3Max_vtsl.push_back( help_sl);
544 }
545 while ( slot_cnt > uptDONMax_vtsl.size())
546 {
547 std::vector<double> help_sl( sl_.soil_layer_cnt(), 0.0);
548 uptDONMax_vtsl.push_back( help_sl);
549 }
550 while ( slot_cnt > foliage_age_na.size())
551 {
552 std::vector< int > help_sl( MoBiLE_MaximumAgeClasses, 0);
553 foliage_age_na.push_back( help_sl);
554 }
555
556 carbonuptake_vt.resize_and_preserve( slot_cnt, 0.0);
557 rFolLeaf_vt.resize_and_preserve( slot_cnt, 0.0);
558 carbonuptake_acc_vt.resize_and_preserve( slot_cnt, 0.0);
559 rFolLeaf_acc_vt.resize_and_preserve( slot_cnt, 0.0);
560 xylem_resistance_smoothed_old_vt.resize_and_preserve(slot_cnt, 0.0);
561 psidecline_cum_vt.resize_and_preserve(slot_cnt, 0.0);
562 psidecline_daycum_vt.resize_and_preserve(slot_cnt, 0.0);
563 rehydrationindex_cum_vt.resize_and_preserve(slot_cnt, 0.0);
564
565 // state variables kept between time steps (not reset in PSIM_Reset)
566 mSapOpt_vt.resize_and_preserve( slot_cnt, 0.0);
567 mSapOld_vt.resize_and_preserve( slot_cnt, 0.0);
568 mCorOld_vt.resize_and_preserve( slot_cnt, 0.0);
569 qsaparea_vt.resize_and_preserve(slot_cnt, 0.0);
570 fsub_vt.resize_and_preserve(slot_cnt, 0.0);
571 sacc_vt.resize_and_preserve(slot_cnt, invalid_dbl);
572
573 mBudLoss_vt.resize_and_preserve( slot_cnt, 0.0); // dry matter transfered from buds to foliage
574 sWoodAboveSen_vt.resize_and_preserve( slot_cnt, 0.0);
575 ncFolOpt.resize_and_preserve( slot_cnt, 0.0); // optimum nitrogen concentration of the whole foliage of one species (gN gDW-1)
576 ncBudOpt.resize_and_preserve( slot_cnt, 0.0); // optimum nitrogen concentration of the whole structural storage of one species (gN gDW-1)
577 nDem_vt.resize_and_preserve( slot_cnt, 0.0); // species specific nitrogen demand (kgN)
578 nFol_vt.resize_and_preserve( slot_cnt, 0.0); // last days foliage nitrogen content (kg)
579 nFrt_vt.resize_and_preserve( slot_cnt, 0.0); // last days fine root nitrogen content (kg)
580 nSap_vt.resize_and_preserve( slot_cnt, 0.0); // last days sapwood nitrogen content (kg)
581 nCor_vt.resize_and_preserve( slot_cnt, 0.0); // last days corwood nitrogen content (kg)
582 nBud_vt.resize_and_preserve( slot_cnt, 0.0); // last days bud nitrogen content (kg)
583
584 n_bud_to_fol_vt.resize_and_preserve( slot_cnt, 0.0);
585 n_sap_to_cor_vt.resize_and_preserve( slot_cnt, 0.0);
586 n_bud_to_cor_vt.resize_and_preserve( slot_cnt, 0.0);
587 n_fol_to_cor_vt.resize_and_preserve( slot_cnt, 0.0);
588 n_frt_to_cor_vt.resize_and_preserve( slot_cnt, 0.0);
589 n_sap_to_litter_vt.resize_and_preserve( slot_cnt, 0.0);
590 n_sap_to_redistribute_vt.resize_and_preserve( slot_cnt, 0.0);
591 n_bud_to_redistribute_vt.resize_and_preserve( slot_cnt, 0.0);
592 n_fol_to_redistribute_vt.resize_and_preserve( slot_cnt, 0.0);
593 n_frt_to_redistribute_vt.resize_and_preserve( slot_cnt, 0.0);
594 n_sap_gain_vt.resize_and_preserve( slot_cnt, 0.0);
595 n_bud_gain_vt.resize_and_preserve( slot_cnt, 0.0);
596 n_fol_gain_vt.resize_and_preserve( slot_cnt, 0.0);
597 n_frt_gain_vt.resize_and_preserve( slot_cnt, 0.0);
598}

References carbonuptake_acc_vt, carbonuptake_vt, PSIM_ResizeVegetationVectors(), rFolLeaf_acc_vt, rFolLeaf_vt, sacc_vt, and sWoodAboveSen_vt.

Referenced by PSIM_ResizeVegetationVectors().

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

◆ PSIM_Respiration()

void ldndc::PhysiologyGrowthPSIM::PSIM_Respiration ( )
protected

growth, transport and maintenance respiration (Respiration)

3017{
3018 double km( 0.0); // maintenance coefficient
3019
3020 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
3021 {
3022 MoBiLE_Plant *p = (*vt);
3023
3024 p->rFol = 0.0;
3025 p->rFrt = 0.0;
3026 p->rSap = 0.0;
3027 p->rBud = 0.0;
3028
3029 // total carbon allocated for structural compartment growth
3030 double const growth( p->dcFol + p->dcFrt + p->dcSap + p->dcBud + exsuLossOld_vt[p->slot]);
3031
3032 // respiration for mineral- and nitrogen uptake, nitrate reduction, phloem carbon transport
3033 // TODO: costs for the uptake of DON are not considered
3034 double const rUpt( PAMM * std::max(0.0,uptNH4Old_vt[p->slot] + uptNHyOld_vt[p->slot]) // reduced soil/ canopy nitrogen
3035 + PNIT * std::max(0.0,uptNO3Old_vt[p->slot] + uptNOxOld_vt[p->slot]) // oxidized soil/ canopy nitrogen
3036 + PMIN * growth * FMIN / cbm::CCDM); // other minerals than nitrogen
3037
3038 // respiration costs for nitrogen reduction
3039 double const rNit( PREDFRT * uptNO3Old_vt[p->slot] * FRFRT + PREDSAP * uptNO3Old_vt[p->slot] * (1.0 - FRFRT)
3040 + PREDSAP * uptNOxOld_vt[p->slot]);
3041
3042 double const rPhl( PPHLOE * (p->dcFrt + p->dcSap + exsuLossOld_vt[p->slot]));
3043
3044 p->rTra = rUpt + rPhl + rNit;
3045
3046 // growth respiration (note that growth is already reduced by (1-FYIELD). This needs to be compensated first if growth respiration should be derived)
3047 // note: root exudation of the current time step is part of fine root growth that has been reduced by (1-FYIELD)
3048 // in PSIM_CarAllocation, i.e., the respective growth respiration has been taken from the current time step
3049 p->rGro = (p->dcFol + p->dcFrt + p->dcSap + p->dcBud + p->exsuLoss) * vt->FYIELD() / (1.0 - vt->FYIELD());
3050
3051 // sapwood below-ground fraction
3052 double const sap_wood_frac( 1.0 - p->fraction_aboveground().living);
3053 double const dc_sum( std::max( 0.0, p->dcFol)
3054 + std::max( 0.0, p->dcFrt)
3055 + std::max( 0.0, p->dcSap)
3056 + std::max( 0.0, p->dcBud));
3057
3058 double const dc_below( std::max( 0.0, p->dcFrt) + std::max( 0.0, p->dcSap * sap_wood_frac) );
3059 p->rGroBelow = ((dc_sum > 0.0) ? p->rGro * dc_below / dc_sum : 0.0);
3060
3061 // residual respiration
3062 // - carbon availability restriction factor (linear decrease with the relative amount of free available carbon)
3063 double const qfac( p->f_fac / vt->FFACMAX());
3064 fsub_vt[p->slot] = std::min(1.0, qfac);
3065
3066 static double const zft( 1.0 / (( TROPT - TRMIN) * ( TROPT - TRMIN) * ( TRMAX - TROPT)));
3067
3068 // - foliage: leaf dark respiration from the photosynthesis model (day and night)
3069 p->rFol = rFolLeaf_vt[p->slot];
3070
3071 // - fine roots
3072 if (p->mFrt > 0.0)
3073 {
3074 for ( size_t sl = 0; sl < sl_.soil_layer_cnt(); ++sl)
3075 {
3076 if (( temp_sl[sl] > TRMIN) && ( temp_sl[sl] < TRMAX))
3077 {
3078 km = vt->KM20() * cbm::sqr(temp_sl[sl] - TRMIN) * (TRMAX - temp_sl[sl]) * zft;
3079 }
3080 else
3081 {
3082 km = 0.0;
3083 }
3084
3085 // n content of the particular layer (kg)
3086 double const nlay( p->n_frt() * p->fFrt_sl[sl]);
3087 p->rFrt += ( km * fsub_vt[p->slot] * nlay) * SIM_DAY_FRACTION;
3088 }
3089 }
3090
3091 // - sapwood and buds
3092 if (( ts_leaftemp_vt[p->slot] > TRMIN) && ( ts_leaftemp_vt[p->slot] < TRMAX))
3093 {
3094 km = vt->KM20() * cbm::sqr( ts_leaftemp_vt[p->slot] - TRMIN) * (TRMAX - ts_leaftemp_vt[p->slot]) * zft;
3095 }
3096 else
3097 {
3098 km = 0.0;
3099 }
3100
3101 // reduction factor accounting for activity loss of sapwood with age
3102 double fsapage( pow( this->lclock()->days_in_year() * vt->TOSAP(), vt->FAGE()));
3103 if (p->mSap > 0.0)
3104 {
3105 p->rSap = km * fsapage * fsub_vt[p->slot] * p->n_sap() * SIM_DAY_FRACTION;
3106 p->rSapBelow = (p->rSap * sap_wood_frac);
3107 }
3108
3109 if (p->mBud > 0.0)
3110 {
3111 p->rBud = km * fsub_vt[p->slot] * p->n_bud() * SIM_DAY_FRACTION;
3112 }
3113
3114 // - dormant grasses (no foliage between full senescence and the next flush) strongly
3115 // reduce the maintenance respiration of the remaining tissues; otherwise a long dry
3116 // season consumes bud reserves and fine roots (about 1 % per day at 30 oC)
3117 if (( p->groupId() == SPECIES_GROUP_GRASS) && ( p->nb_ageclasses() == 1) &&
3118 ( !cbm::flt_greater_zero( p->dvsFlush) || cbm::flt_greater_equal( p->dvsMort, 1.0)))
3119 {
3120 p->rFrt *= PSIM_GRASS_DORMANT_RESPIRATION;
3121 p->rSap *= PSIM_GRASS_DORMANT_RESPIRATION;
3122 p->rSapBelow *= PSIM_GRASS_DORMANT_RESPIRATION;
3123 p->rBud *= PSIM_GRASS_DORMANT_RESPIRATION;
3124 }
3125
3126 // - total residual respiration
3127 p->rRes = p->rFol + p->rFrt + p->rSap + p->rBud;
3128 }
3129}
static const double TROPT
Definition psim.h:82
static const double PREDFRT
Definition psim.h:72
static const double PNIT
Definition psim.h:68
static const double PMIN
Definition psim.h:66
static const double PAMM
Definition psim.h:62
static const double FRFRT
Definition psim.h:58
static const double PREDSAP
Definition psim.h:74
static const double TRMAX
Definition psim.h:78
static const double FMIN
Definition psim.h:60
static const double PPHLOE
Definition psim.h:70
static const double TRMIN
Definition psim.h:80

References FMIN, FRFRT, PAMM, PMIN, PNIT, PPHLOE, PREDFRT, PREDSAP, PSIM_Respiration(), rFolLeaf_vt, TRMAX, TRMIN, and TROPT.

Referenced by PSIM_Respiration().

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

◆ PSIM_Senescence()

void ldndc::PhysiologyGrowthPSIM::PSIM_Senescence ( )
protected

senescence and nitrogen retranslocation (Senescence)

2101{
2102 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
2103 {
2104 MoBiLE_Plant *p = (*vt);
2105
2106 // increase foliage age of one day
2107 if ( lclock()->is_position( TMODE_POST_DAILY))
2108 {
2109 for ( size_t na = 0; na < p->nb_ageclasses(); ++na)
2110 {
2111 foliage_age_na[p->slot][na] += 1;
2112 }
2113 }
2114
2115 // xylem loss by loss of conductivity (calculated from plant water potential)
2116 // - smoothed xylem resistance (currently over 30 days)
2117 double const fsmooth(1.0 / 30.0);
2118 double xylem_resistance_smoothed_vt = p->xylem_resistance * fsmooth + xylem_resistance_smoothed_old_vt[p->slot] * (1.0 - fsmooth);
2119
2120 // - initialization at the beginning of the simulation (where xylem_resistance_smoothed_old_vt[p->slot] is zero)
2121 if (xylem_resistance_smoothed_old_vt[p->slot] <= 0.0)
2122 {
2123 xylem_resistance_smoothed_old_vt[p->slot] = vt->RPMIN();
2124 }
2125
2126 // - previous day percentage loss of conductance (PLC)
2127 double plc_smoothed_old(0.0);
2128 if (cbm::flt_greater_zero(xylem_resistance_smoothed_old_vt[p->slot]))
2129 {
2130 plc_smoothed_old = 1.0 - std::min(1.0, vt->RPMIN() / xylem_resistance_smoothed_old_vt[p->slot]);
2131 }
2132
2133 // - current day percentage loss of conductance (PLC)
2134 double plc_smoothed(0.0);
2135 if (cbm::flt_greater_zero(xylem_resistance_smoothed_vt))
2136 {
2137 plc_smoothed = 1.0 - std::min(1.0, vt->RPMIN() / xylem_resistance_smoothed_vt);
2138 }
2139
2140 // - update previous day xylem resistance factor
2141 xylem_resistance_smoothed_old_vt[p->slot] = xylem_resistance_smoothed_vt;
2142
2143 // - start and end PLC thresholds for tissue damage
2144 double const plc_damage_start = vt->DFOL(); // default 1.0, i.e., drought induced senescence is deactivated
2145 double const plc_damage_end = 1.0; // ends if all xylem is lost
2146
2147 // - xylem area loss due to conductance loss
2148 double rLoss(0.0);
2149 if (plc_smoothed > plc_damage_start && plc_smoothed > plc_smoothed_old && plc_damage_end > plc_damage_start)
2150 {
2151 // -- in case xylem loss has already happened, the new loss needs to start from the current (old) PLC value
2152 double const adjusted_plc_smoothed_old = (plc_smoothed_old < plc_damage_start) ? plc_damage_start : plc_smoothed_old;
2153
2154 // -- xylem loss is realized based on the increase of PLC between previous and current day,
2155 // relative to the PLC range between start and end of damage
2156 // (negative if PLC did not exceed the start threshold before, i.e., bound to zero)
2157 rLoss = std::max(0.0, std::min(1.0, (plc_smoothed - adjusted_plc_smoothed_old) / (plc_damage_end - plc_damage_start)));
2158 }
2159
2160 // xylem area loss as the maximum of stress and age related loss
2161 double area_loss_age(0.0);
2162 if ((p->height_max - cbm::HLIMIT) > vt->HREF())
2163 {
2164 area_loss_age = p->sap_area * vt->TOSAP() * SIM_DAY_FRACTION;
2165 }
2166
2167 double const area_loss_stress( p->sap_area * rLoss );
2168 double const area_loss(std::max(area_loss_stress, area_loss_age));
2169
2170 // transformation from area to sapwood biomass losses per tree and per m2
2171 double const sSap_tree(vt->DSAP() * cbm::DM3_IN_M3 * area_loss * (p->h_trunk + p->h_crown/3.0 * (1.0+vt->FBRA()) + p->h_depth/3.0 * (1.0+p->fcrt_eff())));
2172 p->sSap = cbm::bound_max(p->mSap, sSap_tree * p->tree_number * cbm::HA_IN_M2);
2173
2174 // woody litter production by branch and coarse root fractions per m2
2175 // (note: sWoodAbove may already contain woody litter from the static stand structure,
2176 // hence the branch litter from senescence is stored separately)
2177 sWoodAboveSen_vt[p->slot] = vt->DSAP() * cbm::DM3_IN_M3 * area_loss * p->h_crown/3.0 * vt->FBRA() * p->tree_number * cbm::HA_IN_M2;
2178 p->sWoodAbove += sWoodAboveSen_vt[p->slot];
2179 p->sWoodBelow += (vt->DSAP() * cbm::DM3_IN_M3 * area_loss * p->h_depth/3.0 * p->fcrt_eff() * p->tree_number * cbm::HA_IN_M2);
2180
2181 // early senescence is not possible before 90% of flushing has been reached.
2182 double const DVS_FLUSH_NEEDED_FOR_SENESCENCE( 0.9);
2183 // (grasses: only after a persistent drought, short dry spells within the rainy season
2184 // do not end the season)
2185 if ( ( cbm::flt_greater( (*p)->H2OREF_SENESCENCE(), p->f_h2o)) &&
2186 ( cbm::flt_greater( p->dvsFlush, DVS_FLUSH_NEEDED_FOR_SENESCENCE)) &&
2187 (( p->groupId() != SPECIES_GROUP_GRASS) || ( dry_days[p->slot] >= PSIM_GRASS_DROUGHT_DAYS)))
2188 {
2189 foliage_age_of_start_senescence[p->slot] = std::min( foliage_age_na[p->slot][p->nb_ageclasses()-1],
2190 foliage_age_of_start_senescence[p->slot]);
2191 additional_season[p->slot] = true;
2192 }
2193
2194 p->sFol = 0.0;
2195 p->dvsMort = 0.0;
2196 for ( size_t na = 0; na < p->nb_ageclasses(); ++na)
2197 {
2198 //no senescence during flushing of new foliage
2199 if ( na == 0)
2200 {
2201 if ( !cbm::flt_greater( p->dvsFlush, DVS_FLUSH_NEEDED_FOR_SENESCENCE))
2202 {
2203 p->sFol_na[na] = 0.0;
2204 continue;
2205 }
2206 }
2207
2208 // senescence development stage of the previous day/timestep
2209 double const dvs_mort_old( m_pf.get_dvs_mortality_of_age_class( foliage_age_of_start_senescence[p->slot],
2210 (*p)->NDMORTA(), foliage_age_na[p->slot][na]-1));
2211
2212 // actual senescence development stage
2213 double const dvs_mort( m_pf.get_dvs_mortality_of_age_class( foliage_age_of_start_senescence[p->slot],
2214 (*p)->NDMORTA(), foliage_age_na[p->slot][na]));
2215
2216 // foliage senescence and average mortality state
2217 if (dvs_mort_old <= 0.0001)
2218 {
2219 p->sFol_na[na] = 0.0;
2220 }
2221 else if (dvs_mort < 0.99999)
2222 {
2223 p->sFol_na[na] = p->mFol_na[na] * (1.0-(1.0-dvs_mort)/(1.0-dvs_mort_old)) * SIM_DAY_FRACTION;
2224 }
2225 else if ( cbm::flt_greater_zero( p->mFol_na[na]))
2226 {
2227 p->sFol_na[na] = p->mFol_na[na] * SIM_DAY_FRACTION;
2228 }
2229 else
2230 {
2231 p->sFol_na[na] = 0.0;
2232 }
2233
2234 p->sFol += p->sFol_na[na];
2235 p->dvsMort += m_pf.get_dvs_mortality_contribution_of_age_class( p, na, dvs_mort);
2236 }
2237
2238 // check for sufficient supply tissue for foliage and increase senescence if necessary
2239 if ( cbm::flt_greater_zero( rLoss))
2240 {
2241 double const sFol_stress( rLoss * p->mFol);
2242
2243 // the larger of the two stress factors is taken for further compilation (similar to sapwood)
2244 if ( cbm::flt_greater( sFol_stress, p->sFol))
2245 {
2246 double srest( sFol_stress - p->sFol);
2247 p->sFol = sFol_stress;
2248
2249 // reduce foliage starting from oldest age classes (youngest age class na = 0 is excluded)
2250 double sFol_stress_na( 0.0);
2251 for ( int na = static_cast< int >( p->nb_ageclasses()) - 1; na > 0; --na)
2252 {
2253 if ( cbm::flt_greater_zero( p->mFol_na[na] - p->sFol_na[na]) &&
2254 cbm::flt_greater_zero( srest))
2255 {
2256 sFol_stress_na = cbm::bound_max( p->mFol_na[na] - p->sFol_na[na], srest);
2257 p->sFol_na[na] += sFol_stress_na;
2258 srest = cbm::bound_min( 0.0, srest - sFol_stress_na);
2259 }
2260 }
2261 }
2262
2263 }
2264
2265 // control
2266 if ( cbm::flt_greater_equal( p->sFol, p->mFol ) ||
2267 cbm::flt_greater_equal( p->dvsMort, 1.0 ))
2268 {
2269 p->sFol = p->mFol;
2270 p->dvsMort = 1.0;
2271 }
2272
2273 // fine root senescence
2274 double const mFrt_min( 0.001);
2275 if ( cbm::flt_greater( p->mFrt, mFrt_min))
2276 {
2277 for ( size_t sl = 0; sl < sl_.soil_layer_cnt(); ++sl)
2278 {
2279 p->sFrt_sl[sl] = cbm::bound_max( p->mFrt * vt->TOFRTBAS() * SIM_DAY_FRACTION * p->fFrt_sl[sl],
2280 p->mFrt * p->fFrt_sl[sl]);
2281 }
2282 }
2283 else
2284 {
2285 for ( size_t sl = 0; sl < sl_.soil_layer_cnt(); ++sl)
2286 {
2287 p->sFrt_sl[sl] = 0.0;
2288 }
2289 }
2290
2291 // senescence of buds is currently not considered
2292 // (a bud loss due to insufficient sapwood area for the upcoming foliage is not applied
2293 // as long as water supply is also restricting flushing)
2294 p->sBud = 0.0;
2295
2296 // nitrogen retention
2297 double const nDemOld(( std::max(0.0, ncFolOpt[p->slot] - p->ncFol) * p->mFol
2298 + std::max(0.0, ncBudOpt[p->slot] - p->ncBud) * p->mBud
2299 + std::max(0.0, vt->NC_FINEROOTS_MAX() - p->ncFrt) * p->mFrt
2300 + std::max(0.0, vt->NCSAPOPT() - p->ncSap) * p->mSap) * SIM_DAY_FRACTION);
2301
2302 // total nitrogen in tissue litterfall before abscision
2303 double const sFrtLit( cbm::sum( p->sFrt_sl, sl_.soil_layer_cnt()));
2304 double const sWoodSen( sWoodAboveSen_vt[p->slot] + p->sWoodBelow);
2305 double const nRetMax(( p->sFol*p->ncFol + sWoodSen*p->ncSap + p->sBud*p->ncBud + sFrtLit*p->ncFrt) * vt->FRET_N());
2306
2307 // fraction of total nitrogen in litter that is relocated into other tissues
2308 double nRetFol( 0.0); // amount of nitrogen relocated from foliage litter
2309 double nRetFrt( 0.0); // amount of nitrogen relocated from fine root litter
2310 double nRetSap( 0.0); // amount of nitrogen relocated from abscised sapwood litter
2311 double nRetBud( 0.0); // amount of nitrogen relocated from buds litter
2312 if ( cbm::flt_greater_zero( nRetMax))
2313 {
2314 double const fRet( std::min(1.0, nDemOld / nRetMax) * vt->FRET_N());
2315 nRetFol = fRet * p->ncFol * p->sFol;
2316 nRetFrt = fRet * p->ncFrt * sFrtLit;
2317 nRetSap = fRet * p->ncSap * sWoodSen;
2318 nRetBud = fRet * p->ncBud * p->sBud;
2319 p->n_retention = nRetFol + nRetFrt + nRetSap + nRetBud;
2320 }
2321
2322 // nitrogen losses into litter by compartment
2323 p->nLitFol = p->sFol * p->ncFol - nRetFol;
2324 p->nLitBud = p->sBud * p->ncBud - nRetBud;
2325
2326 n_sap_to_litter_vt[p->slot] = sWoodSen * p->ncSap - nRetSap;
2327 n_sap_to_cor_vt[p->slot] = (p->sSap * p->ncSap) - n_sap_to_litter_vt[p->slot];
2328
2329 // woody litter (branches aboveground, coarse roots belowground distributed like fine roots)
2330 // with nitrogen in proportion to the respective litter amounts
2331 double const fWoodLitBelow( cbm::flt_greater_zero( sWoodSen) ? p->sWoodBelow / sWoodSen : 0.0);
2332 p->nLitWoodAbove += n_sap_to_litter_vt[p->slot] * (1.0 - fWoodLitBelow);
2333 for ( size_t sl = 0; sl < sl_.soil_layer_cnt(); ++sl)
2334 {
2335 p->sWoodBelow_sl[sl] += p->sWoodBelow * p->fFrt_sl[sl];
2336 p->nLitWoodBelow_sl[sl] += n_sap_to_litter_vt[p->slot] * fWoodLitBelow * p->fFrt_sl[sl];
2337 }
2338
2339 for ( size_t sl = 0; sl < sl_.soil_layer_cnt(); ++sl)
2340 {
2341 p->nLitFrt_sl[sl] += (p->sFrt_sl[sl] * p->ncFrt) - (nRetFrt * p->fFrt_sl[sl]);
2342 }
2343
2344 n_fol_to_redistribute_vt[p->slot] += nRetFol;
2345 n_frt_to_redistribute_vt[p->slot] += nRetFrt;
2346 n_bud_to_redistribute_vt[p->slot] += nRetBud;
2347 n_sap_to_redistribute_vt[p->slot] += nRetSap;
2348 }
2349}

References PSIM_Senescence(), and sWoodAboveSen_vt.

Referenced by PSIM_Senescence().

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

◆ PSIM_SoilCarbonRelease()

void ldndc::PhysiologyGrowthPSIM::PSIM_SoilCarbonRelease ( )
protected

root exudation (Root exudation)

2714{
2715 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
2716 {
2717 MoBiLE_Plant *p = (*vt);
2718
2719 // exudation is determined from remaining root growth
2720 p->exsuLoss = (p->dcFrt * vt->PEXS());
2721
2722 // root growth is decreased
2723 p->dcFrt -= p->exsuLoss;
2724
2725 if (p->dcFrt < 0.0)
2726 {
2727 p->dcFrt = 0.0;
2728 }
2729 }
2730}

References PSIM_SoilCarbonRelease().

Referenced by PSIM_SoilCarbonRelease().

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

◆ PSIM_StepInit()

void ldndc::PhysiologyGrowthPSIM::PSIM_StepInit ( )
protected

initializes a growth time step (soil nitrogen, carbon uptake, temperatures)

732{
733 for ( size_t sl = 0; sl < sl_.soil_layer_cnt(); ++sl)
734 {
735 nh4_sl[sl] = sc_.nh4_sl[sl];
736 no3_sl[sl] = sc_.no3_sl[sl] + sc_.an_no3_sl[sl];
737 don_sl[sl] = sc_.don_sl[sl];
738 }
739
740 fl_cnt_ = m_veg->canopy_layers_used();
741
742 if ( subdaily_timemode())
743 {
744 temp_sl.reference( mc_.temp_sl);
745 ts_temp_fl.reference( mc_.temp_fl);
746
747 no_concentration_fl.reference( ac_.ts_no_concentration_fl);
748 no2_concentration_fl.reference( ac_.ts_no2_concentration_fl);
749 nh3_concentration_fl.reference( ac_.ts_nh3_concentration_fl);
750 nhy_uptake_fl.reference( ph_.ts_nhy_uptake_fl);
751 nox_uptake_fl.reference( ph_.ts_nox_uptake_fl);
752
753 // grazing event by external module
754 if ( lclock()->subday() == 1)
755 {
756 m_eventgraze.reset_daily_food_consumption();
757 }
758 }
759 else
760 {
761 temp_sl.reference( mc_.nd_temp_sl);
762 ts_temp_fl.reference( mc_.nd_temp_fl);
763
764 no_concentration_fl.reference( ac_.nd_no_concentration_fl);
765 no2_concentration_fl.reference( ac_.nd_no2_concentration_fl);
766 nh3_concentration_fl.reference( ac_.nd_nh3_concentration_fl);
767 nhy_uptake_fl.reference( ph_.nd_nhy_uptake_fl);
768 nox_uptake_fl.reference( ph_.nd_nox_uptake_fl);
769
770 m_eventgraze.reset_daily_food_consumption();
771 }
772
773 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
774 {
775 MoBiLE_Plant *p = *vt;
776
777 // gross assimilation and leaf dark respiration since the last growth time step
778 // (including the current time step, see PSIM_Photosynthesis)
779 carbonuptake_vt[p->slot] = carbonuptake_acc_vt[p->slot];
780 rFolLeaf_vt[p->slot] = rFolLeaf_acc_vt[p->slot];
781 carbonuptake_acc_vt[p->slot] = 0.0;
782 rFolLeaf_acc_vt[p->slot] = 0.0;
783
784 PSIM_Reset( p);
785
786 // leaf temperature
787 ts_leaftemp_vt[p->slot] = m_pf.leaf_temperature_( ts_temp_fl, p);
788 nd_leaftemp_vt[p->slot] = m_pf.leaf_temperature_( mc_.nd_temp_fl, p);
789 }
790
791 // concentration of nitrogen oxides (NO + NO2) in the air
792 for ( size_t fl = 0; fl < fl_cnt_; ++fl)
793 {
794 cNOx_fl[fl] = no_concentration_fl[fl] + no2_concentration_fl[fl];
795 }
796}
bool subdaily_timemode()
Definition psim.cpp:479

References carbonuptake_acc_vt, carbonuptake_vt, PSIM_Reset(), PSIM_StepInit(), rFolLeaf_acc_vt, rFolLeaf_vt, and subdaily_timemode().

Referenced by PSIM_StepInit().

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

◆ PSIM_StepOut()

void ldndc::PhysiologyGrowthPSIM::PSIM_StepOut ( )
protected

transfer of litter, exudates and soil nitrogen to soil chemistry, storage of fluxes for the next time step

1100{
1101 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
1102 {
1103 MoBiLE_Plant *p = (*vt);
1104
1105 rFolOld_vt[p->slot] = p->rFol;
1106 rBudOld_vt[p->slot] = p->rBud;
1107 rSapOld_vt[p->slot] = p->rSap;
1108 rFrtOld_vt[p->slot] = p->rFrt;
1109 rTraOld_vt[p->slot] = p->rTra;
1110 exsuLossOld_vt[p->slot] = p->exsuLoss;
1111
1112 uptNH4Old_vt[p->slot] = uptNH4_vt[p->slot];
1113 uptNO3Old_vt[p->slot] = uptNO3_vt[p->slot];
1114 uptNH3Old_vt[p->slot] = uptNH3_vt[p->slot];
1115 uptDONOld_vt[p->slot] = uptDON_vt[p->slot];
1116
1117 uptNOxOld_vt[p->slot] = p->nox_uptake;
1118 uptNHyOld_vt[p->slot] = p->nhy_uptake;
1119 // note: stored at the end of the time step since n2_fixation is reset by the SubdailyInitializer
1120 uptN2FixOld_vt[p->slot] = p->n2_fixation;
1121
1122 // aboveground litter
1123 sc_.c_raw_lit_1_above += ((p->sFol + p->sBud) * (1.0 - vt->CELLULOSE() - vt->LIGNIN())) * cbm::CCDM;
1124 sc_.c_raw_lit_2_above += ((p->sFol + p->sBud) * vt->CELLULOSE()) * cbm::CCDM;
1125 sc_.c_raw_lit_3_above += ((p->sFol + p->sBud) * vt->LIGNIN()) * cbm::CCDM;
1126
1127 sc_.n_raw_lit_1_above += (p->nLitFol + p->nLitBud) * (1.0 - vt->CELLULOSE() - vt->LIGNIN());
1128 sc_.n_raw_lit_2_above += (p->nLitFol + p->nLitBud) * vt->CELLULOSE();
1129 sc_.n_raw_lit_3_above += (p->nLitFol + p->nLitBud) * vt->LIGNIN();
1130
1131 sc_.accumulated_c_litter_above += (p->sFol + p->sBud) * cbm::CCDM;
1132 sc_.accumulated_n_litter_above += (p->nLitFol + p->nLitBud);
1133
1134 sc_.c_wood += p->sWoodAbove * cbm::CCDM;
1135 sc_.accumulated_c_litter_wood_above += p->sWoodAbove * cbm::CCDM;
1136
1137 sc_.n_wood += p->nLitWoodAbove;
1138 sc_.accumulated_n_litter_wood_above += p->nLitWoodAbove;
1139
1140
1141 // belowground wood and fine roots
1142 for ( size_t sl = 0; sl < sl_.soil_layer_cnt(); sl++)
1143 {
1144 sc_.c_wood_sl[sl] += p->sWoodBelow_sl[sl] * cbm::CCDM;
1145 sc_.accumulated_c_litter_wood_below_sl[sl] += p->sWoodBelow_sl[sl] * cbm::CCDM;
1146
1147 sc_.n_wood_sl[sl] += p->nLitWoodBelow_sl[sl];
1148 sc_.accumulated_n_litter_wood_below_sl[sl] += p->nLitWoodBelow_sl[sl];
1149
1150 sc_.c_raw_lit_1_sl[sl] += p->sFrt_sl[sl] * (1.0 - vt->CELLULOSE() - vt->LIGNIN()) * cbm::CCDM;
1151 sc_.c_raw_lit_2_sl[sl] += p->sFrt_sl[sl] * vt->CELLULOSE() * cbm::CCDM;
1152 sc_.c_raw_lit_3_sl[sl] += p->sFrt_sl[sl] * vt->LIGNIN() * cbm::CCDM;
1153 sc_.accumulated_c_litter_below_sl[sl] += p->sFrt_sl[sl] * cbm::CCDM;
1154
1155 sc_.n_raw_lit_1_sl[sl] += p->nLitFrt_sl[sl] * (1.0 - vt->CELLULOSE() - vt->LIGNIN());
1156 sc_.n_raw_lit_2_sl[sl] += p->nLitFrt_sl[sl] * vt->CELLULOSE();
1157 sc_.n_raw_lit_3_sl[sl] += p->nLitFrt_sl[sl] * vt->LIGNIN();
1158 sc_.accumulated_n_litter_below_sl[sl] += p->nLitFrt_sl[sl];
1159 }
1160
1161 // root exsudation
1162 if ( cbm::flt_greater_zero( p->exsuLoss))
1163 {
1164 for ( size_t sl = 0; sl < sl_.soil_layer_cnt(); ++sl)
1165 {
1166 sc_.doc_sl[sl] += p->exsuLoss * p->fFrt_sl[sl];
1167 sc_.accumulated_c_root_exsudates_sl[sl] += p->exsuLoss * p->fFrt_sl[sl];
1168 }
1169 }
1170 }
1171
1172 for ( size_t sl = 0; sl < sl_.soil_layer_cnt(); ++sl)
1173 {
1174 if ( cbm::flt_greater_zero( nh4_sl[sl]))
1175 {
1176 sc_.nh4_sl[sl] = nh4_sl[sl];
1177 }
1178 else { sc_.nh4_sl[sl] = 0.0; }
1179
1180 if ( cbm::flt_greater_zero( don_sl[sl]))
1181 {
1182 sc_.don_sl[sl] = don_sl[sl];
1183 }
1184 else { sc_.don_sl[sl] = 0.0; }
1185
1186 double const no3_tot( sc_.no3_sl[sl] + sc_.an_no3_sl[sl]);
1187 if ( cbm::flt_greater_zero( no3_tot))
1188 {
1189 sc_.no3_sl[sl] = sc_.no3_sl[sl] / no3_tot * no3_sl[sl];
1190 sc_.an_no3_sl[sl] = no3_sl[sl] - sc_.no3_sl[sl];
1191 }
1192 else
1193 {
1194 sc_.no3_sl[sl] = no3_sl[sl] * (1.0 - sc_.anvf_sl[sl]);
1195 sc_.an_no3_sl[sl] = no3_sl[sl] - sc_.no3_sl[sl];
1196 }
1197 }
1198}

References PSIM_StepOut().

Referenced by PSIM_NitrogenUptake(), and PSIM_StepOut().

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

◆ PSIM_UpdateNitrogenConc()

void ldndc::PhysiologyGrowthPSIM::PSIM_UpdateNitrogenConc ( )
protected

optimum nitrogen concentrations and nitrogen amounts at the beginning of a time step

1583{
1584 for ( PlantIterator vt = this->m_veg->begin(); vt != this->m_veg->end(); ++vt)
1585 {
1586 MoBiLE_Plant *p = (*vt);
1587
1588 /* Update optimum N concentrations */
1589 double nFolOpt( m_pf.optimum_nitrogen_content_foliage( p));
1590 ncFolOpt[p->slot] = ( p->mFol > 0.0) ? ( nFolOpt / p->mFol) : vt->NCFOLOPT();
1591
1592 double nBudOpt( m_pf.optimum_nitrogen_content_buds( p));
1593 ncBudOpt[p->slot] = ( p->mBud > 0.0) ? ( nBudOpt / p->mBud) : vt->NCFOLOPT();
1594
1595 /* N amounts in each compartment */
1596 nFol_vt[p->slot] = p->n_fol();
1597 nFrt_vt[p->slot] = p->n_frt();
1598 nSap_vt[p->slot] = p->n_sap();
1599 nBud_vt[p->slot] = p->n_bud();
1600 nCor_vt[p->slot] = p->n_cor();
1601 }
1602}

References PSIM_UpdateNitrogenConc().

Referenced by PSIM_UpdateNitrogenConc().

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

◆ PSIM_VegStructure()

lerr_t ldndc::PhysiologyGrowthPSIM::PSIM_VegStructure ( )
protected

dimensional growth, crowding, mortality and disturbance events of trees (Stand structure)

Returns
error code
4121{
4122 if( lclock()->is_position( TMODE_POST_DAILY))
4123 {
4124 for ( TreeIterator w = m_veg->groupbegin< species::wood >(); w != m_veg->groupend< species::wood >(); ++w)
4125 {
4126 MoBiLE_Plant *p = *w;
4127
4128 m_treedyn.Growth( p,
4129 // daily totals: d_* holds the completed steps of the day, the current
4130 // step is added by the SubdailyFinalizer only after this module
4131 p->d_dcSap + p->dcSap,
4132 p->d_sSap + p->sSap,
4134 /* rootgrowth_opt,
4135 branchfraction_opt,
4136 crownlength_opt,*/
4138
4139 if ( m_treedyn.OnStructureChange( p, &root_system.at( p->slot)))
4140 {
4141 KLOGERROR( "PSIM: update of tree structure after growth failed [species=", p->name(), "]");
4142 return LDNDC_ERR_FAIL;
4143 }
4144
4145 if ( (this->lclock()->day()==1) && (this->lclock()->month()==1))
4146 {
4147 m_treedyn.Crowding( p, crownlength_opt);
4148 if ( m_treedyn.OnStructureChange( p, &root_system.at( p->slot)))
4149 {
4150 KLOGERROR( "PSIM: update of tree structure after crowding failed [species=", p->name(), "]");
4151 return LDNDC_ERR_FAIL;
4152 }
4153 }
4154
4155 m_treedyn.Mortality( p,
4156 p->sWoodAbove, p->nLitWoodAbove,
4157 p->sWoodBelow_sl, p->nLitWoodBelow_sl);
4158 if ( m_treedyn.OnStructureChange( p, &root_system.at( p->slot)))
4159 {
4160 KLOGERROR( "PSIM: update of tree structure after mortality failed [species=", p->name(), "]");
4161 return LDNDC_ERR_FAIL;
4162 }
4163 }
4164 }
4165
4166 for ( TreeIterator w = m_veg->groupbegin< species::wood >(); w != m_veg->groupend< species::wood >(); ++w)
4167 {
4168 MoBiLE_Plant *p = *w;
4169 int nb_events = m_treedyn.HandleDisturbanceEvents(
4170 io_kcomm,
4172 /*branchfraction_opt,
4173 competition_opt,*/
4174 p->sFol, p->nLitFol,
4175 p->sBud, p->nLitBud,
4176 p->sWoodAbove, p->nLitWoodAbove,
4177 p->sWoodBelow_sl, p->nLitWoodBelow_sl,
4178 p->sFrt_sl, p->nLitFrt_sl);
4179 if ( nb_events > 0)
4180 {
4181 m_treedyn.Crowding( p, crownlength_opt);
4182 if ( m_treedyn.OnStructureChange( p, &root_system.at( p->slot)))
4183 {
4184 KLOGERROR( "PSIM: update of tree structure after disturbance event failed [species=", p->name(), "]");
4185 return LDNDC_ERR_FAIL;
4186 }
4187 }
4188 else if ( nb_events == -1)
4189 {
4190 KLOGERROR( "PSIM: handling of disturbance events (thinning, defoliation) failed [species=", p->name(), "]");
4191 return LDNDC_ERR_FAIL;
4192 }
4193 }
4194
4195 return LDNDC_ERR_OK;
4196}
double clumping_factor
Definition psim.h:125

References clumping_factor, competition_opt, crownlength_opt, PSIM_VegStructure(), and root_system.

Referenced by PSIM_NitrogenUptake(), and PSIM_VegStructure().

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

◆ subdaily_timemode()

bool ldndc::PhysiologyGrowthPSIM::subdaily_timemode ( )
protected
Returns
true if growth processes are calculated in subdaily time steps (option "timemode")
480{
481 return (timemode_opt != "daily");
482}
cbm::string_t timemode_opt
Definition psim.h:128

References subdaily_timemode(), and timemode_opt.

Referenced by PSIM_NitrogenUptake(), PSIM_StepInit(), and subdaily_timemode().

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

Member Data Documentation

◆ branchfraction_opt

cbm::string_t ldndc::PhysiologyGrowthPSIM::branchfraction_opt

estimation of branch fraction (option "branchfraction", currently without effect)

◆ carbonuptake_acc_vt

lvector_t< double > ldndc::PhysiologyGrowthPSIM::carbonuptake_acc_vt
private

gross assimilation accumulated since the last growth time step [kgC m-2]

Referenced by PSIM_Harvest(), PSIM_Photosynthesis(), PSIM_ResizeVegetationVectors(), and PSIM_StepInit().

◆ carbonuptake_vt

lvector_t< double > ldndc::PhysiologyGrowthPSIM::carbonuptake_vt
private

gross assimilation of the growth time step [kgC m-2]

Referenced by PSIM_BalanceCheck(), PSIM_CarAllocation(), PSIM_Harvest(), PSIM_ResizeVegetationVectors(), and PSIM_StepInit().

◆ CCOMNOX

const double ldndc::PhysiologyGrowthPSIM::CCOMNOX = 1.0
static

NOx concentration without net gas exchange of the canopy (compensation point) [ppb]

◆ clumping_factor

double ldndc::PhysiologyGrowthPSIM::clumping_factor

clumping factor for tree dimensional growth (option "clumping")

Referenced by PSIM_VegStructure().

◆ competition_opt

bool ldndc::PhysiologyGrowthPSIM::competition_opt

consideration of competition on height/diameter ratios (option "competition")

Referenced by PSIM_PlantingEvent(), PSIM_ResetBiomassFromLastYear(), and PSIM_VegStructure().

◆ crownlength_opt

cbm::string_t ldndc::PhysiologyGrowthPSIM::crownlength_opt

estimation of crown length (option "crownlength": diameter / height)

Referenced by PSIM_PlantingEvent(), PSIM_ResetBiomassFromLastYear(), and PSIM_VegStructure().

◆ CSATNH3

const double ldndc::PhysiologyGrowthPSIM::CSATNH3 = 50.0
static

NH3 concentration at which stomatal uptake saturates [ppb]

◆ CSATNOX

const double ldndc::PhysiologyGrowthPSIM::CSATNOX = 5.0
static

NOx concentration at which stomatal uptake saturates [ppb]

◆ don_uptake_opt

bool ldndc::PhysiologyGrowthPSIM::don_uptake_opt

uptake of dissolved organic nitrogen from the soil (option "donuptake")

◆ EPOTNOX

const double ldndc::PhysiologyGrowthPSIM::EPOTNOX = 1.0
static

potential specific NOx exchange rate of fully opened stomata [pmol m-2 s-1]

◆ FDON_AVAILABLE

const double ldndc::PhysiologyGrowthPSIM::FDON_AVAILABLE = 0.1
static

plant available fraction of dissolved organic nitrogen (option "donuptake") [-]

◆ FMIN

const double ldndc::PhysiologyGrowthPSIM::FMIN = 0.05
static

average concentration of minerals other than nitrogen in plant dry matter [kg kgDW-1]

Referenced by PSIM_Respiration().

◆ FRFRT

const double ldndc::PhysiologyGrowthPSIM::FRFRT = 0.5
static

fraction of nitrate that is reduced in the roots [-]

Referenced by PSIM_Respiration().

◆ PAMM

const double ldndc::PhysiologyGrowthPSIM::PAMM = 0.17
static

carbon costs for ammonium uptake [kgC kgN-1]

Referenced by PSIM_Respiration().

◆ PGDD

const double ldndc::PhysiologyGrowthPSIM::PGDD = 0.0075
static

reduction of the growing degree day requirement for flushing with chilling days [d-1]

Referenced by PSIM_BudBurst().

◆ PMIN

const double ldndc::PhysiologyGrowthPSIM::PMIN = 0.06
static

carbon costs for the uptake of minerals other than nitrogen [kgC kgDW-1]

Referenced by PSIM_Respiration().

◆ PNIT

const double ldndc::PhysiologyGrowthPSIM::PNIT = 0.34
static

carbon costs for nitrate uptake [kgC kgN-1]

Referenced by PSIM_Respiration().

◆ PPHLOE

const double ldndc::PhysiologyGrowthPSIM::PPHLOE = 0.06
static

carbon costs for phloem transport of carbon from the leaves [kgC kgC-1]

Referenced by PSIM_Respiration().

◆ PREDFRT

const double ldndc::PhysiologyGrowthPSIM::PREDFRT = 1.72
static

carbon costs for nitrate reduction in the roots [kgC kgN-1]

Referenced by PSIM_Respiration().

◆ PREDSAP

const double ldndc::PhysiologyGrowthPSIM::PREDSAP = 0.855
static

carbon costs for nitrate reduction in the shoot [kgC kgN-1]

Referenced by PSIM_Respiration().

◆ rFolLeaf_acc_vt

lvector_t< double > ldndc::PhysiologyGrowthPSIM::rFolLeaf_acc_vt
private

leaf dark respiration accumulated since the last growth time step [kgC m-2]

Referenced by PSIM_Harvest(), PSIM_Photosynthesis(), PSIM_ResizeVegetationVectors(), and PSIM_StepInit().

◆ rFolLeaf_vt

lvector_t< double > ldndc::PhysiologyGrowthPSIM::rFolLeaf_vt
private

leaf dark respiration of the growth time step [kgC m-2]

Referenced by PSIM_Harvest(), PSIM_ResizeVegetationVectors(), PSIM_Respiration(), and PSIM_StepInit().

◆ root_system

std::map< int, RootSystemDNDC > ldndc::PhysiologyGrowthPSIM::root_system
private

Root system.

  • rooting depth
  • root distribution

Referenced by PSIM_Harvest(), PSIM_PlantingEvent(), and PSIM_VegStructure().

◆ rootgrowth_opt

bool ldndc::PhysiologyGrowthPSIM::rootgrowth_opt

limitation of rooting depth by soil properties (option "limitedrootgrowth", currently without effect)

◆ SACC_SMAX

const double ldndc::PhysiologyGrowthPSIM::SACC_SMAX = 6.0
static

state of acclimation (above SACC_X0) at which evergreen foliage is fully active [oC]

Referenced by PSIM_PhotosynthesisRates().

◆ SACC_TAU

const double ldndc::PhysiologyGrowthPSIM::SACC_TAU = 12.75
static

time constant of the state of acclimation of evergreen foliage [d]

Referenced by PSIM_PhotosynthesisRates().

◆ sacc_vt

lvector_t< double > ldndc::PhysiologyGrowthPSIM::sacc_vt
private

state of acclimation of evergreen foliage (delayed air temperature) [oC]

Referenced by PSIM_Harvest(), PSIM_PhotosynthesisRates(), and PSIM_ResizeVegetationVectors().

◆ SACC_X0

const double ldndc::PhysiologyGrowthPSIM::SACC_X0 = -3.57
static

threshold of the state of acclimation above which evergreen foliage is active [oC]

Referenced by PSIM_PhotosynthesisRates().

◆ stand_structure_opt

int ldndc::PhysiologyGrowthPSIM::stand_structure_opt

years after which structural growth is considered (option "standstructure", -1: never)

Referenced by have_forest_structure().

◆ sWoodAboveSen_vt

lvector_t< double > ldndc::PhysiologyGrowthPSIM::sWoodAboveSen_vt
private

aboveground woody litter from sapwood senescence of the time step (branches) [kgDW m-2]

Referenced by PSIM_BiomassUpdate(), PSIM_Reset(), PSIM_ResizeVegetationVectors(), and PSIM_Senescence().

◆ target_biomass

double ldndc::PhysiologyGrowthPSIM::target_biomass

target (maximum) aboveground biomass of a static stand (option "targetbiomass") [kgDW m-2]

Referenced by PSIM_ResetBiomassFromLastYear().

◆ target_treenumber

int ldndc::PhysiologyGrowthPSIM::target_treenumber

target (minimum) tree number of a static stand (option "targettreenumber") [ha-1]

Referenced by PSIM_ResetBiomassFromLastYear().

◆ TGLIM

const double ldndc::PhysiologyGrowthPSIM::TGLIM = 6.0
static

soil temperature below which no fine root growth occurs [oC]

Referenced by PSIM_CarAllocation().

◆ timemode_opt

cbm::string_t ldndc::PhysiologyGrowthPSIM::timemode_opt

time resolution of growth processes (option "timemode": daily / subdaily)

Referenced by subdaily_timemode().

◆ TRMAX

const double ldndc::PhysiologyGrowthPSIM::TRMAX = 45.0
static

maximum temperature for maintenance respiration [oC]

Referenced by PSIM_Respiration().

◆ TRMIN

const double ldndc::PhysiologyGrowthPSIM::TRMIN = -7.0
static

minimum temperature for maintenance respiration [oC]

Referenced by PSIM_Respiration().

◆ TROPT

const double ldndc::PhysiologyGrowthPSIM::TROPT = 20.0
static

temperature for optimum maintenance respiration [oC]

Referenced by PSIM_Respiration().

◆ UPOTNH3

const double ldndc::PhysiologyGrowthPSIM::UPOTNH3 = 10000.0
static

potential specific NH3 uptake rate of fully opened stomata [pmol m-2 s-1]