14#ifndef LM_PHYSIOLOGY_PLAMOX_H_
15#define LM_PHYSIOLOGY_PLAMOX_H_
17#include "mbe_legacymodel.h"
18#include "state/mbe_state.h"
21#include <input/remotesensing/remotesensing.h>
23#include "physiology/ld_plantfunctions.h"
24#include "physiology/ld_rootsystem.h"
25#include "physiology/ld_nitrogenfixation.h"
26#include "physiology/ld_transpiration.h"
27#include "physiology/ld_vernalization.h"
28#include "watercycle/ld_droughtstress.h"
29#include "physiology/ld_stomatalconductance.h"
30#include "physiology/photofarquhar/berryball.h"
32#include "eventhandler/graze/graze.h"
33#include "eventhandler/cut/cut.h"
49class NitrogenFixation;
91 lerr_t configure( ldndc::config_file_t
const *);
92 lerr_t register_ports( cbm::io_kcomm_t *);
96 lerr_t unregister_ports( cbm::io_kcomm_t *);
101 lerr_t
sleep() {
return LDNDC_ERR_OK; }
103 lerr_t
wake() {
return LDNDC_ERR_OK; }
114 input_class_climate_t
const &
cl_;
118 input_class_soillayers_t
const &
sl_;
126 remotesensing::input_class_remotesensing_t
const *
rm_;
133 substate_airchemistry_t &
ac_;
135 substate_microclimate_t &
mc_;
137 substate_physiology_t &
ph_;
139 substate_soilchemistry_t &
sc_;
141 substate_watercycle_t &
wc_;
843 {
return ( this->family_flags[_p->slot] & _family) != 0; }
846 PlaMoxIterator begin();
849 PlaMoxIterator end();
857 PlaMox_get_life_cycle( MoBiLE_Plant *);
Vegetation model PlaMox: carbon and nitrogen dynamics of crops and grass (see PlaMox - Plant Growth M...
Definition plamox.h:60
lvector_t< bool > reset_phenology
Phenology of a perennial plant is reset as soon as MOS > 0.99.
Definition plamox.h:324
void PlaMox_nitrogen_uptake(MoBiLE_Plant *)
Nitrogen uptake from the soil (see Nitrogen uptake)
lvector_t< double > dw_fol_old
Foliage mass at the beginning of the time step [kgDW m-2].
Definition plamox.h:257
lerr_t PLAMOX_CHECK_FOR_NEGATIVE_VALUE(char const *)
Debugging helper: checks the plant states for negative values or NaN.
Definition plamox-setting.cpp:371
input_class_species_t const * m_species
Species input.
Definition plamox.h:120
MoBiLE_State * m_state
Model state.
Definition plamox.h:108
PublishedField< double > dEmerg
Published field: sum of the days of emergence of all plants.
Definition plamox.h:156
double PlaMox_get_foliage_nitrogen_concentration(MoBiLE_Plant *)
Optimum foliage nitrogen concentration [kgN kgDW-1] (see Optimum foliage nitrogen concentration)
Definition plamox.cpp:4072
bool have_automatic_nitrogen
Potential nitrogen mode (option npot): demand not covered by uptake is supplied directly.
Definition plamox.h:276
lvector_t< double > allocation_factor_stems
Allocation factor of daily assimilated carbon to stem growth [-].
Definition plamox.h:342
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:266
double influence_heat_reduction_grainfilling
Heat factor for grain filling (minimum of the daily heat impact) [-].
Definition plamox.h:422
lvector_t< long long int > seconds_crop_planting
Time of planting [s].
Definition plamox.h:239
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:3913
std::vector< std::string > plantfamily_tags
Family tags (":family:") of the plant families handled by PlaMox.
Definition plamox.h:800
lvector_t< double > dw_retranslocation_foliage
Foliage mass available for retranslocation to the fruit [kgDW m-2].
Definition plamox.h:255
lerr_t PlaMox_step_init()
pre-run initialization each time step
Definition plamox.cpp:177
lvector_t< double > allocation_factor_fruit
Allocation factor of daily assimilated carbon to fruit growth [-].
Definition plamox.h:348
void PlaMox_update_specific_leaf_area(MoBiLE_Plant *)
Specific leaf area of the foliage layers (see Specific leaf area)
Definition plamox.cpp:3520
double automatic_nitrogen_uptake
Nitrogen supplied in the potential nitrogen mode in the time step [kgN m-2].
Definition plamox.h:282
double PlaMox_get_age_factor(MoBiLE_Plant *)
Age factor [-] (see Age factor)
lerr_t PlaMox_abscission(MoBiLE_Plant *)
Shedding of dead foliage and stems of grass (see Abscission of grass)
Definition plamox.cpp:3091
substate_soilchemistry_t & sc_
Soil chemistry state (nitrogen, carbon, litter, oxygen)
Definition plamox.h:139
input_class_soillayers_t const & sl_
Soil layers input.
Definition plamox.h:118
BerryBall plamox_berryball
Photosynthesis.
Definition plamox.h:176
double PlaMox_n_opt(MoBiLE_Plant *)
Optimum nitrogen of the living plant [kgN m-2] (see Optimum plant nitrogen)
Definition plamox.cpp:3601
lerr_t wake()
Wake up (nothing to do)
Definition plamox.h:103
double PlaMox_get_biomass_induced_downregulation(MoBiLE_Plant *)
Biomass-induced down-regulation of photosynthesis [-] (see Biomass-induced down-regulation)
Definition plamox.cpp:3992
lvector_t< double > transplanting_shock_vt
Transplanting shock [-] (1 at transplanting, decreasing by 0.1 per day)
Definition plamox.h:312
ldndc::growable_array< BaseRootSystemDNDC *, 1000, 1 > plamox_root_system
Root system.
Definition plamox.h:190
lerr_t PlaMox_management()
Applies grazing and cutting events.
Definition plamox.cpp:1283
lvector_t< double > lai_dynamic
Leaf area index used with remote sensing input [m2 m-2].
Definition plamox.h:259
substate_watercycle_t & wc_
Water cycle state (soil water, ice, transpiration)
Definition plamox.h:141
double tot_c_
Carbon balance at the beginning of the time step [kgC m-2].
Definition plamox.h:292
substate_physiology_t & ph_
Physiology state (canopy layers, nitrogen uptake, exports)
Definition plamox.h:137
lvector_t< double > nc_fol_opt
Reference foliage nitrogen concentration of the nitrogen deficiency factor [kgN kgDW-1].
Definition plamox.h:396
double const FTS_TOT_
Time resolution factor: .
Definition plamox.h:232
double day_of_flowering
Days after emergence at flowering [d] (999 before flowering; shared by all plants)
Definition plamox.h:430
PublishedField< double > maturity_status
Published field: sum of the development stages of all plants [-].
Definition plamox.h:152
PublishedField< double > growing_degree_days_maturity
Published field: sum of the growing degree days of all plants [°C d].
Definition plamox.h:154
double timestep_c_assi
Carbon assimilated (and added at planting) in the time step [kgC m-2].
Definition plamox.h:297
plant_life_cycle_e
Life cycle of a plant.
Definition plamox.h:66
@ BIENNIAL
Biennial plant (currently not used)
Definition plamox.h:70
@ PERENNIAL
Perennial plant.
Definition plamox.h:74
@ ANNUAL
Annual plant.
Definition plamox.h:68
@ PLURIENNIAL
Pluriennial plant (currently not used)
Definition plamox.h:72
SubscribedEvent< LD_EventHandlerQueue > m_PlantEvents
Planting events.
Definition plamox.h:147
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:3803
double c_total_exported
Carbon exported with harvest in the time step, including roots [kgC m-2].
Definition plamox.h:450
input_class_siteparameters_t const * m_siteparameters
Site parameters input.
Definition plamox.h:124
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:165
lerr_t PlaMox_step_resize()
resize plant species vector
Definition plamox-setting.cpp:413
input_class_speciesparameters_t const * m_speciesparameters
Species parameters input.
Definition plamox.h:122
lvector_t< double > dw_retranslocation_stem
Stem mass available for retranslocation to the fruit [kgDW m-2].
Definition plamox.h:253
void PlaMox_exsudation(MoBiLE_Plant *)
Root exudation (see Root exudation)
Definition plamox.cpp:2752
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:383
lvector_t< double > influence_heat_daily
Daily heat impact on grain filling of the last 19 days [-].
Definition plamox.h:416
lerr_t PlaMox_allocation_grass(MoBiLE_Plant *)
Allocation fractions of grass (see Grass)
lvector_t< double > daytime_temperatures
Daytime temperatures of the last 19 days around flowering [°C] (shared by all plants)
Definition plamox.h:410
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:3633
bool have_drought_stress
Consider drought stress yes/no.
Definition plamox.h:209
double PlaMox_get_hypoxia_factor(MoBiLE_Plant *)
Photosynthesis factor for oxygen deficiency [-] (see Oxygen deficiency (hypoxia))
Definition plamox.cpp:3756
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:203
input_class_climate_t const & cl_
Climate input.
Definition plamox.h:114
void PlaMox_update_foliage_structure(MoBiLE_Plant *)
Foliage distribution and leaf area index of the foliage layers (see Leaf area)
Definition plamox.cpp:3432
void PlaMox_respiration(MoBiLE_Plant *)
Maintenance and growth respiration (see Respiration)
lerr_t sleep()
Sleep (nothing to do)
Definition plamox.h:101
lvector_t< double > allocation_factor_roots
Allocation factor of daily assimilated carbon to root growth [-].
Definition plamox.h:354
PublishedField< double > carbon_plant_biomass_total_exported_from_field
Published field: carbon exported with harvest [kgC m-2].
Definition plamox.h:159
double PlaMox_get_nitrogen_deficiency(MoBiLE_Plant *)
Nitrogen deficiency factor of photosynthesis [-] (see Nitrogen deficiency)
Definition plamox.cpp:3951
EventHandlerCut m_eventcut
Cutting event handler.
Definition plamox.h:170
lerr_t PlaMox_reset_phenology(MoBiLE_Plant *)
Resets the phenological state of a plant.
Definition plamox.cpp:387
double photoperiod_min
Minimum day length of the site [h].
Definition plamox.h:288
LD_PlantFunctions m_pf
All kind of plant related functions.
Definition plamox.h:196
NitrogenFixation * plamox_nitrogen_fixation
Nitrogen fixation.
Definition plamox.h:182
lvector_t< double > fractional_cover
Density of seeded plants with regard to optimum (full area) seeding (-).
Definition plamox.h:370
lerr_t PlaMox_harvest()
Handles all pending harvest events.
Definition plamox.cpp:820
std::vector< MoBiLE_Plant * >::iterator PlaMoxIterator
Iterator over all plants whose family is handled by PlaMox (model option plantfamilies),...
Definition plamox.h:786
lerr_t PlaMox_step_out()
Post-time step: oxygen deficiency, soil nitrogen and published fields.
Definition plamox.cpp:268
double c_fruit_exported
Carbon exported with the fruit in the time step [kgC m-2].
Definition plamox.h:452
bool have_heat_stress
Consider heat stress yes/no.
Definition plamox.h:214
void PlaMox_transpiration(MoBiLE_Plant *)
Potential transpiration (see Transpiration)
Definition plamox.cpp:3210
lvector_t< double > spikelets_sterility
Spikelet sterility caused by oxygen deficiency [-].
Definition plamox.h:389
PhysiologyPlaMox(MoBiLE_State *, cbm::io_kcomm_t *, timemode_e)
Constructor.
Definition plamox-setting.cpp:43
void PlaMox_balance_check(int)
Carbon and nitrogen balance check (stage ON_ENTRY or ON_EXIT)
Definition plamox-setting.cpp:315
double PlaMox_get_frost_factor(MoBiLE_Plant *, double)
Low temperature factor [-] (see Low temperature factor)
Definition plamox.cpp:3689
lvector_t< double > n_plant
Total plant nitrogen including dead foliage and stems [kgN m-2].
Definition plamox.h:330
double n_total_exported
Nitrogen exported with harvest in the time step, including roots [kgN m-2].
Definition plamox.h:454
lerr_t PlaMox_event_harvest(MoBiLE_Plant *, EventAttributes const &)
Harvests a plant (see Harvest)
Definition plamox.cpp:923
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:362
PublishedField< double > nitrogen_plant_biomass_total_exported_from_field
Published field: nitrogen exported with harvest [kgN m-2].
Definition plamox.h:163
lvector_t< double > allocation_factor_leafs
Allocation factor of daily assimilated carbon to leaf growth [-].
Definition plamox.h:336
double Tzero
Temperature of zero fruit set [°C].
Definition plamox.h:447
double n_fruit_exported
Nitrogen exported with the fruit in the time step [kgN m-2].
Definition plamox.h:456
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:403
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:161
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:794
EventHandlerGraze m_eventgraze
Grazing event handler.
Definition plamox.h:168
lerr_t PlaMox_event_plant(MoBiLE_Plant *, EventAttributes const &)
Initializes a newly planted plant (see Planting)
Definition plamox.cpp:547
lvector_t< double > no3_sl
Soil nitrate (aerobic + anaerobic) available for uptake in the time step [kgN m-2].
Definition plamox.h:199
lerr_t PlaMox_planting()
Handles all pending planting events.
Definition plamox.cpp:424
lvector_t< double > hypoxia
Hypoxia index of the root system [-] (0: no stress, 1: no oxygen)
Definition plamox.h:245
void PlaMox_vernalization(MoBiLE_Plant *)
Chilling units and chill factor (see Vernalization)
Definition plamox.cpp:1534
void PlaMox_update_ground_cover(MoBiLE_Plant *)
Ground cover (see Ground cover)
lerr_t finalize()
Finalization (nothing to do)
Definition plamox.h:98
remotesensing::input_class_remotesensing_t const * rm_
Optional remote sensing input (leaf area index)
Definition plamox.h:126
input_class_setup_t const * m_setup
Setup input (e.g., canopy layers, latitude)
Definition plamox.h:116
cbm::string_t droughtstress_method
Drought stress method (option droughtstressmethod: rootweighted or uniform)
Definition plamox.h:219
void PlaMox_drought(MoBiLE_Plant *)
Drought stress index (see Drought stress)
Definition plamox.cpp:3171
lvector_t< std::string > location
Location of the plant for location-specific nitrogen supply.
Definition plamox.h:251
lvector_t< double > nh4_sl
Soil ammonium available for uptake in the time step [kgN m-2].
Definition plamox.h:201
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:242
cbm::string_t::cbmstring_array_t plantfamilies
Plant families that are considered by PlaMox.
Definition plamox.h:225
lerr_t PlaMox_redistribution(MoBiLE_Plant *)
Retranslocation of stem and leaf mass to the fruit (see Retranslocation to the fruit)
Definition plamox.cpp:2138
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:364
double Tcrit
Critical temperature above which heat reduces the fruit set [°C] (depends on timing and duration of t...
Definition plamox.h:442
double n_at_planting
Nitrogen added with the initial biomass at planting in the time step [kgN m-2].
Definition plamox.h:303
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:828
lerr_t PlaMox_bud_burst(MoBiLE_Plant *)
Translocation from storage to foliage of grass (see Bud burst of grass)
Definition plamox.cpp:2101
void PlaMox_update_plant_list()
Updates the list of plants handled by PlaMox and their family flags.
Definition plamox-setting.cpp:470
plamox_family_e
Species families with specific functions in PlaMox (bit flags)
Definition plamox.h:804
@ FAMILY_CORNS
family :corns:
Definition plamox.h:810
@ FAMILY_CASSAVA
family cassava
Definition plamox.h:818
@ FAMILY_WHEAT
family :wheat:
Definition plamox.h:808
@ FAMILY_BRASSICANAPUS
family :brassicanapus:
Definition plamox.h:812
@ FAMILY_SORG
family sorg
Definition plamox.h:816
@ FAMILY_RICE
family :rice:
Definition plamox.h:806
@ FAMILY_PERENNIAL
perennial life cycle (grass or families ment, alfa)
Definition plamox.h:820
@ FAMILY_MILT
family milt
Definition plamox.h:814
substate_airchemistry_t & ac_
Air chemistry state (CO2 concentration)
Definition plamox.h:133
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:135
lvector_t< double > chill_units
Accumulated chilling units for vernalization;.
Definition plamox.h:376
lvector_t< int > days_after_emergence
Days after emergence [d] (-1 before emergence)
Definition plamox.h:248
SubscribedEvent< LD_EventHandlerQueue > m_HarvestEvents
Harvest events.
Definition plamox.h:145
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:294
lerr_t PlaMox_photosynthesis(MoBiLE_Plant *)
Photosynthesis and allocation of assimilates (see Photosynthesis and growth)
Definition plamox.cpp:2231
PublishedField< double > aboveground_biomass
Published field: aboveground biomass of all plants [kgDW m-2].
Definition plamox.h:150
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:842
MoBiLE_PlantVegetation * m_veg
Vegetation (all plants)
Definition plamox.h:129
double photoperiod_max
Maximum day length of the site [h].
Definition plamox.h:290
lvector_t< int > yearly_cuts
Number of cutting events in the current year.
Definition plamox.h:318
cbm::io_kcomm_t * io_kcomm
Input/output communicator.
Definition plamox.h:110
Spatially explicit groundwater model.
Definition airchemistryput.h:15
cbm::logger_t * PhysiologyPlaMoxLogger
Logger of PlaMox.
Definition plamox-setting.cpp:26
Interface of the fine root system of a plant: rooting depth, distribution of fine root mass and lengt...
Definition ld_rootsystem.h:29