2#ifndef LM_EVENTHANDLER_GRAZE_H_
3#define LM_EVENTHANDLER_GRAZE_H_
5#include "mbe_legacymodel.h"
6#include "state/mbe_state.h"
8#include "ld_eventqueue.h"
9#include "ld_isotopes.h"
16class LDNDC_API EventHandlerGraze :
public MBE_LegacyModel
18 LMOD_EXPORT_MODULE_INFO(EventHandlerGraze,
"eventhandler:graze",
"EventHandler Graze");
20 EventHandlerGraze( MoBiLE_State *,
21 cbm::io_kcomm_t *, timemode_e);
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; }
29 lerr_t unregister_ports( cbm::io_kcomm_t *);
30 lerr_t finalize() {
return LDNDC_ERR_OK; }
32 lerr_t wake() {
return LDNDC_ERR_OK; }
33 lerr_t sleep() {
return LDNDC_ERR_OK; }
51 lerr_t event_graze_physiology( MoBiLE_Plant *);
53 lerr_t update_available_freshfood_c(
54 MoBiLE_PlantVegetation *,
55 species_groups_selector_t
const &);
57 void reset_daily_food_consumption();
60 cbm::io_kcomm_t * io_kcomm;
62 input_class_soillayers_t
const * sl_;
63 input_class_siteparameters_t
const & sipar_;
64 substate_microclimate_t
const & mc_;
65 substate_physiology_t * ph_;
66 substate_soilchemistry_t & sc_;
68 EventQueue m_GrazeEvents;
69 CBM_Handle m_GrazeHandle;
71 double total_available_freshfood_c;
72 double day_food_consume_c;
76 double get_available_freshfood_c( MoBiLE_Plant *);
77 double get_available_freshfood_c_crop( MoBiLE_Plant *);
78 double get_available_freshfood_c_wood( MoBiLE_Plant *);
79 double get_available_freshfood_c_grass( MoBiLE_Plant *);
81 double get_total_freshfood_c( MoBiLE_Plant *);
82 double get_total_freshfood_c_crop( MoBiLE_Plant *);
83 double get_total_freshfood_c_wood( MoBiLE_Plant *);
84 double get_total_freshfood_c_grass( MoBiLE_Plant *);
86 lerr_t handle_graze( MoBiLE_Plant *,
87 ldndc::EventAttributes
const &);
89 void update_biomass_after_graze_(
Spatially explicit groundwater model.
Definition airchemistryput.h:15