The BioCro C++ Library
c3_parameters.h
Go to the documentation of this file.
1#ifndef C3_PARAMETERS_H
2#define C3_PARAMETERS_H
3
4#include "../framework/module.h"
5#include "../framework/state_map.h"
7
8namespace standardBML
9{
16class c3_parameters : public direct_module
17{
18 public:
19 c3_parameters(state_map const& input_quantities, state_map* output_quantities)
20 : direct_module{},
21
22 // Get pointers to input quantities
23 Gstar_c{get_input(input_quantities, "Gstar_c")},
24 Gstar_Ea{get_input(input_quantities, "Gstar_Ea")},
25 Jmax_c{get_input(input_quantities, "Jmax_c")},
26 Jmax_Ea{get_input(input_quantities, "Jmax_Ea")},
27 Kc_c{get_input(input_quantities, "Kc_c")},
28 Kc_Ea{get_input(input_quantities, "Kc_Ea")},
29 Ko_c{get_input(input_quantities, "Ko_c")},
30 Ko_Ea{get_input(input_quantities, "Ko_Ea")},
31 phi_PSII_0{get_input(input_quantities, "phi_PSII_0")},
32 phi_PSII_1{get_input(input_quantities, "phi_PSII_1")},
33 phi_PSII_2{get_input(input_quantities, "phi_PSII_2")},
34 RL_c{get_input(input_quantities, "RL_c")},
35 RL_Ea{get_input(input_quantities, "RL_Ea")},
36 theta_0{get_input(input_quantities, "theta_0")},
37 theta_1{get_input(input_quantities, "theta_1")},
38 theta_2{get_input(input_quantities, "theta_2")},
39 Tleaf{get_input(input_quantities, "Tleaf")},
40 Tp_c{get_input(input_quantities, "Tp_c")},
41 Tp_Ha{get_input(input_quantities, "Tp_Ha")},
42 Tp_Hd{get_input(input_quantities, "Tp_Hd")},
43 Tp_S{get_input(input_quantities, "Tp_S")},
44 Vcmax_c{get_input(input_quantities, "Vcmax_c")},
45 Vcmax_Ea{get_input(input_quantities, "Vcmax_Ea")},
46
47 // Get pointers to output quantities
48 Gstar_op{get_op(output_quantities, "Gstar")},
49 Jmax_norm_op{get_op(output_quantities, "Jmax_norm")},
50 Kc_op{get_op(output_quantities, "Kc")},
51 Ko_op{get_op(output_quantities, "Ko")},
52 phi_PSII_op{get_op(output_quantities, "phi_PSII")},
53 RL_norm_op{get_op(output_quantities, "RL_norm")},
54 theta_op{get_op(output_quantities, "theta")},
55 Tp_norm_op{get_op(output_quantities, "Tp_norm")},
56 Vcmax_norm_op{get_op(output_quantities, "Vcmax_norm")}
57 {
58 }
59 static string_vector get_inputs();
60 static string_vector get_outputs();
61 static std::string get_name() { return "c3_parameters"; }
62
63 private:
64 // References to input quantities
65 double const& Gstar_c;
66 double const& Gstar_Ea;
67 double const& Jmax_c;
68 double const& Jmax_Ea;
69 double const& Kc_c;
70 double const& Kc_Ea;
71 double const& Ko_c;
72 double const& Ko_Ea;
73 double const& phi_PSII_0;
74 double const& phi_PSII_1;
75 double const& phi_PSII_2;
76 double const& RL_c;
77 double const& RL_Ea;
78 double const& theta_0;
79 double const& theta_1;
80 double const& theta_2;
81 double const& Tleaf;
82 double const& Tp_c;
83 double const& Tp_Ha;
84 double const& Tp_Hd;
85 double const& Tp_S;
86 double const& Vcmax_c;
87 double const& Vcmax_Ea;
88
89 // Pointers to output quantities
90 double* Gstar_op;
91 double* Jmax_norm_op;
92 double* Kc_op;
93 double* Ko_op;
94 double* phi_PSII_op;
95 double* RL_norm_op;
96 double* theta_op;
97 double* Tp_norm_op;
98 double* Vcmax_norm_op;
99
100 // Main operation
101 void do_operation() const;
102};
103
105{
106 return {
107 "Gstar_c", // dimensionless
108 "Gstar_Ea", // J / mol
109 "Jmax_c", // dimensionless
110 "Jmax_Ea", // J / mol
111 "Kc_c", // dimensionless
112 "Kc_Ea", // J / mol
113 "Ko_c", // dimensionless
114 "Ko_Ea", // J / mol
115 "phi_PSII_0", // dimensionless
116 "phi_PSII_1", // (degrees C)^(-1)
117 "phi_PSII_2", // (degrees C)^(-2)
118 "RL_c", // dimensionless
119 "RL_Ea", // J / mol
120 "theta_0", // dimensionless
121 "theta_1", // (degrees C)^(-1)
122 "theta_2", // (degrees C)^(-2)
123 "Tleaf", // degrees C
124 "Tp_c", // dimensionless
125 "Tp_Ha", // J / mol
126 "Tp_Hd", // J / mol
127 "Tp_S", // J / K / mol
128 "Vcmax_c", // dimensionless
129 "Vcmax_Ea" // J / mol
130 };
131}
132
134{
135 return {
136 "Gstar", // micromol / mol
137 "Jmax_norm", // dimensionless
138 "Kc", // micromol / mol
139 "Ko", // mmol / mol
140 "phi_PSII", // dimensionless
141 "RL_norm", // dimensionless
142 "theta", // dimensionless
143 "Tp_norm", // dimensionless
144 "Vcmax_norm" // dimensionless
145 };
146}
147
148void c3_parameters::do_operation() const
149{
150 // Combine temperature response parameters
152 Gstar_c,
153 Gstar_Ea,
154 Jmax_c,
155 Jmax_Ea,
156 Kc_c,
157 Kc_Ea,
158 Ko_c,
159 Ko_Ea,
160 phi_PSII_0,
161 phi_PSII_1,
162 phi_PSII_2,
163 RL_c,
164 RL_Ea,
165 theta_0,
166 theta_1,
167 theta_2,
168 Tp_c,
169 Tp_Ha,
170 Tp_Hd,
171 Tp_S,
172 Vcmax_c,
173 Vcmax_Ea};
174
175 // Calculate values of key parameters at leaf temperature
176 c3_param_at_tleaf c3_param = c3_temperature_response(tr_param, Tleaf);
177
178 // Update the output quantity list
179 update(Gstar_op, c3_param.Gstar);
180 update(Jmax_norm_op, c3_param.Jmax_norm);
181 update(Kc_op, c3_param.Kc);
182 update(Ko_op, c3_param.Ko);
183 update(phi_PSII_op, c3_param.phi_PSII);
184 update(RL_norm_op, c3_param.RL_norm);
185 update(theta_op, c3_param.theta);
186 update(Tp_norm_op, c3_param.Tp_norm);
187 update(Vcmax_norm_op, c3_param.Vcmax_norm);
188}
189
190} // namespace standardBML
191#endif
c3_param_at_tleaf c3_temperature_response(c3_temperature_response_parameters param, double Tleaf)
Calculates the values of key C3 photosynthesis parameters at leaf temperature.
Uses c3_temperature_response() to calculate the values of key C3 photosynthesis parameters at leaf te...
Definition: c3_parameters.h:17
static string_vector get_outputs()
c3_parameters(state_map const &input_quantities, state_map *output_quantities)
Definition: c3_parameters.h:19
static string_vector get_inputs()
static std::string get_name()
Definition: c3_parameters.h:61
This is the standard BioCro module library; it includes the essential modules used in typical BioCro ...
Definition: aba_decay.h:8
double Tp_norm
Tp normalized to its value at 25 degrees C (dimensionless)
double Ko
Michaelis-Menten constant for Rubisco oxygenation (mmol / mol)
double phi_PSII
Dark-adapted operating efficiency of photosystem II (dimensionless)
double Kc
Michaelis-Menten constant for Rubisco carboxylation (micromol / mol)
double theta
Linear light response factor (dimensionless)
double RL_norm
RL normalized to its value at 25 degrees C (dimensionless)
double Gstar
CO2 compensation point in the absence of RL (micromol / mol)
double Vcmax_norm
Vcmax normalized to its value at 25 degrees C (dimensionless)
double Jmax_norm
Jmax normalized to its value at 25 degrees C (dimensionless)