9#ifndef LM_PHYSIOLOGY_ARABLE_DNDC_H_
10#define LM_PHYSIOLOGY_ARABLE_DNDC_H_
13#include "mbe_legacymodel.h"
14#include "state/mbe_state.h"
17#include "physiology/ld_plantfunctions.h"
18#include "eventhandler/graze/graze.h"
19#include "eventhandler/cut/cut.h"
21#include <containers/lgrowarray.h>
22#include <utils/cbm_utils.h>
26 struct BaseRootSystemDNDC;
27 class LDNDC_API PhysiologyArableDNDC :
public MBE_LegacyModel
29 LMOD_EXPORT_MODULE_INFO(PhysiologyArableDNDC,
"physiology:arabledndc",
"ArableDNDC");
34 static double const GROWTH_RESPIRATION_FRACTION;
37 static const double INITIAL_BIOMASS;
40 static const double S_TLIMIT;
43 PhysiologyArableDNDC( MoBiLE_State *,
44 cbm::io_kcomm_t *, timemode_e);
45 ~PhysiologyArableDNDC();
47 lerr_t configure( ldndc::config_file_t
const *);
48 lerr_t register_ports( cbm::io_kcomm_t *);
52 lerr_t unregister_ports( cbm::io_kcomm_t *);
53 lerr_t finalize() {
return LDNDC_ERR_OK; }
55 lerr_t sleep() {
return LDNDC_ERR_OK; }
56 lerr_t wake() {
return LDNDC_ERR_OK; }
59 MoBiLE_State * m_state;
60 cbm::io_kcomm_t * io_kcomm;
63 input_class_setup_t
const & m_setup;
64 input_class_soillayers_t
const & sl_;
65 input_class_siteparameters_t
const * m_sipar;
66 input_class_species_t
const * m_species;
67 input_class_speciesparameters_t
const * m_speciesparameters;
70 substate_airchemistry_t
const & ac_;
71 substate_microclimate_t & mc_;
72 substate_physiology_t & ph_;
73 substate_soilchemistry_t & sc_;
74 substate_watercycle_t & wc_;
76 MoBiLE_PlantVegetation * m_veg;
78 SubscribedEvent<LD_EventHandlerQueue> m_HarvestEvents;
79 SubscribedEvent<LD_EventHandlerQueue> m_PlantEvents;
81 ldndc::growable_array < BaseRootSystemDNDC*, 1000, 1 > root_system;
83 double const *mc_temp;
85 double const FTS_TOT_;
91 LD_PlantFunctions m_pf;
96 lvector_t< double > n_demand_vt_;
97 lvector_t< double > n_uptake_vt_;
98 lvector_t< double > n_avail_tot_vt_;
99 lvector_t< double > n_plant_vt_;
101 lvector_t< double > dw_fol_old_vt;
102 lvector_t< double > dw_frt_old_vt;
103 lvector_t< double > dw_lst_old_vt;
104 lvector_t< double > dw_bud_old_vt;
110 lvector_t< double > chill_factor;
116 lvector_t< double > chill_units;
126 lvector_t< unsigned int > root_q_vt_;
128 lvector_t< double > temp_sl;
136 lerr_t ArableDNDC_step_init();
137 lerr_t ArableDNDC_step_out();
138 lerr_t ArableDNDC_resize();
144 void update_species_related_state_items( MoBiLE_Plant *);
162 lerr_t ArableDNDC_event_plant( MoBiLE_Plant *, EventAttributes
const &);
181 lerr_t event_harvest( MoBiLE_Plant *, EventAttributes
const &);
198 lerr_t development_stage( MoBiLE_Plant *);
200 void growth_respiration( MoBiLE_Plant *,
double);
242 void maintenance_respiration( MoBiLE_Plant *);
274 double nitrogen_demand( MoBiLE_Plant *);
290 void nitrogen_uptake();
306 double nitrogen_fixation( MoBiLE_Plant *,
double,
double);
307 double total_fixed_nitrogen( MoBiLE_Plant
const *,
double)
const;
350 void biomass_partition( MoBiLE_Plant *,
double);
381 void senescence( MoBiLE_Plant *);
384 void update_canopy_coverage( MoBiLE_Plant *);
387 void update_canopy_height( MoBiLE_Plant *);
390 void update_canopy_items( MoBiLE_Plant *);
393 void balance_check(
int );
Spatially explicit groundwater model.
Definition: airchemistryput.h:15