LandscapeDNDC 1.37.0
output-ecosystem-daily.h
1
9#ifndef LM_OUTPUT_ECOSYSTEM_DAILY_H_
10#define LM_OUTPUT_ECOSYSTEM_DAILY_H_
11
12#include "mbe_legacyoutputmodel.h"
13#include "state/mbe_state.h"
14
15#define LMOD_OUTPUT_MODULE_BASE MBE_LegacyOutputModel
16#define LMOD_OUTPUT_MODULE_NAME OutputEcosystemDaily
17#define LMOD_OUTPUT_MODULE_ID "output:ecosystem:daily"
18#define LMOD_OUTPUT_MODULE_DESC "Ecosystem Daily Output"
19namespace ldndc {
20
21struct ec_daily_accumulated_outputs_t
22{
23 double co2_hetero;
24 double transpiration;
25 double wateruptake;
26 double interceptionevaporation;
27 double soilevaporation;
28 double surfacewaterevaporation;
29};
30class LDNDC_API LMOD_OUTPUT_MODULE_NAME : public LMOD_OUTPUT_MODULE_BASE
31{
32 LMOD_EXPORT_MODULE_INFO(LMOD_OUTPUT_MODULE_NAME,LMOD_OUTPUT_MODULE_ID,LMOD_OUTPUT_MODULE_DESC);
33 public:
34 LMOD_OUTPUT_MODULE_NAME(
35 MoBiLE_State *,
36 cbm::io_kcomm_t *,
37 timemode_e _timemode);
38
39 ~LMOD_OUTPUT_MODULE_NAME();
40
41
42 lerr_t configure( ldndc::config_file_t const *);
43
44 lerr_t initialize();
45 lerr_t solve();
46 lerr_t finalize();
47
48 lerr_t wake() { return LDNDC_ERR_OK; }
49 lerr_t sleep() { return LDNDC_ERR_OK; }
50
51 private:
52 lerr_t m_writerecord( ldndc_flt64_t *);
53
54 private:
55 cbm::io_kcomm_t * io_kcomm;
56
57 input_class_soillayers_t const & sl;
58 substate_physiology_t const * phys;
59 substate_soilchemistry_t const * soilchem;
60 substate_watercycle_t const * water;
61 MoBiLE_PlantVegetation * m_veg;
62
63 private:
64 ldndc::sink_handle_t m_sink;
65 ec_daily_accumulated_outputs_t acc_outputs;
66 void pop_accumulated_outputs();
67 void push_accumulated_outputs();
68};
69} /*namespace ldndc*/
70
71
72#undef LMOD_OUTPUT_MODULE_BASE
73#undef LMOD_OUTPUT_MODULE_NAME
74#undef LMOD_OUTPUT_MODULE_ID
75#undef LMOD_OUTPUT_MODULE_DESC
76
77
78#endif /* !LM_OUTPUT_ECOSYSTEM_DAILY_H_ */
79
Spatially explicit groundwater model.
Definition: airchemistryput.h:15