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