LandscapeDNDC 1.37.0
Loading...
Searching...
No Matches
vocniinemets.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 */
12
13#ifndef LM_PHYSIOLOGY_VOCNIINEMETS_H_
14#define LM_PHYSIOLOGY_VOCNIINEMETS_H_
15
16#include "mbe_legacymodel.h"
17#include "state/mbe_state.h"
18
19namespace ldndc {
20
21class LDNDC_API PhysiologyVOCNIINEMETS : public MBE_LegacyModel
22{
23 LMOD_EXPORT_MODULE_INFO(PhysiologyVOCNIINEMETS,"physiology:vocniinemets","Physiology VOCNIINEMETS");
24
25 /*** module specific constants ***/
26
28 static double const SCALINGCONSTJ;
30 static double const DELTASJ;
32 static double const DELTAHAJ;
34 static double const DELTAHDJ;
36 static double const COST;
38 static double const P1_IS;
40 static double const P2_IS;
42 static double const P3_IS;
44 static double const P1_MT;
46 static double const P2_MT;
48 static double const P3_MT;
50 static double const TEMP0;
52 static double const PPFD0;
53
54 public:
55 PhysiologyVOCNIINEMETS( MoBiLE_State *,
56 cbm::io_kcomm_t *, timemode_e);
57
58 ~PhysiologyVOCNIINEMETS();
59
60 lerr_t configure(
61 ldndc::config_file_t const *);
62
63 lerr_t initialize();
64
65 lerr_t solve();
66
67 lerr_t finalize() { return LDNDC_ERR_OK; }
68
69 lerr_t sleep() { return LDNDC_ERR_OK; }
70 lerr_t wake() { return LDNDC_ERR_OK; }
71
72 private:
73
74 input_class_setup_t const & m_setup;
75 /* required state components */
76 substate_airchemistry_t * ac;
77 substate_microclimate_t * mc;
78 substate_physiology_t * phys;
79
80 MoBiLE_PlantVegetation * m_veg;
81
82 struct emi_isoprene_t {};
83 struct emi_monoterpene_t {};
84 struct niinemets_coeff_t
85 {
86 size_t foliage_layer;
87
88 /* relation between light in a canopy layer and light above the canopy */
89 double qefirad;
90
91 double DELTAS;
92 double DELTAHA;
93 double DELTAHD;
94 double P1;
95 double P2;
96 double P3;
97 double scale_EMI;
98 double emiBasal;
99
100 bool is_iso;
101
102 niinemets_coeff_t(
103 emi_isoprene_t, MoBiLE_Plant const &);
104 niinemets_coeff_t(
105 emi_monoterpene_t, MoBiLE_Plant const &);
106 };
107 double getNiinemetsScalingCoefficient(
108 niinemets_coeff_t const *, MoBiLE_Plant const &) const;
109
110
111 struct niinemets_iso_t
112 {
113 /* isoprene emission under standard conditions (umolC gDW-1 s-1) */
114 double isoBasal;
115 /* isoprene emission (umol m-2 s-1) */
116 double isoEph;
117
118 niinemets_iso_t();
119 };
120 struct niinemets_mono_t
121 {
122 /* monoterpene emission under standard conditions (umolC gDW-1 s-1) */
123 double monoBasal;
124 /* monoterpene emission (umol m-2 s-1) */
125 double monoEph;
126
127 niinemets_mono_t();
128 };
129
130 void niinemetsIsoprene(
131 niinemets_iso_t *, niinemets_coeff_t *, MoBiLE_Plant &) const;
132 void niinemetsMonoterpene(
133 niinemets_mono_t *, niinemets_coeff_t *, MoBiLE_Plant &) const;
134 double niinemetsEmission(
135 niinemets_coeff_t *, MoBiLE_Plant &) const;
136
137 void step_init();
138};
139} /*namespace ldndc*/
140
141#endif /* !LM_PHYSIOLOGY_VOCNIINEMETS_H_ */
142
Spatially explicit groundwater model.
Definition airchemistryput.h:21