LandscapeDNDC 1.37.0
Loading...
Searching...
No Matches
cut.h
1
2#ifndef LM_EVENTHANDLER_CUT_H_
3#define LM_EVENTHANDLER_CUT_H_
4
5#include "mbe_legacymodel.h"
6#include "state/mbe_state.h"
7#include "ld_eventqueue.h"
8
9namespace ldndc { namespace event {
10class EventCut;
11}}
12
13namespace ldndc {
14
15class LDNDC_API EventHandlerCut : public MBE_LegacyModel
16{
17 LMOD_EXPORT_MODULE_INFO(EventHandlerCut,"eventhandler:cut","EventHandler Cut");
18
19 public:
20 EventHandlerCut(
21 MoBiLE_State *, cbm::io_kcomm_t *, timemode_e);
22 ~EventHandlerCut();
23
24 lerr_t configure( ldndc::config_file_t const *) { return LDNDC_ERR_OK; }
25 lerr_t register_ports( cbm::io_kcomm_t *);
26 lerr_t initialize() { return LDNDC_ERR_OK; }
27
28 lerr_t solve();
29 lerr_t unregister_ports( cbm::io_kcomm_t *);
30 lerr_t finalize() { return LDNDC_ERR_OK; }
31
32 lerr_t wake() { return LDNDC_ERR_OK; }
33 lerr_t sleep() { return LDNDC_ERR_OK; }
34
35 public:
50 lerr_t
51 event_cut_physiology(
52 MoBiLE_PlantVegetation *,
53 species_groups_selector_t const & _groups);
54
55 private:
56 cbm::io_kcomm_t * io_kcomm;
57 input_class_setup_t const & m_setup;
58 input_class_siteparameters_t const & sipar_;
59 input_class_soillayers_t const * sl_;
60 substate_physiology_t * ph_;
61 substate_soilchemistry_t & sc_;
62
63 EventQueue m_CutEvents;
64 CBM_Handle m_CutHandle;
65
66 private:
67
68 lerr_t
69 m_cut_multi_species(
70 MoBiLE_PlantVegetation *,
71 species_groups_selector_t const &,
72 ldndc::EventAttributes);
73
74 double
75 get_c_available_cut(
76 MoBiLE_Plant *);
77
78 bool
79 taken_into_account(
80 species_groups_selector_t const &,
81 MoBiLE_Plant *,
82 char const *);
83
84 void
85 update_biomass_after_cut_(
86 double * /*biomass dry weight*/,
87 double * /*total loss carbon*/,
88 double * /*total loss nitrogen*/,
89 double /*loss fraction*/,
90 double /*n/c ratio*/);
91};
92
93}
94
95#endif /* !LM_EVENTHANDLER_CUT_H_ */
96
Spatially explicit groundwater model.
Definition airchemistryput.h:15