LandscapeDNDC 1.37.0
Loading...
Searching...
No Matches
vocjjv.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 */
22
23#ifndef LM_PHYSIOLOGY_VOCJJV_H_
24#define LM_PHYSIOLOGY_VOCJJV_H_
25
26#include "mbe_legacymodel.h"
27#include "state/mbe_state.h"
28
29namespace ldndc {
30
31class LDNDC_API PhysiologyVOCJJV : public MBE_LegacyModel
32{
33 LMOD_EXPORT_MODULE_INFO(PhysiologyVOCJJV,"physiology:vocjjv","Physiology VOCJJV");
34
35 /*** module specific constants ***/
36
38 static double const BETA;
40 static double const BETA_MONO;
42 static double const BETA_OVOC;
44 static double const TREF;
46 static double const PPFD0;
48 static double const TEMP0;
50 static double const ABSO;
52 static double const C1;
54 static double const C2;
56 static double const GAMMA_MAX;
58 static double const CEO_ISO;
60 static double const CEO_MONO;
62 static double const PAR0_SUN;
64 static double const PAR0_SHD;
65
66
67 public:
68 PhysiologyVOCJJV( MoBiLE_State *,
69 cbm::io_kcomm_t *,
70 timemode_e);
71
72 ~PhysiologyVOCJJV();
73
74 lerr_t configure(
75 ldndc::config_file_t const *);
76
77 lerr_t initialize();
78
79 lerr_t solve();
80
81 lerr_t finalize() { return LDNDC_ERR_OK; }
82
83 lerr_t sleep() { return LDNDC_ERR_OK; }
84 lerr_t wake() { return LDNDC_ERR_OK; }
85
86// private:
87 bool CALC_SYNTHASE_ACTIVITY;
88 bool CALCULATE_PAR_TEMP_TERM;
89
90 /* required state components */
91 substate_airchemistry_t & ac;
92 substate_microclimate_t & mc;
93 substate_physiology_t & ph;
94
95 MoBiLE_PlantVegetation * m_veg;
96 input_class_setup_t const * m_setup;
97
98 private:
99 struct photosynth_t
100 {
101 double par; // photosynthetic active radiation (umol m-2 s-1)
102 double par24; // 1 day aggregated photosynthetic active radiation (umol m-2 s-1)
103 double par240; // 10 days aggregated photosynthetic active radiation (umol m-2 s-1)
104 double parabs; // absorbed sunlit photosynthetic active radiation (umol m-2 s-1)
105
106
107 photosynth_t();
108 };
109 struct foliage_t
110 {
111 double tempK; // foliage temperature within a canopy layer (K)
112 double tempK24; // 1 day aggregated foliage temperature within a canopy layer (K)
113 double tempK240; // 10 days aggregated foliage temperature within a canopy layer (K)
114
115 foliage_t();
116 };
117
118 struct temp_par_seasonality_t
119 {
120 double eopt_iso; // factor for temperature dependence of past days for isoprene emissions
121 double eopt_mono; // factor for temperature dependence of past days for light dependent monoterpene emission
122 double c_p; // 10 days aggregated foliage temperature within a canopy layer (K)
123
124 temp_par_seasonality_t();
125 };
126
127 struct gamma_factor_t
128 {
129 //double a; // activity factor for Leaf Age (rg: common to both MEGAN and JJV; fw: I don't think that we need this in JJv)
130 double t_mono; // monoterpenes activity factor for Temperature (light independent fraction of temperature dependence)
131 double t_ovoc; // other VOCs activity factor for Temperature (light independent fraction of temperature dependence
132 double ph; // BVOC emission activity factor for photosynthesis (energy supply)
133 double ph_sun; // BVOC emission activity factor for photosynthesis (energy supply) of sunlit leaves
134 double ph_shd; // BVOC emission activity factor for photosynthesis (energy supply) of shaded leaves
135
136 double phnorm; // normalized activity factor for photosynthesis (energy supply)
137 double phrel; // fraction of ph and phnorm
138//fw: old and not needed double en; // activity factor related to enzyme activity
139 double en_iso; // activity factor related to enzyme activity (isoprene synthase)
140 double en_mono; // activity factor related to enzyme activity (monoterpene synthase)
141 double ennorm; // normalized activity factor related to enzyme activity
142 double ennorm_iso; // normalized activity factor related to enzyme activity (isoprene synthase)
143 double ennorm_mono;// normalized activity factor related to enzyme activity (monoterpene synthase)
144 double enrel; // fraction of e and enorm
145 double rer; // relative emission response/total scaling factor (-)
146 double iso; // relative emission response/total scaling factor for isoprene (-)
147 double mono; // relative emission response/total scaling factor for monoterpene (-)
148// gamma_factor_t();
149 };
150
151 struct leaf_emission_t
152 {
153 size_t foliage_layer;
154 double isoprene; // leaf level isoprene emission (ug gDW-1 h-1)
155 double monoterpene; // leaf level monoterpene emission (ug gDW-1 h-1)
156 double monoterpene_s; // leaf level monoterpene emission from storages (ug gDW-1 h-1)
157 double ovoc; // leaf level ovoc emission from storages (ug gDW-1 h-1)
158
159 photosynth_t pho;
160 foliage_t fol;
161 temp_par_seasonality_t tpar;
162 };
163
164 lerr_t CalcLeafEmission(
165 leaf_emission_t * /* _lemi */,
166 leaf_emission_t * /* _leminorm */,
167 MoBiLE_Plant *);
168
169 double get_jjv_gamma_PH(
170 leaf_emission_t *,
171 MoBiLE_Plant * ) const;
172
173 double get_jjv_gamma_PH_norm(
174 leaf_emission_t *,
175 MoBiLE_Plant * ) const;
176
177
178 lerr_t get_jjv_gamma_EN(
179 leaf_emission_t *,
180 leaf_emission_t *,
181 MoBiLE_Plant * ,
182 gamma_factor_t *) const;
183
184 lerr_t get_temp_par_seasonality(
185 leaf_emission_t *) const;
186
187
188 void step_init();
189};
190} /*namespace ldndc*/
191
192#endif /* !LM_PHYSIOLOGY_VOCJJV_H_ */
Spatially explicit groundwater model.
Definition airchemistryput.h:21