LandscapeDNDC 1.37.0
output-watercycle-subdaily.h
1
9#ifndef LM_OUTPUT_WATERCYCLE_SUBDAILY_H_
10#define LM_OUTPUT_WATERCYCLE_SUBDAILY_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 OutputWatercycleSubdaily
17#define LMOD_OUTPUT_MODULE_ID "output:watercycle:subdaily"
18#define LMOD_OUTPUT_MODULE_DESC "Water Cycle Subdaily Output"
19namespace ldndc {
20class substate_microclimate_t;
21class substate_physiology_t;
22class substate_soilchemistry_t;
23class substate_watercycle_t;
24class LDNDC_API LMOD_OUTPUT_MODULE_NAME : public LMOD_OUTPUT_MODULE_BASE
25{
26 LMOD_EXPORT_MODULE_INFO(LMOD_OUTPUT_MODULE_NAME,LMOD_OUTPUT_MODULE_ID,LMOD_OUTPUT_MODULE_DESC);
27 public:
28 LMOD_OUTPUT_MODULE_NAME(
29 MoBiLE_State *,
30 cbm::io_kcomm_t *,
31 timemode_e _timemode);
32
33 ~LMOD_OUTPUT_MODULE_NAME();
34
35
36 lerr_t configure( ldndc::config_file_t const *);
37
38 lerr_t initialize();
39
40 lerr_t solve();
41
42 lerr_t finalize();
43
44 lerr_t wake() { return LDNDC_ERR_OK; }
45 lerr_t sleep() { return LDNDC_ERR_OK; }
46
47 private:
48 lerr_t dump_0(
49 ldndc_flt64_t *);
50
51 private:
52 cbm::io_kcomm_t * io_kcomm;
53
54 input_class_soillayers_t const * soillayers_in;
55 input_class_setup_t const * setup_;
56 substate_microclimate_t const * microclim;
57 substate_physiology_t const * phys;
58 substate_soilchemistry_t const * soilchem;
59 substate_watercycle_t const * water;
60
61 MoBiLE_PlantVegetation * m_veg;
62
63 private:
64 ldndc::sink_handle_t m_sink;
65
66 struct output_watercycle_daily_acc_t
67 {
68 double throughfall;
69 double potentialevaporation;
70 double potentialtranspiration;
71 double transpiration;
72 double wateruptake;
73 double interceptionevaporation;
74 double soilevaporation;
75 double surfacewaterevaporation;
76 double runoff;
77 double percolation;
78
79 double infiltration;
80 };
81 output_watercycle_daily_acc_t acc;
82 void pop_accumulated_outputs();
83 void push_accumulated_outputs();
84};
85} /*namespace ldndc*/
86
87
88#undef LMOD_OUTPUT_MODULE_BASE
89#undef LMOD_OUTPUT_MODULE_NAME
90#undef LMOD_OUTPUT_MODULE_ID
91#undef LMOD_OUTPUT_MODULE_DESC
92
93
94#endif /* !LM_OUTPUT_WATERCYCLE_SUBDAILY_H_ */
95
Spatially explicit groundwater model.
Definition: airchemistryput.h:15