LandscapeDNDC 1.37.0
output-ggcmi-daily.h
1
9#ifndef LM_OUTPUT_GGCMI_DAILY_H_NEW_
10#define LM_OUTPUT_GGCMI_DAILY_H_NEW_
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 OutputGgcmiDaily
17#define LMOD_OUTPUT_MODULE_ID "output:ggcmi:daily"
18#define LMOD_OUTPUT_MODULE_DESC "GGCMI Daily Output"
19namespace ldndc {
20class substate_microclimate_t;
21class substate_physiology_t;
22class substate_watercycle_t;
23class LDNDC_API LMOD_OUTPUT_MODULE_NAME : public LMOD_OUTPUT_MODULE_BASE
24{
25 LMOD_EXPORT_MODULE_INFO(LMOD_OUTPUT_MODULE_NAME,LMOD_OUTPUT_MODULE_ID,LMOD_OUTPUT_MODULE_DESC);
26 public:
27 LMOD_OUTPUT_MODULE_NAME(
28 MoBiLE_State *,
29 cbm::io_kcomm_t *,
30 timemode_e _timemode);
31
32 ~LMOD_OUTPUT_MODULE_NAME();
33
34
35 lerr_t configure( ldndc::config_file_t const *);
36
37 lerr_t initialize();
38
39 lerr_t solve();
40
41 lerr_t finalize();
42
43 lerr_t wake() { return LDNDC_ERR_OK; }
44 lerr_t sleep() { return LDNDC_ERR_OK; }
45
46 private:
47 lerr_t dump_0(
48 ldndc_flt64_t *);
49
50 private:
51 cbm::io_kcomm_t * io_kcomm;
52
53 input_class_soillayers_t const * soillayers_in;
54
55 substate_physiology_t const * phys;
56 substate_soilchemistry_t const * soilchem;
57 substate_watercycle_t const * water;
58 MoBiLE_PlantVegetation * m_veg;
59
60 private:
61 ldndc::sink_handle_t m_sink;
62
63 struct output_ggcmi_daily_acc_t
64 {
65 double nh4_uptake;
66 double no3_uptake;
67 double don_uptake;
68
69 double nh4_throughfall;
70 double no3_throughfall;
71
72 double don_leach;
73 double no3_leach;
74 double nh4_leach;
75
76 double ch4_emis;
77 double co2_emis_auto;
78 double co2_emis_hetero;
79 double no_emis;
80 double n2o_emis;
81 double n2_emis;
82 double nh3_emis;
83
84 double n2_fix_algae;
85 double n2_fix_bio;
86
87 double irrigation;
88 double transpiration;
89 double wateruptake;
90 double interceptionevaporation;
91 double soilevaporation;
92 double surfacewaterevaporation;
93 double runoff;
94 double percolation;
95 double surface_waterflux;
96 };
97 output_ggcmi_daily_acc_t acc;
98 void pop_accumulated_outputs();
99 void push_accumulated_outputs();
100};
101} /*namespace ldndc*/
102
103
104#undef LMOD_OUTPUT_MODULE_BASE
105#undef LMOD_OUTPUT_MODULE_NAME
106#undef LMOD_OUTPUT_MODULE_ID
107#undef LMOD_OUTPUT_MODULE_DESC
108
109
110#endif /* !LM_OUTPUT_SOILCHEMISTRY_DAILY_H_ */
Spatially explicit groundwater model.
Definition: airchemistryput.h:15