14#ifndef LM_PHYSIOLOGY_ARABLE_DNDC_H_
15#define LM_PHYSIOLOGY_ARABLE_DNDC_H_
18#include "mbe_legacymodel.h"
19#include "state/mbe_state.h"
22#include "physiology/ld_plantfunctions.h"
23#include "eventhandler/graze/graze.h"
24#include "eventhandler/cut/cut.h"
26#include <containers/lgrowarray.h>
27#include <utils/cbm_utils.h>
32 class LDNDC_API PhysiologyArableDNDC :
public MBE_LegacyModel
34 LMOD_EXPORT_MODULE_INFO(PhysiologyArableDNDC,
"physiology:arabledndc",
"ArableDNDC");
39 static double const GROWTH_RESPIRATION_FRACTION;
42 static const double INITIAL_BIOMASS;
45 static const double S_TLIMIT;
48 PhysiologyArableDNDC( MoBiLE_State *,
49 cbm::io_kcomm_t *, timemode_e);
50 ~PhysiologyArableDNDC();
52 lerr_t configure( ldndc::config_file_t
const *);
53 lerr_t register_ports( cbm::io_kcomm_t *);
57 lerr_t unregister_ports( cbm::io_kcomm_t *);
58 lerr_t finalize() {
return LDNDC_ERR_OK; }
60 lerr_t sleep() {
return LDNDC_ERR_OK; }
61 lerr_t wake() {
return LDNDC_ERR_OK; }
64 MoBiLE_State * m_state;
65 cbm::io_kcomm_t * io_kcomm;
68 input_class_setup_t
const & m_setup;
69 input_class_soillayers_t
const & sl_;
70 input_class_siteparameters_t
const * m_sipar;
71 input_class_species_t
const * m_species;
72 input_class_speciesparameters_t
const * m_speciesparameters;
75 substate_airchemistry_t
const & ac_;
76 substate_microclimate_t & mc_;
77 substate_physiology_t & ph_;
78 substate_soilchemistry_t & sc_;
79 substate_watercycle_t & wc_;
81 MoBiLE_PlantVegetation * m_veg;
83 SubscribedEvent<LD_EventHandlerQueue> m_HarvestEvents;
84 SubscribedEvent<LD_EventHandlerQueue> m_PlantEvents;
86 ldndc::growable_array < BaseRootSystemDNDC*, 1000, 1 > root_system;
88 double const *mc_temp;
90 double const FTS_TOT_;
96 LD_PlantFunctions m_pf;
101 lvector_t< double > n_demand_vt_;
102 lvector_t< double > n_uptake_vt_;
103 lvector_t< double > n_avail_tot_vt_;
104 lvector_t< double > n_plant_vt_;
106 lvector_t< double > dw_fol_old_vt;
107 lvector_t< double > dw_frt_old_vt;
108 lvector_t< double > dw_lst_old_vt;
109 lvector_t< double > dw_bud_old_vt;
115 lvector_t< double > chill_factor;
121 lvector_t< double > chill_units;
127 lvector_t< unsigned int > root_q_vt_;
129 lvector_t< double > temp_sl;
137 lerr_t ArableDNDC_step_init();
138 lerr_t ArableDNDC_step_out();
139 lerr_t ArableDNDC_resize();
145 void update_species_related_state_items( MoBiLE_Plant *);
163 lerr_t ArableDNDC_event_plant( MoBiLE_Plant *, EventAttributes
const &);
182 lerr_t event_harvest( MoBiLE_Plant *, EventAttributes
const &);
199 lerr_t development_stage( MoBiLE_Plant *);
201 void growth_respiration( MoBiLE_Plant *,
double);
243 void maintenance_respiration( MoBiLE_Plant *);
275 double nitrogen_demand( MoBiLE_Plant *);
291 void nitrogen_uptake();
307 double nitrogen_fixation( MoBiLE_Plant *,
double,
double);
308 double total_fixed_nitrogen( MoBiLE_Plant
const *,
double)
const;
351 void biomass_partition( MoBiLE_Plant *,
double);
382 void senescence( MoBiLE_Plant *);
385 void update_canopy_coverage( MoBiLE_Plant *);
388 void update_canopy_height( MoBiLE_Plant *);
391 void update_canopy_items( MoBiLE_Plant *);
394 void balance_check(
int );
Spatially explicit groundwater model.
Definition airchemistryput.h:21
Interface of the fine root system of a plant: rooting depth, distribution of fine root mass and lengt...
Definition ld_rootsystem.h:34