LandscapeDNDC 1.37.0
Loading...
Searching...
No Matches
plamox.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 */
18
19#ifndef LM_PHYSIOLOGY_PLAMOX_H_
20#define LM_PHYSIOLOGY_PLAMOX_H_
21
22#include "mbe_legacymodel.h"
23#include "state/mbe_state.h"
24#include "ld_shared.h"
25
26#include <input/remotesensing/remotesensing.h>
27
28#include "physiology/ld_plantfunctions.h"
29#include "physiology/ld_rootsystem.h"
30#include "physiology/ld_nitrogenfixation.h"
31#include "physiology/ld_transpiration.h"
32#include "physiology/ld_vernalization.h"
33#include "watercycle/ld_droughtstress.h"
34#include "physiology/ld_stomatalconductance.h"
35#include "physiology/photofarquhar/berryball.h"
36
37#include "eventhandler/graze/graze.h"
38#include "eventhandler/cut/cut.h"
39
40#include <string>
41#include <vector>
42
43
44namespace ldndc {
45
47#define ON_ENTRY 1
48/* stages of the phosphorus bookkeeping (see plamox-phosphorus.cpp) */
49#define P_MARK_PRE_UPTAKE 1
50#define P_MARK_UPTAKE 2
51#define P_MARK_END 3
53#define ON_EXIT 2
54
55extern cbm::logger_t * PhysiologyPlaMoxLogger;
56
58class NitrogenFixation;
59
68class LDNDC_API PhysiologyPlaMox : public MBE_LegacyModel
69{
71 LMOD_EXPORT_MODULE_INFO(PhysiologyPlaMox,"physiology:plamox","Physiology PlaMox");
72
85
86public:
87
90 MoBiLE_State *,
91 cbm::io_kcomm_t *,
92 timemode_e);
93
99
100 lerr_t configure( ldndc::config_file_t const *);
101 lerr_t register_ports( cbm::io_kcomm_t *);
102 lerr_t initialize();
103
104 lerr_t solve();
105 lerr_t unregister_ports( cbm::io_kcomm_t *);
107 lerr_t finalize() { return LDNDC_ERR_OK; }
108
110 lerr_t sleep() { return LDNDC_ERR_OK; }
112 lerr_t wake() { return LDNDC_ERR_OK; }
113
114private:
115
117 MoBiLE_State * m_state;
119 cbm::io_kcomm_t * io_kcomm;
120
121 /* required input classes */
123 input_class_climate_t const & cl_;
125 input_class_setup_t const * m_setup;
127 input_class_soillayers_t const & sl_;
129 input_class_species_t const * m_species;
131 input_class_speciesparameters_t const * m_speciesparameters;
133 input_class_siteparameters_t const * m_siteparameters;
135 remotesensing::input_class_remotesensing_t const * rm_;
136
138 MoBiLE_PlantVegetation * m_veg;
139
140 /* required state components */
142 substate_airchemistry_t & ac_;
144 substate_microclimate_t & mc_;
146 substate_physiology_t & ph_;
148 substate_soilchemistry_t & sc_;
150 substate_watercycle_t & wc_;
151
152 /* management handling */
154 SubscribedEvent<LD_EventHandlerQueue> m_HarvestEvents;
156 SubscribedEvent<LD_EventHandlerQueue> m_PlantEvents;
157
159 PublishedField<double> aboveground_biomass;
161 PublishedField<double> maturity_status;
163 PublishedField<double> growing_degree_days_maturity;
165 PublishedField<double> dEmerg;
166
175
177 EventHandlerGraze m_eventgraze;
179 EventHandlerCut m_eventcut;
180
186
191 NitrogenFixation *plamox_nitrogen_fixation;
192
199 ldndc::growable_array < BaseRootSystemDNDC*, 1000, 1 > plamox_root_system;
200
205 LD_PlantFunctions m_pf;
206
208 lvector_t< double > no3_sl;
210 lvector_t< double > nh4_sl;
212 lvector_t< double > don_sl;
213
228 cbm::string_t droughtstress_method;
236
243
252
259 std::vector< double > nup_scale_nh4_sl_;
260 std::vector< double > nup_scale_no3_sl_;
261 std::vector< double > nup_scale_don_sl_;
262 std::vector< double > nh4_sl0_;
263 std::vector< double > no3_sl0_;
264 std::vector< double > don_sl0_;
265
270 cbm::string_t::cbmstring_array_t plantfamilies;
271
277 double const FTS_TOT_;
278
279 /***********************************/
280 /* Mobile state exchange variables */
281 /***********************************/
282
284 lvector_t< long long int > seconds_crop_planting;
285
287 lvector_t< double > gdd_grain_filling;
288
290 lvector_t< double > hypoxia;
291
293 lvector_t< int > days_after_emergence;
294
296 lvector_t< std::string > location;
298 lvector_t< double > dw_retranslocation_stem;
300 lvector_t< double > dw_retranslocation_foliage;
302 lvector_t< double > dw_fol_old;
304 lvector_t< double > lai_dynamic;
307 lvector_t< double > lai_juvenile;
309 lvector_t< double > gdd_juvenile;
312 lvector_t< double > dw_shoot_growth_season;
314 lvector_t< double > dw_shoot_growth_last;
316 lvector_t< double > f_h2o_fruit_set_sum;
318 lvector_t< double > f_h2o_fruit_set_cnt;
319
320 /*************************/
321 /* PlaMox only variables */
322 /*************************/
323
325 std::map< std::string, double > gdd_target;
326
327 /*---------------*/
328 /* model options */
329
336
342
343 /*-----------------------------*/
344 /* carbon and nitrogen balance */
345
351 double tot_c_;
353 double tot_n_;
354
357
363
364 /*-----------------*/
365 /* state variables */
366
371 lvector_t< double > transplanting_shock_vt;
372
377 lvector_t< int > yearly_cuts;
378
383 lvector_t< bool > reset_phenology;
384
391 lvector_t< double > gdd_day_start;
392 lvector_t< int > rest_days;
393 lvector_t< int > days_since_flag;
394 lvector_t< int > days_since_harvest_reset;
395
400 lvector_t< double > n_plant;
401
406 lvector_t< double > allocation_factor_leafs;
407
412 lvector_t< double > allocation_factor_stems;
413
418 lvector_t< double > allocation_factor_fruit;
419
424 lvector_t< double > allocation_factor_roots;
425
432 lvector_t< double > lai_min;
434 lvector_t< double > lai_min_at_tillering;
435
440 lvector_t< double > fractional_cover;
441
446 lvector_t< double > leaf_respiration_vt;
447
452 lvector_t< double > chill_units;
453
459 lvector_t< double > m_fruit_maximum;
460
465 lvector_t< double > spikelets_sterility;
466
472 lvector_t< double > nc_fol_opt;
473
479 lvector_t< unsigned int > root_q_vt_;
480
482 static size_t const HEAT_SERIES_DAYS = 19;
483
489 std::vector< double > daytime_temperatures;
490
496 std::vector< double > influence_heat_daily;
497
503
504
509 lvector_t< double > day_of_flowering;
510
511 /* timing of the episode of high temperatures relative to flowering */
512 //double timing_heatshock;
513 /* duration of the episode of high temperatures */
514 //double duration_heatshock;
515
516
525
526
527 /********************/
528 /* function members */
529 /********************/
530
535 lerr_t
537
542 lerr_t
548 lerr_t
550
555 lerr_t
557
562 lerr_t
564
576 lerr_t
577 PlaMox_event_plant( MoBiLE_Plant *, EventAttributes const &);
578
583 lerr_t
585
597 lerr_t
598 PlaMox_event_harvest( MoBiLE_Plant *, EventAttributes const &);
599
604 lerr_t
605 PlaMox_reset_phenology( MoBiLE_Plant * /* plant species */);
606
611 bool
612 PlaMox_season_start_due( MoBiLE_Plant * /* plant species */);
613
619 lerr_t
620 PlaMox_photosynthesis( MoBiLE_Plant * /* plant species */);
621
626 void
627 PlaMox_vernalization( MoBiLE_Plant * /* plant species */);
628
634 void
635 PlaMox_growing_degree_days( MoBiLE_Plant * /* plant species */);
636
642 void
643 PlaMox_heat_stress_limitation(MoBiLE_Plant* _vt /* plant species */);
644
649 void
650 PlaMox_heat_stress_reset( size_t /* slot */);
651
656 void
657 PlaMox_plant_development_crop( MoBiLE_Plant * /* plant species */);
658
663 double
664 PlaMox_root_drought_factor( MoBiLE_Plant * /* plant species */);
665
670 lerr_t
671 PlaMox_allocation_grass( MoBiLE_Plant * /* plant species */);
672
677 lerr_t
678 PlaMox_bud_burst( MoBiLE_Plant * /* plant species */);
679
685 lerr_t
686 PlaMox_redistribution( MoBiLE_Plant * /* plant species */);
687
692 void
693 PlaMox_respiration( MoBiLE_Plant * /* plant species */);
694
699 void
700 PlaMox_exsudation( MoBiLE_Plant * /* plant species */);
701
706 void
707 PlaMox_nitrogen_uptake( MoBiLE_Plant * /* plant species */);
708
709 /* nitrogen demand of the uptake step (0 if none) */
710 double
711 PlaMox_nitrogen_uptake_demand( MoBiLE_Plant * /* plant species */);
712
713 /* share of the soil nitrogen available at the location of the plant */
714 double
715 PlaMox_plant_available_n_share( MoBiLE_Plant * /* plant species */);
716
717 /* potential uptake of a soil layer from the given pools (false: no roots) */
718 bool
719 PlaMox_nitrogen_uptake_potential( MoBiLE_Plant *, size_t /* soil layer */, double /* available share */,
720 double /* nh4 */, double /* no3 */, double /* don */,
721 double & /* nh4 up */, double & /* no3 up */, double & /* don up */);
722
723 /* scaling factors for simultaneous uptake of all plants */
724 void
725 PlaMox_nitrogen_uptake_competition();
726
731 lerr_t
732 PlaMox_nitrogen_fixation( MoBiLE_Plant * /* plant species */);
733
738 lerr_t
739 PlaMox_senescence( MoBiLE_Plant * /* plant species */);
740
745 lerr_t
746 PlaMox_abscission( MoBiLE_Plant * /* plant species */);
747
752 void
753 PlaMox_drought( MoBiLE_Plant * /* plant species */);
754
759 void
760 PlaMox_transpiration( MoBiLE_Plant * /* plant species */);
761
767 void
769 double);
770
775 void
776 PlaMox_update_height( MoBiLE_Plant *);
777
782 void
784
790 void
791 PlaMox_update_foliage_structure( MoBiLE_Plant *);
792
797 void
798 PlaMox_update_specific_leaf_area( MoBiLE_Plant *);
799
805 double
806 PlaMox_juvenile_specific_leaf_area( MoBiLE_Plant *, double /* specific leaf area without juvenile expansion */);
807
813 void
815
821 double
822 PlaMox_get_nitrogen_deficiency( MoBiLE_Plant * /* plant species */);
823
829 double
831
836 double
837 PlaMox_get_age_factor( MoBiLE_Plant * /* plant species */);
838
843 double
844 PlaMox_get_frost_factor( MoBiLE_Plant *,
845 double);
846
852 double
853 PlaMox_get_hypoxia_factor( MoBiLE_Plant * /* plant species */);
854
859 double
860 PlaMox_get_heat_factor( MoBiLE_Plant * /* plant species */);
861
867 double
868 PlaMox_get_foliage_nitrogen_concentration( MoBiLE_Plant * /* plant species */);
869
875 double
876 PlaMox_n_opt( MoBiLE_Plant * /* plant species */);
877
882 void
883 PlaMox_balance_check( int /*stage*/);
884
889 lerr_t PLAMOX_CHECK_FOR_NEGATIVE_VALUE( char const * /*name*/);
890
891 /* phosphorus, only if the soil chemistry module simulates phosphorus (substate p_active),
892 * see plamox-phosphorus.cpp */
893 bool have_p_;
894 bool p_initialized_;
895 std::vector< double > p_plant_;
896 std::vector< double > p_n_mark_;
897 std::vector< double > p_po4_sl_;
898 std::vector< double > p_up_sl_;
899 double p_acc_n_above_, p_acc_n_below_, p_acc_n_exp_;
900 double p_loss_step_;
901 double p_cum_seed_, p_cum_uptake_, p_cum_litter_, p_cum_export_;
902 void PlaMox_phosphorus_mark( int /*stage*/);
903 void PlaMox_phosphorus_uptake( MoBiLE_Plant *);
904 double PlaMox_get_phosphorus_deficiency( MoBiLE_Plant *);
905 double PlaMox_get_nutrient_deficiency( MoBiLE_Plant *);
906
907
908 /*****************/
909 /* class members */
910 /*****************/
911
917 typedef std::vector< MoBiLE_Plant * >::iterator PlaMoxIterator;
918
925 std::vector< MoBiLE_Plant * > plamox_plants;
926
931 std::vector< std::string > plantfamily_tags;
932
935 {
937 FAMILY_RICE = 1u << 0,
939 FAMILY_WHEAT = 1u << 1,
941 FAMILY_CORNS = 1u << 2,
945 FAMILY_MILT = 1u << 4,
947 FAMILY_SORG = 1u << 5,
949 FAMILY_CASSAVA = 1u << 6,
954 };
955
961 lvector_t< unsigned int > family_flags;
962
973 {
974 MoBiLE_Plant const * plant;
975 size_t slot;
976 std::string ctype;
977 };
978
984 std::vector< plamox_plant_id_t > plant_list_fingerprint;
985
994
999 void
1001
1006 bool
1007 PlaMox_is_family( MoBiLE_Plant const * _p, unsigned int _family) const
1008 { return ( this->family_flags[_p->slot] & _family) != 0; }
1009
1011 PlaMoxIterator begin();
1012
1014 PlaMoxIterator end();
1015
1021 plant_life_cycle_e
1022 PlaMox_get_life_cycle( MoBiLE_Plant *);
1023
1029 double
1030 PlaMox_coffee_fruit_set( MoBiLE_Plant *);
1031
1037 double
1038 PlaMox_fruit_sink( MoBiLE_Plant *, double /* grain development */);
1039};
1040} /*namespace ldndc*/
1041
1042#endif /* !LM_PHYSIOLOGY_PLAMOX_H_ */
Vegetation model PlaMox: carbon and nitrogen dynamics of crops and grass (see PlaMox - Plant Growth M...
Definition plamox.h:69
lvector_t< bool > reset_phenology
Phenology of a perennial plant is reset as soon as MOS > 0.99.
Definition plamox.h:383
void PlaMox_nitrogen_uptake(MoBiLE_Plant *)
Nitrogen uptake from the soil (see Nitrogen uptake)
size_t plant_list_generation
Generation of the species parameter database when the family flags were computed. The database may be...
Definition plamox.h:993
lvector_t< double > dw_fol_old
Foliage mass at the beginning of the time step [kgDW m-2].
Definition plamox.h:302
lerr_t PLAMOX_CHECK_FOR_NEGATIVE_VALUE(char const *)
Debugging helper: checks the plant states for negative values or NaN.
Definition plamox-setting.cpp:442
input_class_species_t const * m_species
Species input.
Definition plamox.h:129
MoBiLE_State * m_state
Model state.
Definition plamox.h:117
lvector_t< double > lai_juvenile
Potential leaf area index of the temperature driven leaf expansion in the juvenile phase [m2 m-2] (se...
Definition plamox.h:307
PublishedField< double > dEmerg
Published field: sum of the days of emergence of all plants.
Definition plamox.h:165
double PlaMox_get_foliage_nitrogen_concentration(MoBiLE_Plant *)
Optimum foliage nitrogen concentration [kgN kgDW-1] (see Optimum foliage nitrogen concentration)
Definition plamox.cpp:4806
lvector_t< double > gdd_day_start
Season start of perennial plants (see Season start of perennial plants): growing degree days at the s...
Definition plamox.h:391
bool have_automatic_nitrogen
Potential nitrogen mode (option npot): demand not covered by uptake is supplied directly.
Definition plamox.h:335
lvector_t< double > allocation_factor_stems
Allocation factor of daily assimilated carbon to stem growth [-].
Definition plamox.h:412
std::map< std::string, double > gdd_target
Growing degree days at the last harvest per plant name, used as maturity target [°C d].
Definition plamox.h:325
lvector_t< double > f_h2o_fruit_set_sum
Coffee: sum of the drought index between flowering and onset of fruit filling [-].
Definition plamox.h:316
lvector_t< long long int > seconds_crop_planting
Time of planting [s].
Definition plamox.h:284
void PlaMox_update_root_structure(MoBiLE_Plant *, double)
Distributes new fine root mass over the soil layers and updates the root conductivity (see Root struc...
double PlaMox_get_heat_factor(MoBiLE_Plant *)
Heat factor [-] (see Heat factor)
Definition plamox.cpp:4636
std::vector< double > p_plant_
Definition plamox.h:895
std::vector< std::string > plantfamily_tags
Family tags (":family:") of the plant families handled by PlaMox.
Definition plamox.h:931
lvector_t< double > dw_retranslocation_foliage
Foliage mass available for retranslocation to the fruit [kgDW m-2].
Definition plamox.h:300
lerr_t PlaMox_step_init()
pre-run initialization each time step
Definition plamox.cpp:196
lvector_t< double > allocation_factor_fruit
Allocation factor of daily assimilated carbon to fruit growth [-].
Definition plamox.h:418
void PlaMox_update_specific_leaf_area(MoBiLE_Plant *)
Specific leaf area of the foliage layers (see Specific leaf area)
Definition plamox.cpp:4120
double automatic_nitrogen_uptake
Nitrogen supplied in the potential nitrogen mode in the time step [kgN m-2].
Definition plamox.h:341
bool n_deficiency_reference_optimum
Reference foliage nitrogen concentration of the nitrogen deficiency factor of species other than rice...
Definition plamox.h:235
double PlaMox_get_age_factor(MoBiLE_Plant *)
Age factor [-] (see Age factor)
void PlaMox_heat_stress_reset(size_t)
Resets the heat-stress state of one plant (slot), at planting.
Definition plamox.cpp:4491
lerr_t PlaMox_abscission(MoBiLE_Plant *)
Shedding of dead foliage and stems of grass (see Abscission of grass and coffee)
Definition plamox.cpp:3686
substate_soilchemistry_t & sc_
Soil chemistry state (nitrogen, carbon, litter, oxygen)
Definition plamox.h:148
input_class_soillayers_t const & sl_
Soil layers input.
Definition plamox.h:127
std::vector< double > p_up_sl_
Definition plamox.h:898
BerryBall plamox_berryball
Photosynthesis.
Definition plamox.h:185
double PlaMox_n_opt(MoBiLE_Plant *)
Optimum nitrogen of the living plant [kgN m-2] (see Optimum plant nitrogen)
Definition plamox.cpp:4283
lerr_t wake()
Wake up (nothing to do)
Definition plamox.h:112
double PlaMox_get_biomass_induced_downregulation(MoBiLE_Plant *)
Biomass-induced down-regulation of photosynthesis [-] (see Biomass-induced down-regulation)
Definition plamox.cpp:4726
lvector_t< double > transplanting_shock_vt
Transplanting shock [-] (1 at transplanting, decreasing by 0.1 per day)
Definition plamox.h:371
bool have_nitrogen_limited_growth
Nitrogen-limited shoot growth (option nlimitedgrowth): new foliage and stems need at least their mini...
Definition plamox.h:242
ldndc::growable_array< BaseRootSystemDNDC *, 1000, 1 > plamox_root_system
Root system.
Definition plamox.h:199
lerr_t PlaMox_management()
Applies grazing and cutting events.
Definition plamox.cpp:1468
lvector_t< double > lai_dynamic
Leaf area index used with remote sensing input [m2 m-2].
Definition plamox.h:304
substate_watercycle_t & wc_
Water cycle state (soil water, ice, transpiration)
Definition plamox.h:150
double tot_c_
Carbon balance at the beginning of the time step [kgC m-2].
Definition plamox.h:351
substate_physiology_t & ph_
Physiology state (canopy layers, nitrogen uptake, exports)
Definition plamox.h:146
lvector_t< double > nc_fol_opt
Reference foliage nitrogen concentration of the nitrogen deficiency factor [kgN kgDW-1].
Definition plamox.h:472
double const FTS_TOT_
Time resolution factor: .
Definition plamox.h:277
lvector_t< double > f_h2o_fruit_set_cnt
Coffee: number of time steps of f_h2o_fruit_set_sum [-].
Definition plamox.h:318
bool PlaMox_season_start_due(MoBiLE_Plant *)
Flagged season start of a perennial plant takes place now (rest phase, see Season start of perennial ...
Definition plamox.cpp:454
PublishedField< double > maturity_status
Published field: sum of the development stages of all plants [-].
Definition plamox.h:161
PublishedField< double > growing_degree_days_maturity
Published field: sum of the growing degree days of all plants [°C d].
Definition plamox.h:163
double timestep_c_assi
Carbon assimilated (and added at planting) in the time step [kgC m-2].
Definition plamox.h:356
plant_life_cycle_e
Life cycle of a plant.
Definition plamox.h:75
@ BIENNIAL
Biennial plant (currently not used)
Definition plamox.h:79
@ PERENNIAL
Perennial plant.
Definition plamox.h:83
@ ANNUAL
Annual plant.
Definition plamox.h:77
@ PLURIENNIAL
Pluriennial plant (currently not used)
Definition plamox.h:81
SubscribedEvent< LD_EventHandlerQueue > m_PlantEvents
Planting events.
Definition plamox.h:156
void PlaMox_heat_stress_limitation(MoBiLE_Plant *_vt)
Heat stress around flowering that limits the fruit set (see Heat stress around flowering)
Definition plamox.cpp:4515
double c_total_exported
Carbon exported with harvest in the time step, including roots [kgC m-2].
Definition plamox.h:518
input_class_siteparameters_t const * m_siteparameters
Site parameters input.
Definition plamox.h:133
void PlaMox_growing_degree_days(MoBiLE_Plant *)
Growing degree days, development stage, mortality state and emergence (see Growing degree days)
PublishedField< double > nitrogen_plant_biomass_fruit_exported_from_field
Published field: nitrogen exported with the fruit [kgN m-2].
Definition plamox.h:174
lvector_t< double > influence_heat_reduction_grainfilling
Heat factor for grain filling (minimum of the daily heat impact) [-], per plant.
Definition plamox.h:502
std::vector< double > p_n_mark_
Definition plamox.h:896
lerr_t PlaMox_step_resize()
resize plant species vector
Definition plamox-setting.cpp:484
input_class_speciesparameters_t const * m_speciesparameters
Species parameters input.
Definition plamox.h:131
double PlaMox_get_nutrient_deficiency(MoBiLE_Plant *)
nutrient deficiency of photosynthesis and root allocation: nitrogen deficiency, with phosphorus the m...
Definition plamox-phosphorus.cpp:76
lvector_t< double > dw_shoot_growth_last
Coffee: shoot growth of the previous season, which carries the fruit nodes [kgDW m-2].
Definition plamox.h:314
lvector_t< double > dw_retranslocation_stem
Stem mass available for retranslocation to the fruit [kgDW m-2].
Definition plamox.h:298
void PlaMox_exsudation(MoBiLE_Plant *)
Root exudation (see Root exudation)
Definition plamox.cpp:3345
lvector_t< double > m_fruit_maximum
Maximum fruit mass [kgDW m-2] (M_FRUIT_OPT reduced by heat stress and spikelet sterility; -1: no limi...
Definition plamox.h:459
lerr_t PlaMox_allocation_grass(MoBiLE_Plant *)
Allocation fractions of grass (see Grass)
LMOD_EXPORT_MODULE_INFO(PhysiologyPlaMox,"physiology:plamox","Physiology PlaMox")
Module registration.
void PlaMox_update_nitrogen_concentrations(MoBiLE_Plant *)
Distributes the plant nitrogen among the living compartments (see Nitrogen distribution)
Definition plamox.cpp:4315
bool have_drought_stress
Consider drought stress yes/no.
Definition plamox.h:218
double PlaMox_get_hypoxia_factor(MoBiLE_Plant *)
Photosynthesis factor for oxygen deficiency [-] (see Oxygen deficiency (hypoxia))
Definition plamox.cpp:4438
lvector_t< double > dw_shoot_growth_season
Coffee: shoot (leaf and stem) growth since the last phenology reset [kgDW m-2] (see Coffee)
Definition plamox.h:312
std::vector< double > daytime_temperatures
Daytime temperatures of the last 19 days around flowering [°C], per plant (slot s: elements s*19 ....
Definition plamox.h:489
void PlaMox_plant_development_crop(MoBiLE_Plant *)
Allocation fractions of crops (see Crops)
lvector_t< double > don_sl
Soil DON available for uptake in the time step [kgN m-2].
Definition plamox.h:212
double PlaMox_root_drought_factor(MoBiLE_Plant *)
Factor increasing the root allocation under drought (1: no response, see Fine roots)
Definition plamox.cpp:1813
input_class_climate_t const & cl_
Climate input.
Definition plamox.h:123
void PlaMox_update_foliage_structure(MoBiLE_Plant *)
Foliage distribution and leaf area index of the foliage layers (see Leaf area)
Definition plamox.cpp:4028
void PlaMox_respiration(MoBiLE_Plant *)
Maintenance and growth respiration (see Respiration)
lerr_t sleep()
Sleep (nothing to do)
Definition plamox.h:110
lvector_t< double > allocation_factor_roots
Allocation factor of daily assimilated carbon to root growth [-].
Definition plamox.h:424
PublishedField< double > carbon_plant_biomass_total_exported_from_field
Published field: carbon exported with harvest [kgC m-2].
Definition plamox.h:168
double PlaMox_get_nitrogen_deficiency(MoBiLE_Plant *)
Nitrogen deficiency factor of photosynthesis [-] (see Nitrogen deficiency)
Definition plamox.cpp:4680
EventHandlerCut m_eventcut
Cutting event handler.
Definition plamox.h:179
lerr_t PlaMox_reset_phenology(MoBiLE_Plant *)
Resets the phenological state of a plant.
Definition plamox.cpp:480
double photoperiod_min
Minimum day length of the site [h].
Definition plamox.h:347
LD_PlantFunctions m_pf
All kind of plant related functions.
Definition plamox.h:205
NitrogenFixation * plamox_nitrogen_fixation
Nitrogen fixation.
Definition plamox.h:191
lvector_t< double > fractional_cover
Density of seeded plants with regard to optimum (full area) seeding (-).
Definition plamox.h:440
lerr_t PlaMox_harvest()
Handles all pending harvest events.
Definition plamox.cpp:964
std::vector< MoBiLE_Plant * >::iterator PlaMoxIterator
Iterator over all plants whose family is handled by PlaMox (model option plantfamilies),...
Definition plamox.h:917
lerr_t PlaMox_step_out()
Post-time step: oxygen deficiency, soil nitrogen and published fields.
Definition plamox.cpp:318
double c_fruit_exported
Carbon exported with the fruit in the time step [kgC m-2].
Definition plamox.h:520
bool have_heat_stress
Consider heat stress yes/no.
Definition plamox.h:223
lvector_t< double > day_of_flowering
Days after emergence at flowering [d] (999 before flowering), per plant.
Definition plamox.h:509
std::vector< double > p_po4_sl_
Definition plamox.h:897
void PlaMox_transpiration(MoBiLE_Plant *)
Potential transpiration (see Transpiration)
Definition plamox.cpp:3806
lvector_t< double > spikelets_sterility
Spikelet sterility caused by oxygen deficiency [-].
Definition plamox.h:465
PhysiologyPlaMox(MoBiLE_State *, cbm::io_kcomm_t *, timemode_e)
Constructor.
Definition plamox-setting.cpp:56
void PlaMox_balance_check(int)
Carbon and nitrogen balance check (stage ON_ENTRY or ON_EXIT)
Definition plamox-setting.cpp:386
double PlaMox_get_frost_factor(MoBiLE_Plant *, double)
Low temperature factor [-] (see Low temperature factor)
Definition plamox.cpp:4371
double PlaMox_juvenile_specific_leaf_area(MoBiLE_Plant *, double)
Specific leaf area of crops during the temperature driven leaf expansion in the juvenile phase (see T...
Definition plamox.cpp:4226
lvector_t< double > n_plant
Total plant nitrogen including dead foliage and stems [kgN m-2].
Definition plamox.h:400
double n_total_exported
Nitrogen exported with harvest in the time step, including roots [kgN m-2].
Definition plamox.h:522
std::vector< double > influence_heat_daily
Daily heat impact on grain filling of the last 19 days [-], per plant (layout as daytime_temperatures...
Definition plamox.h:496
lerr_t PlaMox_event_harvest(MoBiLE_Plant *, EventAttributes const &)
Harvests a plant (see Harvest)
Definition plamox.cpp:1067
lvector_t< double > lai_min
Minimum leaf area index [m2 m-2]. For crops with GDD_AUTOTROPHY, it increases from the value at plant...
Definition plamox.h:432
PublishedField< double > nitrogen_plant_biomass_total_exported_from_field
Published field: nitrogen exported with harvest [kgN m-2].
Definition plamox.h:172
lvector_t< double > allocation_factor_leafs
Allocation factor of daily assimilated carbon to leaf growth [-].
Definition plamox.h:406
double n_fruit_exported
Nitrogen exported with the fruit in the time step [kgN m-2].
Definition plamox.h:524
lvector_t< unsigned int > root_q_vt_
Number of rooted soil layers [-], i.e., the index of the first soil layer without roots (invalid if t...
Definition plamox.h:479
void PlaMox_update_height(MoBiLE_Plant *)
Plant height and height of the canopy base (see Plant height)
PublishedField< double > carbon_plant_biomass_fruit_exported_from_field
Published field: carbon exported with the fruit [kgC m-2].
Definition plamox.h:170
std::vector< MoBiLE_Plant * > plamox_plants
Plants handled by PlaMox in the current time step (in the order of the vegetation); updated at the be...
Definition plamox.h:925
EventHandlerGraze m_eventgraze
Grazing event handler.
Definition plamox.h:177
lerr_t PlaMox_event_plant(MoBiLE_Plant *, EventAttributes const &)
Initializes a newly planted plant (see Planting)
Definition plamox.cpp:656
lvector_t< double > no3_sl
Soil nitrate (aerobic + anaerobic) available for uptake in the time step [kgN m-2].
Definition plamox.h:208
lerr_t PlaMox_planting()
Handles all pending planting events.
Definition plamox.cpp:533
lvector_t< double > hypoxia
Hypoxia index of the root system [-] (0: no stress, 1: no oxygen)
Definition plamox.h:290
void PlaMox_vernalization(MoBiLE_Plant *)
Chilling units and chill factor (see Vernalization)
Definition plamox.cpp:1753
void PlaMox_update_ground_cover(MoBiLE_Plant *)
Ground cover (see Ground cover)
lerr_t finalize()
Finalization (nothing to do)
Definition plamox.h:107
remotesensing::input_class_remotesensing_t const * rm_
Optional remote sensing input (leaf area index)
Definition plamox.h:135
input_class_setup_t const * m_setup
Setup input (e.g., canopy layers, latitude)
Definition plamox.h:125
cbm::string_t droughtstress_method
Drought stress method (option droughtstressmethod: rootweighted or uniform)
Definition plamox.h:228
void PlaMox_drought(MoBiLE_Plant *)
Drought stress index (see Drought stress)
Definition plamox.cpp:3767
lvector_t< std::string > location
Location of the plant for location-specific nitrogen supply.
Definition plamox.h:296
lvector_t< double > nh4_sl
Soil ammonium available for uptake in the time step [kgN m-2].
Definition plamox.h:210
static size_t const HEAT_SERIES_DAYS
Length of the heat-stress series around flowering [d].
Definition plamox.h:482
lvector_t< double > leaf_respiration_vt
Leaf dark respiration of the time step calculated by BerryBall (kgC m-2).
Definition plamox.h:446
lvector_t< double > gdd_grain_filling
Growing degree days at the onset of grain filling [°C d] (GDD_GRAIN_FILLING, delayed by drought for c...
Definition plamox.h:287
cbm::string_t::cbmstring_array_t plantfamilies
Plant families that are considered by PlaMox.
Definition plamox.h:270
lerr_t PlaMox_redistribution(MoBiLE_Plant *)
Retranslocation of stem and leaf mass to the fruit (see Retranslocation to the fruit)
Definition plamox.cpp:2516
lvector_t< double > lai_min_at_tillering
Minimum leaf area index at the end of the seedling phase (GDD_AUTOTROPHY) [m2 m-2].
Definition plamox.h:434
double n_at_planting
Nitrogen added with the initial biomass at planting in the time step [kgN m-2].
Definition plamox.h:362
lvector_t< unsigned int > family_flags
Species family flags of each plant (slot), see plamox_family_e; updated with the plant list.
Definition plamox.h:961
lerr_t PlaMox_bud_burst(MoBiLE_Plant *)
Translocation from storage to foliage of grass (see Bud burst of grass)
Definition plamox.cpp:2391
void PlaMox_update_plant_list()
Updates the list of plants handled by PlaMox and their family flags.
Definition plamox-setting.cpp:558
plamox_family_e
Species families with specific functions in PlaMox (bit flags)
Definition plamox.h:935
@ FAMILY_CORNS
family :corns:
Definition plamox.h:941
@ FAMILY_CASSAVA
family cassava
Definition plamox.h:949
@ FAMILY_WHEAT
family :wheat:
Definition plamox.h:939
@ FAMILY_BRASSICANAPUS
family :brassicanapus:
Definition plamox.h:943
@ FAMILY_SORG
family sorg
Definition plamox.h:947
@ FAMILY_RICE
family :rice:
Definition plamox.h:937
@ FAMILY_COFFEE
family coff (coffee, perennial evergreen crop)
Definition plamox.h:953
@ FAMILY_PERENNIAL
perennial life cycle (grass or families ment, alfa, coff)
Definition plamox.h:951
@ FAMILY_MILT
family milt
Definition plamox.h:945
substate_airchemistry_t & ac_
Air chemistry state (CO2 concentration)
Definition plamox.h:142
lerr_t PlaMox_nitrogen_fixation(MoBiLE_Plant *)
Symbiotic nitrogen fixation (see Nitrogen fixation)
substate_microclimate_t & mc_
Microclimate state (temperature, radiation, vapour pressure deficit)
Definition plamox.h:144
lvector_t< double > chill_units
Accumulated chilling units for vernalization;.
Definition plamox.h:452
lvector_t< int > days_after_emergence
Days after emergence [d] (-1 before emergence)
Definition plamox.h:293
SubscribedEvent< LD_EventHandlerQueue > m_HarvestEvents
Harvest events.
Definition plamox.h:154
lerr_t PlaMox_senescence(MoBiLE_Plant *)
Aboveground and belowground senescence (see Senescence)
double tot_n_
Nitrogen balance at the beginning of the time step [kgN m-2].
Definition plamox.h:353
lerr_t PlaMox_photosynthesis(MoBiLE_Plant *)
Photosynthesis and allocation of assimilates (see Photosynthesis and growth)
PublishedField< double > aboveground_biomass
Published field: aboveground biomass of all plants [kgDW m-2].
Definition plamox.h:159
bool PlaMox_is_family(MoBiLE_Plant const *_p, unsigned int _family) const
True if the plant belongs to the given family (see plamox_family_e)
Definition plamox.h:1007
std::vector< plamox_plant_id_t > plant_list_fingerprint
The vegetation that plamox_plants and family_flags were built from, see PlaMox_update_plant_list()
Definition plamox.h:984
std::vector< double > nup_scale_nh4_sl_
Nitrogen uptake of all plants from the same soil pools of the time step (pools at the beginning of th...
Definition plamox.h:259
MoBiLE_PlantVegetation * m_veg
Vegetation (all plants)
Definition plamox.h:138
void PlaMox_phosphorus_mark(int)
phosphorus bookkeeping at three stages of the time step: P_MARK_PRE_UPTAKE (before nitrogen uptake: s...
Definition plamox-phosphorus.cpp:148
bool have_mix_cover
Mixed stands (option mixcover, default on): area-related bounds of a plant (minimum seed mass,...
Definition plamox.h:251
double photoperiod_max
Maximum day length of the site [h].
Definition plamox.h:349
lvector_t< int > yearly_cuts
Number of cutting events in the current year.
Definition plamox.h:377
cbm::io_kcomm_t * io_kcomm
Input/output communicator.
Definition plamox.h:119
lvector_t< double > gdd_juvenile
Growing degree days at the last update of lai_juvenile [oC].
Definition plamox.h:309
Spatially explicit groundwater model.
Definition airchemistryput.h:21
cbm::logger_t * PhysiologyPlaMoxLogger
Logger of PlaMox.
Definition plamox-setting.cpp:31
Interface of the fine root system of a plant: rooting depth, distribution of fine root mass and lengt...
Definition ld_rootsystem.h:34
Fingerprint of one plant, enough to tell whether its family flags can be reused: the object itself,...
Definition plamox.h:973