LandscapeDNDC 1.37.0
Loading...
Searching...
No Matches
mbe_plant.h
1
10
11#ifndef MoBiLE_PLANT_H_
12#define MoBiLE_PLANT_H_
13
14#include "ld_legacy.h"
15
16#include <ld_plants.h>
17#include <string/cbm_string.h>
18
19namespace ldndc {
20
21typedef speciesparameters::speciesparameters_set_t MoBiLE_PlantParameters;
22class LDNDC_API MoBiLE_PlantSettings : public LD_PlantSettings< MoBiLE_PlantParameters >
23{
24public:
25 MoBiLE_PlantSettings( size_t /* canopy layers */,
26 char const * /*name*/,
27 char const * /*type*/,
28 char const * /*group*/,
29 MoBiLE_PlantParameters const * = NULL /*parameters*/);
30
31 size_t nb_ageclasses;
32 size_t nb_foliagelayers;
33 size_t nb_soillayers;
34};
35
36
37class MoBiLE_State;
38class MoBiLE_PlantVegetation;
39class LDNDC_API MoBiLE_Plant : public LD_Plant< MoBiLE_PlantSettings >
40{
41public:
42 typedef MoBiLE_PlantParameters Parameters;
43 typedef MoBiLE_PlantSettings Settings;
44public:
45 MoBiLE_Plant( MoBiLE_PlantSettings const *);
46 ~MoBiLE_Plant();
47
48 void switchparameters( Parameters _params){ m_parameters = _params; };
49
50 char const * cname() const
51 { return this->name().c_str(); }
52 char const * ctype() const
53 { return this->type().c_str(); }
54 char const * cgroup() const
55 { return this->group().c_str(); }
56 species::species_group_e groupId() const
57 { return this->parameters()->GROUP(); }
58
59 bool is_family( char const * /*family*/) const;
60
61 size_t nb_ageclasses() const;
62 size_t NB_AGECLASSES() const
63 { return this->m_plantsettings.nb_ageclasses; }
64 size_t nb_foliagelayers() const;
65 size_t NB_FOLIAGELAYERS() const
66 { return this->m_plantsettings.nb_foliagelayers; }
67 size_t nb_soillayers() const;
68 size_t NB_SOILLAYERS() const
69 { return this->m_plantsettings.nb_soillayers; }
70
71 size_t slot;
72
73 lerr_t clear();
74 lerr_t initialize();
75
76public: /*plant attributes*/
77
81
82 /* day of foliage budburst [-] */
83 int dEmerg;
84 /* yearly nitrogen fixation [g:10^3:m^-2:a^-1] */
85 double a_fix_n;
86 /* crown diameter relation to breast height diameter [%] */
87 double cdr;
88 /* average individual diameter at ground height [m] */
89 double dbas;
90 /* average individual diameter at 1.3 m height [m] */
91 double dbh;
92
93 /* distance from Ground Level to top height [m] (= h_trunk + h_crown) (i.e., height average basal area stem of each vegetation cohort) [m] */
94 double height_max; // better: h_top
95 /* distance from Ground Level to top height [m] (= h_trunk + h_crown) (i.e., height average basal area stem of each vegetation cohort) [m] */
96 double h_top;
97 /* distance from ground level to crown start [m] */
98 double height_at_canopy_start; // better: h_trunk
99 /* distance from ground level to crown start [m] */
100 double h_trunk;
101 /* distance from ground level to deepest root extension [m] */
102 double rooting_depth; // better: h_depth
103 /* distance from ground level to deepest root extension [m] */
104 double h_depth;
105 /* distance from crown start to top height [m] */
106 double h_crown;
107
108 /* sapwood volume of the stem within the crown [m3] */
109 double vsap_crown;
110 /* sapwood volume of the tap root[m3] */
111 double vsap_croot;
112 /* sapwood volume of the trunk [m3] */
113 double vsap_trunk;
114 /* sapwood volume of branches [m3] */
115 double vsap_bra;
116 /* sapwood volume of coarse roots other than the tap root [m3] */
117 double vsap_crt;
118
119 /* sapwood area in the trunk [m2] */
120 double sap_area;
121
122 /* potential (supported by tree dimension and stand density) leaf area index [m2 m-2] */
123 double lai_pot;
124 /* maximum (supported by foliage and bud biomass) leaf area index [m2 m-2] */
125 double lai_max;
126
127 /* carbon increase of reproductive tissue per time step. [g:10^3:m^-2] */
128 double dcBud, d_dcBud;
129 /* carbon allocated to pool of free available substrat per time step. [g:10^3:m^-2] */
130 double dcFac, d_dcFac;
131 /* carbon increase of foliage per time step. [g:10^3:m^-2] */
132 double dcFol, d_dcFol;
133 /* carbon increase of fine roots per time step. [g:10^3:m^-2] */
134 double dcFrt, d_dcFrt;
135 /* carbon increase of sapwood per time step. [g:10^3:m^-2] */
136 double dcSap, d_dcSap;
137
138 /* oxidized nitrogen uptake per time step. [g:10^3:m^-2] */
139 double nox_uptake, d_nox_uptake;
140 /* reduced nitrogen uptake per time step. [g:10^3:m^-2] */
141 double nhy_uptake, d_nhy_uptake;
142 /* N2 uptake per time step. [g:10^3:m^-2] */
143 double n2_fixation, d_n2_fixation;
144
145 /* relative state of foliage flushing. [%] */
146 double dvsFlush, dvsFlushOld;
147 /* relative state of foliage senescence. [%] */
148 double dvsMort;
149 /* development stage of wood growth. [%] */
150 double dvsWood;
151
152 /* carbon loss from exudation [kgC m-2] */
153 double exsuLoss, d_exsuLoss;
154 /* area fraction of species relative to total ground coverage [%] */
155 double f_area;
156 /* fraction of vegetation group potential transpiration to total potential transpiration [-] */
157 double f_ptransp;
158 /* branch fraction of total (sap)wood [%] */
159 double f_branch;
160 /* reduction factor for initialization of the nitrogen and basic cation concentration relative to the maximum [%] */
161 double f_ncc;
162 /* relative state of free available carbon [-] */
163 double f_fac;
164 /* drought stress factor [%] */
165 double f_h2o, d_f_h2o;
166 /* heat stress factor [-] */
167 double f_heat;
168 /* heat stress grainfilling factor - daily minimum [-] */
169 double f_heat_daily;
170 /* heat stress grainfilling factor [-] */
171 double f_heat_gf;
172 /* vernalization factor */
173 double chill_factor;
174 /* dry weight of reproductive tissue [kgDW m-2] */
175 double mBud;
176 /* dry weight of reproduction mass at the end of the last year [kgDW m-2] */
177 double mBudStart;
178 /* dry weight of species specific core (dead) wood [kgDW m-2] */
179 double mCor;
180 /* dry weight of dead structural matter [kgDW m-2] */
181 double dw_dst;
182 /* living foliage biomass [kgDW m-2] */
183 double mFol;
184 /* dry weight of dead foliage biomass [kgDW m-2] */
185 double dw_dfol;
186 /* maximum foliage mass aimed at [kgDW m-2] */
187 double mFolMax;
188 /* minimum foliage mass aimed at [kgDW m-2] */
189 double mFolMin;
190 /* living fine root biomass [kgDW m-2] */
191 double mFrt;
192 /* sapwood biomass [kgDW m-2] */
193 double mSap;
194 /* dry weight of living structural matter [kgDW m-2] */
195 double dw_lst;
196 /* belowground sap- and corewood kept as stool (root stock) after
197 * coppicing (regrow event); not subject to UGWDF [kgDW m-2] */
198 double mStoolSap;
199 double mStoolCor;
200
201 /* nitrogen concentration in reproductive tissue [kgN kgDW-1] */
202 double ncBud;
203 /* nitrogen concentration in heartwood [kgN kgDW-1] */
204 double ncCor;
205 /* nitrogen concentration in living foliage [kgN kgDW-1] */
206 double ncFol;
207 /* nitrogen concentration in fine roots [kgN kgDW-1] */
208 double ncFrt;
209 /* nitrogen concentration in sapwood [kgN kgDW-1] */
210 double ncSap;
211
212 /* nitrogen in dead foliage [kgN m-2] */
213 double n_dfol;
214 /* nitrogen in dead structural tissue [kgN m-2] */
215 double n_dst;
216 /* nitrogen in living structural tissue [kgN m-2] */
217 double n_lst;
218 /* nitrogen in stool sap- and corewood [kgN m-2] */
219 double nStoolSap;
220 double nStoolCor;
221
222 /* nitrogen litter input from buds or reproductive tissue [kgN m-2] */
223 double nLitBud, d_nLitBud;
224 /* nitrogen litter input from foliage [kgN m-2] */
225 double nLitFol, d_nLitFol;
226 /* aboveground sapwood nitrogen from events [kgN m-2] */
227 double nLitWoodAbove, d_nLitWoodAbove;
228
229 /* nitrogen retention from senescence per day [kgN] */
230 double n_retention, d_n_retention;
231
232 /* sapwood area (at 1.3 m height) to foliage area ratio [-] */
233 double qsfa;
234 /* sapwood to foliage biomass ratio [-] */
235 double qsfm;
236
237 /* mean plant water potential [MPa] */
238 double psi_mean;
239 /* canopy water potential [MPa] */
240 double psi_cr;
241 /* soil to root plant water potential [MPa] */
242 double psi_sr;
243 /* plant water potential at air entry point (for embolism) [MPa] */
244 double psi_thresh;
245 /* predawn plant water potential [MPa] */
246 double psi_pd;
247
248 /* residual respiration from reproductive tissue [kgC m-1] */
249 double rBud, d_rBud;
250 /* residual respiration from foliage [kgC m-1] */
251 double rFol, d_rFol;
252 /* residual respiration from fine roots [kgC m-1] */
253 double rFrt, d_rFrt;
254 /* total growth respiration [kgC m-1] */
255 double rGro, d_rGro;
256 /* total growth respiration within the soil [kgC m-1] */
257 double rGroBelow, d_rGroBelow;
258 /* total residual respiration [kgC m-1] */
259 double rRes, d_rRes;
260 /* residual respiration from sapwood [kgC m-1] */
261 double rSap, d_rSap;
262 /* residual respiration from sapwood [kgC m-1] */
263 double rSapBelow, d_rSapBelow;
264 /* total transport and uptake respiration [kgC m-1] */
265 double rTra, d_rTra;
266
267 /* foliage senescence per time step [kgDW m-2] */
268 double sFol, d_sFol;
269 /* senescence of reproductive tissue [kgDW m-2] */
270 double sBud, d_sBud;
271 /* fine root senescence per time step [kgDW m-2] */
272 double sFrt, d_sFrt;
273 /* senescence of woody tissue [kgDW m-2] */
274 double sSap, d_sSap;
275 /* aboveground sapwood lost to the litter [kgDW m-2] */
276 double sWoodAbove, d_sWoodAbove;
277 /* belowground sapwood lost to the litter [kgDW m-2] */
278 double sWoodBelow, d_sWoodBelow;
279
280 /* weighted growing degree days [oC] */
281 double growing_degree_days;
282
283 /* previous day water supply modifier */
284 double fwatOld;
285
286 /* number of trees per ha [-] */
287 double tree_number;
288
289 /* root aerenchyme transport coefficient */
290 double root_tc;
291
292 /* resistance of water transport through the xylem (roots + stem) [MPa s m2 mol-1] */
293 double xylem_resistance;
294
295 /* estimated stem radius reduction (shrinkage) due to partial water loss [um tree-1] */
296 double wc_rel;
297
298 /* relative water content (RWC) of sapwood+bark (1 = fully hydrated, 0 = free available water fully depleted) */
299 double stem_shrinkage;
300 /* predawn (minimum) tree water deficit = maximum diurnal radius deviation from water saturated xylem state [um] */
301 double twd_pd_vt;
302 /* maximum (minimum) tree water deficit = minimum diurnal radius deviation from water saturated xylem state [um] */
303 double twd_max_vt;
304
305 /* foliage biomass per age class [kgDW] */
306 double * mFol_na;
307 /* foliage senescence per age class per time step [kgDW m-2] */
308 double * sFol_na, * d_sFol_na;
309
310 /* layer specific carbon uptake (photosynthesis) [kgC m-2] */
311 double * carbonuptake_fl, * d_carbonuptake_fl;
312 /* layer specific intercellular concentration of CO2 and under standard conditions [umol mol-1] */
313 double * co2i_fl, * co2i_std_fl, * d_co2i_fl;
314 /* layer specific leaf internal O2 concentration [umol m-2] */
315 double * o2i_fl, * o2i_std_fl;
316 /* layer specific CO2 compensation point at 25oC per canopy layer and under standard conditions [umol m-2] */
317 double * co2comp25_fl, * co2comp25_std_fl;
318 /* layer specific MEP [umol l-1] */
319 double * mep_fl;
320 /* layer specific DMADP [umol l-1] */
321 double * dmadp_fl;
322 /* layer specific DXP [umol l-1] */
323 double * dxp_fl;
324 /* layer specific GDP [umol l-1] */
325 double * gdp_fl;
326 /* layer specific IDP [umol l-1] */
327 double * idp_fl;
328 /* layer specific isoprene emission [umol m-2] */
329 double * isoprene_emission_fl, * d_isoprene_emission_fl;
330 /* layer specific monoterpene emission [umol m-2] */
331 double * monoterpene_emission_fl, * d_monoterpene_emission_fl;
332 /* layer specific monoterpene emission from storages [umol m-2] */
333 double * monoterpene_s_emission_fl, * d_monoterpene_s_emission_fl;
334 /* layer specific ovoc emission from storages [umol m-2] */
335 double * ovoc_emission_fl, * d_ovoc_emission_fl;
336 /* Michaelis-Menten constant for CO2 reaction of rubisco per canopy layer and under standard conditions [umol mol-1 ubar-1] */
337 double * kco2_fl, * kco2_std_fl;
338 /* Michaelis-Menten constant for O2 reaction of rubisco per canopy layer and under standard conditions [umol mol-1 ubar-1] */
339 double * ko2_fl, * ko2_std_fl;
340 /* layer specific nitrogen concentration [gN gDW-2] */
341 double* nc_fl;
342 /* leaf area index [m2 m-2] */
343 double * lai_fl;
344 /* relative amount of foliage per layer [%] */
345 double * fFol_fl;
346 /* deposited nh3 in the canopy [kg m-2] */
347 double * nh3_fl;
348 /* deposited nh4 in the canopy [kg m-2] */
349 double * nh4_fl;
350 /* deposited no3 in the canopy [kg m-2] */
351 double * no3_fl;
352 /* layer specific relative conductance [%] */
353 double * relativeconductance_fl, * d_relativeconductance_fl;
354 /* specific foliage area [m2 kgDW-1] */
355 double * sla_fl;
356 /* layer specific ATP production [umol m-2LA s-1] */
357 double * atp_fl;
358 /* layer specific ATP pool [umol kgDW-1] */
359 double * atp_pool_fl;
360 /* layer specific triose phosphate production [umol m-2LA s-1] */
361 double * tp_fl;
362 /* layer specific triose phosphate pool [umol kgDW-1] */
363 double * tp_pool_fl;
364 /* layer specific NADPH production [umol m-2 s-1] */
365 double * nadph_fl;
366 /* layer specific NADPH pool [umol kgDW-1] */
367 double * nadph_pool_fl;
368 /* layer specific activity state of isoprene synthase [nmol m-2 s-1] */
369 double * isoAct_fl;
370 /* layer specific activity state of monoterpene synthase [nmol m-2 s-1] */
371 double * monoAct_fl;
372 /* layer specific standard emission factor of isoprene (can be calculated from isoAct_fl) [ug gDW-1 h-1] */
373 double * ef_iso_fl;
374 /* layer specific standard emission factor of monoterpenes (can be calculated from monoAct_fl) [ug gDW-1 h-1] */
375 double * ef_mono_fl;
376 /* layer specific electron transport capacity at 25oC for full light adjusted leaves [umol m-2 s-1] */
377 double * jAct25_fl;
378 /* layer specific potential electron transport capacity per canopy layer under current light and temperature conditions [umol m-2 s-1] */
379 double * jPot_fl, * d_jPot_fl;
380 /* layer specific electron transport capacity at 25oC per canopy layer [umol m-2 s-1] */
381 double * jMax25_fl;
382 /* layer specific actual electron transport capacity per canopy layer and under standard conditions [umol m-2 s-1] */
383 double * jMax_fl, * jMax_std_fl, * d_jMax_fl;
384 /* layer specific dark respiration at 25oC per canopy layer [umol m-2 s-1] */
385 double * rdAct25_fl;
386 /* layer specific actual dark respiration per canopy layer [umol m-2 s-1] */
387 double * rd_fl;
388 /* layer specific activity state of rubisco at 25oC for full light adjusted leaves [umol m-2 s-1] */
389 double * vcAct25_fl;
390 /* layer specific activity state of rubisco with light and CO2 but not temperature restrictions [umol m-2 s-1] */
391 double * vcAct_fl;
392 /* layer specific activity state of rubisco at 25oC per canopy layer [umol m-2 s-1] */
393 double * vcMax25_fl;
394 /* layer specific actual activity state of rubisco per canopy layer and under standard conditions [umol m-2 s-1] */
395 double * vcMax_fl, * vcMax_std_fl;
396
397 /* fine root length per layer [m] */
398 double * rootlength_sl;
399 /* relative amount of fine roots per layer per species. [%] */
400 double * fFrt_sl;
401 /* fine root nitrogen litter input from events [kgN m-2] */
402 double * nLitFrt_sl, * d_nLitFrt_sl;
403 /* fine root senescence from events [kgDW m-2] */
404 double * sFrt_sl, * d_sFrt_sl;
405 /* belowground sapwood senescence from mortality events [kgDW m-2] */
406 double * sWoodBelow_sl, * d_sWoodBelow_sl;
407 /* belowground sapwood nitrogen from events [kgN m-2] */
408 double * nLitWoodBelow_sl, * d_nLitWoodBelow_sl;
409 /* absolut hypoxia per layer per species (not scaled by fFrt). [%] */
410 double * hypoxia_sl;
411
412 /* method for dimensional growth calculation (cone-based or taper-based) */
413 bool is_tapergrowth;
414public:
415
417 void reset();
418
420 double lai() const
421 { return cbm::sum( this->lai_fl, this->nb_foliagelayers()); };
422
430 double interception_capacity() const
431 { return this->aboveground_wood() * this->parameters()->MWWM()
432 + this->lai() * this->parameters()->MWFM(); };
433
441 double stand_volume() const // m3 ha-1 from kg m-2
442 { return this->stem_wood() / (this->parameters()->DSAP() * cbm::DM3_IN_M3) * cbm::M2_IN_HA; };
443
444 double dead_structural_matter() const // kg m-2
445 { return ( this->mCor + this->dw_dst + this->mStoolCor); };
446
447 double living_structural_matter() const // kg m-2
448 { return ( this->mSap + this->dw_lst + this->mStoolSap); };
449
451 double stool_wood() const
452 { return ( this->mStoolSap + this->mStoolCor); };
453
454 double foliage_matter() const
455 { return ( this->mFol + this->dw_dfol); };
456
468 {
469 double living; /* fraction applied to the living pool [-] */
470 double dead; /* fraction applied to the dead pool [-] */
471 };
472
478 {
479 double axis; /* trunk + crown (stem axis) */
480 double branches; /* crown * FBRA */
481 double taproot; /* tap root */
482 double roots; /* tap root + coarse roots, tap root * (1 + FCRT) */
483 bool has_geometry;
484 };
485 sapwood_volumes_t sapwood_volumes() const
486 {
488 v.axis = this->vsap_trunk + this->vsap_crown;
489 v.branches = this->vsap_crown * this->parameters()->FBRA();
490 v.taproot = this->vsap_croot;
491 v.roots = this->vsap_croot * ( 1.0 + this->parameters()->FCRT());
492 v.has_geometry = cbm::flt_greater_zero( v.axis + v.branches + v.roots)
493 && cbm::flt_greater_zero( v.axis + v.taproot);
494 return v;
495 }
496
499 pool_fractions_t fraction_aboveground() const
500 {
501 sapwood_volumes_t const v( this->sapwood_volumes());
502 pool_fractions_t f;
503 if ( !v.has_geometry)
504 {
505 f.living = 1.0 - this->parameters()->UGWDF();
506 f.dead = f.living;
507 }
508 else
509 {
510 f.living = ( v.axis + v.branches) / ( v.axis + v.branches + v.roots);
511 f.dead = v.axis / ( v.axis + v.taproot);
512 }
513 return f;
514 }
515
518 pool_fractions_t fraction_stem_of_aboveground() const
519 {
520 sapwood_volumes_t const v( this->sapwood_volumes());
521 pool_fractions_t f;
522 if ( !v.has_geometry)
523 {
524 f.living = 1.0 - this->f_branch;
525 f.dead = f.living;
526 }
527 else
528 {
529 f.living = cbm::flt_greater_zero( v.axis + v.branches) ? v.axis / ( v.axis + v.branches) : 1.0;
530 f.dead = 1.0; /* no corewood in branches */
531 }
532 return f;
533 }
534
536 double stem_wood() const
537 {
538 pool_fractions_t const ag( this->fraction_aboveground());
539 pool_fractions_t const stem( this->fraction_stem_of_aboveground());
540 return this->mSap * ag.living * stem.living + this->mCor * ag.dead * stem.dead;
541 };
542
544 double aboveground_wood() const
545 {
546 pool_fractions_t const ag( this->fraction_aboveground());
547 return this->mSap * ag.living + this->mCor * ag.dead;
548 };
549
551 double branch_wood() const
552 { return this->aboveground_wood() - this->stem_wood(); };
553
555 double belowground_wood() const
556 { return ( this->mSap + this->mCor) - this->aboveground_wood() + this->stool_wood(); };
557
559 double aboveground_structural_matter() const
560 {
561 pool_fractions_t const ag( this->fraction_aboveground());
562 return this->aboveground_wood() + this->dw_lst * ag.living + this->dw_dst * ag.dead;
563 };
564
566 double aboveground_biomass() const
567 { return ( this->aboveground_structural_matter() + this->mFol + this->dw_dfol + (this->parameters()->TUBER() ? 0.0 : this->mBud) ); };
568
570 double belowground_structural_matter() const
571 { return this->living_structural_matter() + this->dead_structural_matter() - this->aboveground_structural_matter(); };
572
574 double belowground_biomass() const
575 { return ( this->belowground_structural_matter() + this->mFrt + (this->parameters()->TUBER() ? this->mBud : 0.0) ); };
576
578 double total_biomass() const
579 { return this->mSap + this->mStoolSap + this->dw_lst +
580 this->mCor + this->mStoolCor + this->dw_dst +
581 this->mFol + this->dw_dfol +
582 this->mBud + this->mFrt; };
583
585 double n_cor() const
586 { return this->mCor * this->ncCor; }
587 double nc_cor() const
588 { return this->ncCor; }
589
591 double n_sap() const
592 { return this->mSap * this->ncSap; }
593 double nc_sap() const
594 { return this->ncSap; }
595
597 double n_frt() const
598 { return this->mFrt * this->ncFrt; }
599 double nc_frt() const
600 { return this->ncFrt; }
601
603 double n_fol() const
604 { return this->mFol * this->ncFol; }
605 double nc_fol() const
606 { return this->ncFol; }
607
609 double n_bud() const
610 { return this->mBud * this->ncBud; }
611 double nc_bud() const
612 { return this->ncBud; }
613
615 double nc_lst() const
616 { return cbm::flt_greater_zero( this->living_structural_matter()) ? (this->n_sap() + this->n_lst + this->nStoolSap) / this->living_structural_matter(): 0.0; }
617
619 double nc_dst() const
620 { return cbm::flt_greater_zero( this->dead_structural_matter()) ? (this->n_cor() + this->n_dst + this->nStoolCor) / this->dead_structural_matter(): 0.0; }
621
623 double aboveground_nitrogen() const
624 {
625 pool_fractions_t const ag( this->fraction_aboveground());
626 return ( (this->n_sap() + this->n_lst) * ag.living
627 + (this->n_cor() + this->n_dst) * ag.dead
628 + this->n_fol() + this->n_dfol
629 + (this->parameters()->TUBER() ? 0.0 : this->n_bud()));
630 };
631
633 double belowground_nitrogen() const
634 { return this->total_nitrogen() - this->aboveground_nitrogen(); };
635
637 double total_nitrogen() const
638 { return this->n_sap() + this->n_lst + this->n_cor() + this->n_dst + this->nStoolSap + this->nStoolCor + this->n_fol() + this->n_dfol + this->n_bud() + this->n_frt(); };
639
641 double cn_ratio() const
642 { return cbm::flt_greater_zero( total_nitrogen()) ? total_biomass() * cbm::CCDM / total_nitrogen() : 0.0; };
643
644 /* Carbon of reproductive tissue [kgC m-2] */
645 double c_fru() const
646 { return this->mBud * cbm::CCDM; };
647
648 /* Carbon of dead structural matter [kgC m-2] */
649 double c_dst() const
650 { return this->dead_structural_matter() * cbm::CCDM; };
651
652 /* Carbon of living foliage biomass [kgC m-2] */
653 double c_fol() const
654 { return this->mFol * cbm::CCDM; };
655
656 /* Carbon of dead foliage biomass [kgC m-2] */
657 double c_dfol() const
658 { return this->dw_dfol * cbm::CCDM; };
659
660 /* Carbon of living fine root biomass [kgC m-2] */
661 double c_frt() const
662 { return this->mFrt * cbm::CCDM; };
663
664 /* Carbon of living structural matter [kgC m-2] */
665 double c_lst() const
666 { return this->living_structural_matter() * cbm::CCDM; };
667
669 double f_fol_maximum() const
670 {
671 double f_fol_max( 0.0);
672 for ( size_t fl = 0; fl < this->nb_foliagelayers(); fl++)
673 {
674 if ( cbm::flt_greater( this->fFol_fl[fl], f_fol_max))
675 {
676 f_fol_max = this->fFol_fl[fl];
677 }
678 }
679 return f_fol_max;
680 };
681
682 double n_leaf_surface() const
683 {
684 double n_tot( 0.0);
685 for ( size_t fl = 0; fl < this->nb_foliagelayers(); fl++)
686 {
687 n_tot += nh4_fl[fl] + no3_fl[fl];
688 }
689 return n_tot;
690 }
691
693 double m_fol_fl( size_t _fl) const
694 { return this->mFol * this->fFol_fl[_fl]; }
695
705 double belowground_respiration()
706 { return rGroBelow + rFrt + rTra + rSapBelow + (parameters()->TUBER() ? rBud : 0.0); };
707
708 double d_belowground_respiration()
709 { return d_rGroBelow + d_rFrt + d_rTra + d_rSapBelow + (parameters()->TUBER() ? d_rBud : 0.0); };
710
711
712public:
713 /* properties */
714 ldate_t seeding_date;
715 double initial_biomass;
716 bool is_covercrop;
717
718private:
719 MoBiLE_PlantSettings m_plantsettings;
720 friend class MoBiLE_PlantVegetation;
721 MoBiLE_PlantVegetation const * m_plantvegetation;
722};
723
724class LDNDC_API MoBiLE_PlantVegetation : public LD_PlantVegetation< MoBiLE_Plant >
725{
726public:
727 MoBiLE_PlantVegetation( LD_PlantsParametersDB const * = NULL);
728 ~MoBiLE_PlantVegetation();
729
730 MoBiLE_Plant * new_plant( MoBiLE_PlantSettings const *);
731 lerr_t delete_plant( char const * /*plant name*/);
732
733 bool is_family( MoBiLE_Plant const *, char const * /*family*/) const;
734 bool is_family( char const * /*plant type*/, char const * /*family*/) const;
735
736 void set_input( speciesparameters::input_class_speciesparameters_t const * _speciesparameters)
737 { this->m_speciesparameters = _speciesparameters; }
738 MoBiLE_PlantParameters get_parameters( char const * /*plant type*/);
739
740 size_t slot_cnt();
741
742 double canopy_height();
743 size_t canopy_layers_used();
744
745 double lai();
746 double lai_fl( size_t /* foliage layer */);
747 double dw_frt();
748 double mfrt_sl( size_t /* soil layer */);
749 double rootlength_sl( size_t /* soil layer */);
750 double root_density_sl( size_t /* soil layer */, double , bool );
751 double area_cover();
752
753private:
754 speciesparameters::input_class_speciesparameters_t const * m_speciesparameters;
755};
756
757typedef MoBiLE_PlantVegetation::Iterator PlantIterator;
758typedef MoBiLE_PlantVegetation::GroupIterator< species::crop > CropIterator;
759typedef MoBiLE_PlantVegetation::GroupIterator< species::grass > GrassIterator;
760typedef MoBiLE_PlantVegetation::GroupIterator< species::wood > TreeIterator;
761
762} /* namespace ldndc */
763
764
765#endif /* !PLANT_H_ */
Spatially explicit groundwater model.
Definition airchemistryput.h:15
Spatial partitioning of woody/structural tissue.
Definition mbe_plant.h:468
Sapwood volumes of tree parts [m3 tree-1].
Definition mbe_plant.h:478