Reference guide#
This manual details, for each module of openalea.cnwheat,
the functions and objects included in openalea.cnwheat,
describing what they are and what they do.
openalea.cnwheat package#
openalea.cnwheat.simulation module#
- class openalea.cnwheat.simulation.Simulation(respiration_model, delta_t=1, culm_density=None, interpolate_forcings=False, senescence_forcings_delta_t=None, photosynthesis_forcings_delta_t=None)[source]#
Bases:
objectThe Simulation class permits to initialize and run the model.
User should use method
initialize()to initialize the model, and methodrun()to run the model.- Parameters:
respiration_model (class) –
the model of respiration to use. This model must define a class implementing these functions:
- R_phloem(sucrose_loading, sucrose, mstruct): Phloem loading respiration
R_Nnit_red(s_amino_acids, sucrose, mstruct, root=False): Nitrate reduction-linked respiration Distinction is made between nitrate realised in roots or in shoots where a part of the energy required is derived from ATP and reducing power obtained directly from photosynthesis (rather than C substrate)
- Parameters:
s_amino_acids (
float) - consumption of N for the synthesis of amino acids (µmol` N g-1 mstruct) (in the present version, this is used to approximate nitrate reduction needed in the original model of Thornley and Cannell, 2000)sucrose (
float) - amount of C sucrose in organ (µmol` C)mstruct (
float) - structural dry mass of organ (g)root (
bool) - specifies if the nitrate reduction-linked respiration is computed for shoot (False) or root (True) tissues.
Returns: _R_Nnit_upt (µmol` C respired)
Returns Type:
float
- R_residual(sucrose, mstruct, Ntot, delta_t, Ts): Residual maintenance respiration (cost from protein turn-over, cell ion gradients, futile cycles…)
- R_grain_growth(mstruct_growth, starch_filling, mstruct): Grain growth respiration
Returns: R_grain_growth (µmol` C respired)
Returns Type:
float
delta_t (int) – the delta t of the simulation (in seconds) ; default is 1.
interpolate_forcings (bool) – if True: interpolate senescence and photosynthesis forcings from values of senescence_forcings_delta_t`and `senescence_forcings_delta_t. Default is False (do not interpolate the forcings).
senescence_forcings_delta_t (int) –
- the delta t of the senescence forcings (in seconds) ; default is None.
If the user sets interpolate_forcings to True, then he/she must also set senescence_forcings_delta_t to an integer value greater or equal to delta_t. For example, if interpolate_forcings is True and delta_t==3600, then senescence_forcings_delta_t must be greater or equal to 3600, that is for example 7200.
- param int photosynthesis_forcings_delta_t:
- the delta t of the photosynthesis forcings (in seconds) ; default is None.
If the user sets interpolate_forcings to True, then he/she must also set photosynthesis_forcings_delta_t to an integer value greater or equal to delta_t. For example, if interpolate_forcings is True and delta_t==3600, then photosynthesis_forcings_delta_t must be greater or equal to 3600, that is for example 7200.
interpolate_forcings (
bool) - if True: interpolate senescence and photosynthesis forcings from values of senescence_forcings_delta_t and senescence_forcings_delta_t. Default is False (do not interpolate the forcings).senescence_forcings_delta_t (
int) - the delta t of the senescence forcings (in seconds) ; default is None. If the user sets interpolate_forcings to True, then he/she must also set senescence_forcings_delta_t to an integer value greater or equal to delta_t. For example, if interpolate_forcings is True and delta_t==3600, then senescence_forcings_delta_t must be greater or equal to 3600, that is for example 7200.photosynthesis_forcings_delta_t (
int) - the delta t of the photosynthesis forcings (in seconds) ; default is None. If the user sets interpolate_forcings to True, then he/she must also set photosynthesis_forcings_delta_t to an integer value greater or equal to delta_t. For example, if interpolate_forcings is True and delta_t==3600, then photosynthesis_forcings_delta_t must be greater or equal to 3600, that is for example 7200.
- ALL_STATE_PARAMETERS = {<class 'openalea.cnwheat.model.Axis'>: ['mstruct', 'senesced_mstruct'], <class 'openalea.cnwheat.model.HiddenZone'>: ['Nstruct', 'mstruct', 'ratio_DZ'], <class 'openalea.cnwheat.model.Organ'>: ['mstruct', 'Nstruct', 'senesced_mstruct'], <class 'openalea.cnwheat.model.PhotosyntheticOrganElement'>: ['Ag', 'Nstruct', 'Tr', 'Ts', 'green_area', 'is_growing', 'mstruct', 'senesced_mstruct'], <class 'openalea.cnwheat.model.Phytomer'>: ['mstruct'], <class 'openalea.cnwheat.model.Plant'>: ['Tair'], <class 'openalea.cnwheat.model.Soil'>: ['Tsoil', 'volume']}#
a dictionary of all the variables which define the state of the modeled system, for each scale
- AXES_FLUXES = []#
the fluxes exchanged between the compartments at axis scale
- AXES_INDEXES = ['plant', 'axis']#
the indexes to locate the axes in the modeled system
- AXES_INTEGRATIVE_VARIABLES = ['Total_Transpiration']#
the variables computed by integrating values of axis components parameters/variables recursively
- AXES_INTERMEDIATE_VARIABLES = []#
the variables that we need to compute in order to compute fluxes and/or compartments values at axis scale
- AXES_RUN_VARIABLES = ['mstruct', 'senesced_mstruct', 'C_exudated', 'sum_respi_shoot', 'sum_respi_roots', 'Total_Transpiration']#
all the variables computed during a run step of the simulation at axis scale
- AXES_STATE = ['mstruct', 'senesced_mstruct', 'C_exudated', 'sum_respi_shoot', 'sum_respi_roots']#
the variables which define the state of the modeled system at axis scale, formed be the concatenation of
AXES_STATE_PARAMETERSand the names of the compartments associated to each axis (seeMODEL_COMPARTMENTS_NAMES)
- AXES_STATE_PARAMETERS = ['mstruct', 'senesced_mstruct']#
the parameters which define the state of the modeled system at axis scale
- AXES_T_INDEXES = ['t', 'plant', 'axis']#
concatenation of
T_INDEXandAXES_INDEXES
- ELEMENTS_FLUXES = ['Amino_Acids_import', 'D_Fructan', 'D_Proteins', 'D_Starch', 'D_cytokinins', 'Loading_Amino_Acids', 'Loading_Sucrose', 'Nitrates_import', 'Regul_S_Fructan', 'S_Fructan', 'S_Starch', 'S_Sucrose', 'S_Amino_Acids', 'S_Proteins', 'cytokinins_import']#
the fluxes exchanged between the compartments at element scale
- ELEMENTS_FORCINGS = ('Ag', 'Tr', 'Ts', 'Nstruct', 'green_area', 'mstruct')#
the names of the elements photosynthesis and scenescence forcings
- ELEMENTS_INDEXES = ['plant', 'axis', 'metamer', 'organ', 'element']#
the indexes to locate the elements in the modeled system
- ELEMENTS_INTEGRATIVE_VARIABLES = ['Total_Organic_Nitrogen']#
the variables computed by integrating values of element components parameters/variables recursively
- ELEMENTS_INTERMEDIATE_VARIABLES = ['Photosynthesis', 'R_Nnit_red', 'R_phloem_loading', 'R_residual', 'Transpiration', 'sum_respi', 'nb_replications']#
the variables that we need to compute in order to compute fluxes and/or compartments values at element scale
- ELEMENTS_PHOTOSYNTHESIS_FORCINGS = ('Ag', 'Tr', 'Ts')#
the names of the elements photosynthesis forcings
- ELEMENTS_RUN_VARIABLES = ['Ag', 'Nstruct', 'Tr', 'Ts', 'green_area', 'is_growing', 'mstruct', 'senesced_mstruct', 'amino_acids', 'cytokinins', 'fructan', 'nitrates', 'proteins', 'starch', 'sucrose', 'triosesP', 'Photosynthesis', 'R_Nnit_red', 'R_phloem_loading', 'R_residual', 'Transpiration', 'sum_respi', 'nb_replications', 'Amino_Acids_import', 'D_Fructan', 'D_Proteins', 'D_Starch', 'D_cytokinins', 'Loading_Amino_Acids', 'Loading_Sucrose', 'Nitrates_import', 'Regul_S_Fructan', 'S_Fructan', 'S_Starch', 'S_Sucrose', 'S_Amino_Acids', 'S_Proteins', 'cytokinins_import', 'Total_Organic_Nitrogen']#
all the variables computed during a run step of the simulation at element scale
- ELEMENTS_SENESCENCE_FORCINGS = ('Nstruct', 'green_area', 'mstruct')#
the names of the elements scenescence forcings
- ELEMENTS_STATE = ['Ag', 'Nstruct', 'Tr', 'Ts', 'green_area', 'is_growing', 'mstruct', 'senesced_mstruct', 'amino_acids', 'cytokinins', 'fructan', 'nitrates', 'proteins', 'starch', 'sucrose', 'triosesP']#
the variables which define the state of the modeled system at element scale, formed be the concatenation of
ELEMENTS_STATE_PARAMETERSand the names of the compartments associated to each element (seeMODEL_COMPARTMENTS_NAMES)
- ELEMENTS_STATE_PARAMETERS = ['Ag', 'Nstruct', 'Tr', 'Ts', 'green_area', 'is_growing', 'mstruct', 'senesced_mstruct']#
the parameters which define the state of the modeled system at element scale
- ELEMENTS_T_INDEXES = ['t', 'plant', 'axis', 'metamer', 'organ', 'element']#
concatenation of
T_INDEXandELEMENTS_INDEXES
- HIDDENZONE_FLUXES = ['D_Fructan', 'D_Proteins', 'S_Fructan', 'S_Proteins', 'Unloading_Amino_Acids', 'Unloading_Sucrose']#
the fluxes exchanged between the compartments at hidden zone scale
- HIDDENZONE_INDEXES = ['plant', 'axis', 'metamer']#
the indexes to locate the hidden zones in the modeled system
- HIDDENZONE_INTEGRATIVE_VARIABLES = []#
the variables computed by integrating values of hidden zone components parameters/variables recursively
- HIDDENZONE_INTERMEDIATE_VARIABLES = ['nb_replications']#
the variables that we need to compute in order to compute fluxes and/or compartments values at hidden zone scale
- HIDDENZONE_RUN_VARIABLES = ['Nstruct', 'mstruct', 'ratio_DZ', 'amino_acids', 'fructan', 'proteins', 'sucrose', 'nb_replications', 'D_Fructan', 'D_Proteins', 'S_Fructan', 'S_Proteins', 'Unloading_Amino_Acids', 'Unloading_Sucrose']#
all the variables computed during a run step of the simulation at plnat scale
- HIDDENZONE_STATE = ['Nstruct', 'mstruct', 'ratio_DZ', 'amino_acids', 'fructan', 'proteins', 'sucrose']#
the variables which define the state of the modeled system at hidden zone scale, formed be the concatenation of
HIDDENZONE_STATE_PARAMETERSand the names of the compartments associated to each hidden zone (seeMODEL_COMPARTMENTS_NAMES)
- HIDDENZONE_STATE_PARAMETERS = ['Nstruct', 'mstruct', 'ratio_DZ']#
the parameters which define the state of the modeled system at hidden zone scale
- HIDDENZONE_T_INDEXES = ['t', 'plant', 'axis', 'metamer']#
concatenation of
T_INDEXandHIDDENZONE_INDEXES
- LOGGERS_NAMES = {'compartments': {<class 'openalea.cnwheat.model.Axis'>: 'cnwheat.compartments.axes', <class 'openalea.cnwheat.model.HiddenZone'>: 'cnwheat.compartments.hiddenzones', <class 'openalea.cnwheat.model.Organ'>: 'cnwheat.compartments.organs', <class 'openalea.cnwheat.model.PhotosyntheticOrganElement'>: 'cnwheat.compartments.elements', <class 'openalea.cnwheat.model.Phytomer'>: 'cnwheat.compartments.phytomers', <class 'openalea.cnwheat.model.Plant'>: 'cnwheat.compartments.plants', <class 'openalea.cnwheat.model.Soil'>: 'cnwheat.compartments.soils'}, 'derivatives': {<class 'openalea.cnwheat.model.Axis'>: 'cnwheat.derivatives.axes', <class 'openalea.cnwheat.model.HiddenZone'>: 'cnwheat.derivatives.hiddenzones', <class 'openalea.cnwheat.model.Organ'>: 'cnwheat.derivatives.organs', <class 'openalea.cnwheat.model.PhotosyntheticOrganElement'>: 'cnwheat.derivatives.elements', <class 'openalea.cnwheat.model.Phytomer'>: 'cnwheat.derivatives.phytomers', <class 'openalea.cnwheat.model.Plant'>: 'cnwheat.derivatives.plants', <class 'openalea.cnwheat.model.Soil'>: 'cnwheat.derivatives.soils'}}#
the name of the loggers for compartments and derivatives
- MODEL_COMPARTMENTS_NAMES = {<class 'openalea.cnwheat.model.Axis'>: ['C_exudated', 'sum_respi_shoot', 'sum_respi_roots'], <class 'openalea.cnwheat.model.HiddenZone'>: ['amino_acids', 'fructan', 'proteins', 'sucrose'], <class 'openalea.cnwheat.model.Organ'>: ['age_from_flowering', 'amino_acids', 'cytokinins', 'nitrates', 'proteins', 'starch', 'structure', 'sucrose'], <class 'openalea.cnwheat.model.PhotosyntheticOrganElement'>: ['amino_acids', 'cytokinins', 'fructan', 'nitrates', 'proteins', 'starch', 'sucrose', 'triosesP'], <class 'openalea.cnwheat.model.Phytomer'>: [], <class 'openalea.cnwheat.model.Plant'>: [], <class 'openalea.cnwheat.model.Soil'>: ['nitrates']}#
the name of the compartments attributes in the model, for objects of types
model.Plant,model.Axis,model.Phytomer,model.Organ,model.HiddenZone,model.PhotosyntheticOrganElement, andmodel.Soil.
- ORGANS_FLUXES = ['Export_Amino_Acids', 'Export_Nitrates', 'Export_cytokinins', 'S_Amino_Acids', 'S_cytokinins', 'S_grain_starch', 'S_grain_structure', 'S_Proteins', 'Unloading_Amino_Acids', 'Unloading_Sucrose', 'Uptake_Nitrates']#
the fluxes exchanged between the compartments at organ scale
- ORGANS_INDEXES = ['plant', 'axis', 'organ']#
the indexes to locate the organs in the modeled system
- ORGANS_INTEGRATIVE_VARIABLES = ['Total_Organic_Nitrogen']#
the variables computed by integrating values of organ components parameters/variables recursively
- ORGANS_INTERMEDIATE_VARIABLES = ['C_exudation', 'HATS_LATS', 'N_exudation', 'RGR_Structure', 'R_Nnit_red', 'R_Nnit_upt', 'Respi_growth', 'R_grain_growth_starch', 'R_grain_growth_struct', 'R_residual', 'regul_transpiration', 'sum_respi']#
the variables that we need to compute in order to compute fluxes and/or compartments values at organ scale
- ORGANS_RUN_VARIABLES = ['mstruct', 'Nstruct', 'senesced_mstruct', 'age_from_flowering', 'amino_acids', 'cytokinins', 'nitrates', 'proteins', 'starch', 'structure', 'sucrose', 'C_exudation', 'HATS_LATS', 'N_exudation', 'RGR_Structure', 'R_Nnit_red', 'R_Nnit_upt', 'Respi_growth', 'R_grain_growth_starch', 'R_grain_growth_struct', 'R_residual', 'regul_transpiration', 'sum_respi', 'Export_Amino_Acids', 'Export_Nitrates', 'Export_cytokinins', 'S_Amino_Acids', 'S_cytokinins', 'S_grain_starch', 'S_grain_structure', 'S_Proteins', 'Unloading_Amino_Acids', 'Unloading_Sucrose', 'Uptake_Nitrates', 'Total_Organic_Nitrogen']#
all the variables computed during a run step of the simulation at organ scale
- ORGANS_STATE = ['mstruct', 'Nstruct', 'senesced_mstruct', 'age_from_flowering', 'amino_acids', 'cytokinins', 'nitrates', 'proteins', 'starch', 'structure', 'sucrose']#
the variables which define the state of the modeled system at organ scale, formed be the concatenation of
ORGANS_STATE_PARAMETERSand the names of the compartments associated to each organ (seeMODEL_COMPARTMENTS_NAMES)
- ORGANS_STATE_PARAMETERS = ['mstruct', 'Nstruct', 'senesced_mstruct']#
the parameters which define the state of the modeled system at organ scale
- ORGANS_T_INDEXES = ['t', 'plant', 'axis', 'organ']#
concatenation of
T_INDEXandORGANS_INDEXES
- PHYTOMERS_FLUXES = []#
the fluxes exchanged between the compartments at phytomer scale
- PHYTOMERS_INDEXES = ['plant', 'axis', 'metamer']#
the indexes to locate the phytomers in the modeled system
- PHYTOMERS_INTEGRATIVE_VARIABLES = []#
the variables computed by integrating values of phytomer components parameters/variables recursively
- PHYTOMERS_INTERMEDIATE_VARIABLES = []#
the variables that we need to compute in order to compute fluxes and/or compartments values at phytomer scale
- PHYTOMERS_RUN_VARIABLES = ['mstruct']#
all the variables computed during a run step of the simulation at phytomer scale
- PHYTOMERS_STATE = ['mstruct']#
the variables which define the state of the modeled system at phytomer scale, formed be the concatenation of
PHYTOMERS_STATE_PARAMETERSand the names of the compartments associated to each phytomer (seeMODEL_COMPARTMENTS_NAMES)
- PHYTOMERS_STATE_PARAMETERS = ['mstruct']#
the parameters which define the state of the modeled system at phytomer scale
- PHYTOMERS_T_INDEXES = ['t', 'plant', 'axis', 'metamer']#
concatenation of
T_INDEXandPHYTOMERS_INDEXES
- PLANTS_FLUXES = []#
the fluxes exchanged between the compartments at plant scale
- PLANTS_INDEXES = ['plant']#
the index to locate the plants in the modeled system
- PLANTS_INTEGRATIVE_VARIABLES = []#
the variables computed by integrating values of plant components parameters/variables recursively
- PLANTS_INTERMEDIATE_VARIABLES = []#
the variables that we need to compute in order to compute fluxes and/or compartments values at plant scale
- PLANTS_RUN_VARIABLES = ['Tair']#
all the variables computed during a run step of the simulation at plant scale
- PLANTS_STATE = ['Tair']#
the variables which define the state of the modeled system at plant scale, formed be the concatenation of
PLANTS_STATE_PARAMETERSand the names of the compartments associated to each plant (seeMODEL_COMPARTMENTS_NAMES)
- PLANTS_STATE_PARAMETERS = ['Tair']#
the parameters which define the state of the modeled system at plant scale
- PLANTS_T_INDEXES = ['t', 'plant']#
concatenation of
T_INDEXandPLANTS_INDEXES
- ROOTS_FORCINGS = ('Nstruct', 'mstruct')#
the names of the roots (scenescence) forcings
- SOILS_FLUXES = []#
the fluxes exchanged between the compartments at soil scale
- SOILS_INDEXES = ['plant', 'axis']#
the indexes to locate the soils in the modeled system
- SOILS_INTEGRATIVE_VARIABLES = []#
the variables computed by integrating values of soil components parameters/variables recursively
- SOILS_INTERMEDIATE_VARIABLES = ['Conc_Nitrates_Soil', 'mineralisation']#
the variables that we need to compute in order to compute fluxes and/or compartments values at soil scale
- SOILS_RUN_VARIABLES = ['Tsoil', 'volume', 'nitrates', 'Conc_Nitrates_Soil', 'mineralisation']#
all the variables computed during a run step of the simulation at soil scale
- SOILS_STATE = ['Tsoil', 'volume', 'nitrates']#
the variables which define the state of the modeled system at soil scale, formed be the concatenation of
SOILS_STATE_PARAMETERSand the names of the compartments associated to each soil (seeMODEL_COMPARTMENTS_NAMES)
- SOILS_STATE_PARAMETERS = ['Tsoil', 'volume']#
the parameters which define the state of the modeled system at soil scale
- SOILS_T_INDEXES = ['t', 'plant', 'axis']#
concatenation of
T_INDEXandSOILS_INDEXES
- T_INDEX = ['t']#
the time index
- culm_density#
culm density (culm m-2)
- delta_t#
the delta t of the simulation (in seconds)
- initial_conditions#
the initial conditions of the compartments in the population and soils
- initial_conditions_mapping#
dictionary to map the compartments to their indexes in
initial_conditions
- initialize(population, soils, Tair=12, Tsoil=12)[source]#
- Initialize:
from population and soils.
- Parameters:
population (model.Population) – a population of plants.
soils (dict) – the soil associated to each axis. soils must be a dictionary with the same structure as
soilsTair (float) – air temperature (°C)
Tsoil (float) – soil temperature (°C)
- interpolate_forcings#
do not interpolate)
- Type:
a boolean flag which indicates if we want to interpolate or not the forcings (True
- Type:
interpolate, False
- interpolation_functions#
functions to interpolate the forcings
- new_forcings_values#
new values of the forcings
- nfev_total#
cumulative number of RHS function evaluations
- photosynthesis_forcings_delta_t_ratio#
the ratio between the delta t of the photosynthesis forcings and the delta t of the simulation
- population#
the population to simulate on
- previous_forcings_values#
previous values of the forcings
- progressbar#
progress bar to show the progress of the solver
- respiration_model#
the model of respiration to use
- run(show_progressbar=False)[source]#
Compute CN exchanges which occurred in
populationandsoilsoverdelta_t.- Parameters:
show_progressbar (bool) – True: show the progress bar of the solver ; False: do not show the progress bar (default).
- senescence_forcings_delta_t_ratio#
the ratio between the delta t of the senescence forcings and the delta t of the simulation
- show_progressbar#
DO NOT show the progress bar
- Type:
True
- Type:
show the progress bar ; False
- soils#
The inputs of the soils.
- soils is a dictionary of objects of type
model.Soil: {(plant_index, axis_label): soil_object, …}
- soils is a dictionary of objects of type
- t_offset#
the absolute time offset elapsed from the beginning of the simulation
- time_grid#
the time grid of the simulation (in hours)
- time_step#
time step of the simulation (in hours)
- exception openalea.cnwheat.simulation.SimulationConstructionError[source]#
Bases:
SimulationErrorException raised when a problem occurs in the constructor, in particular when the arguments are not consistent with each other.
- exception openalea.cnwheat.simulation.SimulationError[source]#
Bases:
ExceptionAbstract class for the management of simulation errors. Do not instance it directly.
- exception openalea.cnwheat.simulation.SimulationInitializationError[source]#
Bases:
SimulationErrorException raised when a problem occurs at initialization time, in particular when checking the consistency of inputs population and soils (see
initialize()).
- exception openalea.cnwheat.simulation.SimulationRunError[source]#
Bases:
SimulationErrorException raised when running a simulation, for example when a problem occurs during the integration of the system of differential equations.
openalea.cnwheat.model module#
- class openalea.cnwheat.model.Axis(label=None, roots=None, phloem=None, grains=None, phytomers=None, C_exudated=0, sum_respi_shoot=0, sum_respi_roots=0.001)[source]#
Bases:
objectThe class
Axisdefines the CN exchanges at axis scale.- An
axismust have: one
set of roots,one
phloem,zero or one
set of grains,at least one
phytomer.
- INIT_COMPARTMENTS = <openalea.cnwheat.parameters.AxisInitCompartments object>#
the initial values of compartments and state parameters
- PARAMETERS = <openalea.cnwheat.parameters.AxisParameters object>#
the internal parameters of the axes
- Total_Transpiration#
the total transpiration (mmol s-1)
- calculate_aggregated_variables()[source]#
Calculate the integrative variables of the axis recursively.
- grains#
the grains
- label#
the label of the axis
- mstruct#
structural mass of the axis (g)
- nitrates#
nitrates in the axis (µmol N)
- phloem#
the phloem
- phytomers#
the list of phytomers
- roots#
the roots
- senesced_mstruct#
senesced structural mass of the axis (g)
- An
- class openalea.cnwheat.model.Chaff(label=None, exposed_element=None, enclosed_element=None)[source]#
Bases:
PhotosyntheticOrganThe class
Chaffdefines the CN exchanges in a chaff.- PARAMETERS = <openalea.cnwheat.parameters.ChaffParameters object>#
the internal parameters of the chaffs
- class openalea.cnwheat.model.ChaffElement(label=None, green_area=0.0001, mstruct=0.005, senesced_mstruct=0, Nstruct=0.001, triosesP=0, starch=0, sucrose=0, fructan=0, nitrates=0, amino_acids=0, proteins=0, cytokinins=0, Tr=0, Ag=0, Ts=12, is_growing=False, cohorts=None, cohorts_replications=None, index=None)[source]#
Bases:
PhotosyntheticOrganElementThe class
ChaffElementdefines the CN exchanges in a chaff element.- PARAMETERS = <openalea.cnwheat.parameters.ChaffElementParameters object>#
the internal parameters of the chaffs elements
- class openalea.cnwheat.model.EcophysiologicalConstants[source]#
Bases:
objectEcophysiological constants.
- AMINO_ACIDS_C_RATIO = 4.15#
Mean number of mol of C in 1 mol of the major amino acids of plants (Glu, Gln, Ser, Asp, Ala, Gly)
- AMINO_ACIDS_MOLAR_MASS_C_RATIO = 0.38#
(Penning De Vries 1989)
- AMINO_ACIDS_MOLAR_MASS_N_RATIO = 0.135#
Mean contribution of N in amino acids mass of the major amino acids of plants (Glu, Gln, Ser, Asp, Ala, Gly)
- AMINO_ACIDS_N_RATIO = 1.25#
Mean number of mol of N in 1 mol of the major amino acids of plants (Glu, Gln, Ser, Asp, Ala, Gly)
- C_MOLAR_MASS = 12#
Molar mass of carbon (g mol-1)
- HEXOSE_MOLAR_MASS_C_RATIO = 0.42#
Contribution of C in hexose mass
- NB_C_HEXOSES = 6#
Number of C in 1 mol of hexoses (glucose, fructose)
- NB_C_SUCROSE = 12#
Number of C in 1 mol of sucrose
- NB_C_TRIOSEP = 3#
Number of C in 1 mol of trioseP
- NITRATES_MOLAR_MASS_N_RATIO = 0.23#
Contribution of N in amino acids mass
- N_MOLAR_MASS = 14#
Molar mass of nitrogen (g mol-1)
- PROTEINS_MOLAR_MASS_C_RATIO = 0.38#
As for AA
- PROTEINS_MOLAR_MASS_N_RATIO = 0.151#
Mean contribution of N in protein mass (Penning De Vries 1989)
- RATIO_C_mstruct = 0.44#
Mean contribution of carbon to structural dry mass (g C g-1 mstruct)
- TRIOSESP_MOLAR_MASS_C_RATIO = 0.21#
Contribution of C in triosesP mass
- class openalea.cnwheat.model.Grains(label='grains', age_from_flowering=0, starch=0, structure=1, proteins=0)[source]#
Bases:
OrganThe class
Grainsdefines the CN exchanges in a set of grains.- AMINO_ACIDS_MOLAR_MASS_N_RATIO = 0.136#
Mean contribution of N in amino acids mass contained in gluten (Glu, Gln and Pro)
- INIT_COMPARTMENTS = <openalea.cnwheat.parameters.GrainsInitCompartments object>#
the initial values of compartments and state parameters
- PARAMETERS = <openalea.cnwheat.parameters.GrainsParameters object>#
the internal parameters of the grains
- RGR_Structure#
RGR of grain structure (dimensionless?)
- R_grain_growth_starch#
grain starch growth respiration (µmol` C respired)
- R_grain_growth_struct#
grain struct respiration (µmol` C respired)
- S_Proteins#
current synthesis of grain proteins integrated over a delta t (µmol` N)
- S_grain_starch#
current synthesis of grain starch integrated over a delta t (µmol` C g-1 mstruct)
- S_grain_structure#
current synthesis of grain structure integrated over a delta t (µmol` C)
- age_from_flowering#
seconds
- static calculate_RGR_Structure(sucrose_phloem, mstruct_axis, T_effect_growth)[source]#
Relative Growth Rate of grain structure, regulated by sucrose concentration in phloem.
- calculate_S_grain_starch(sucrose_phloem, mstruct_axis, T_effect_Vmax)[source]#
Rate of starch synthesis in grains (i.e. grain filling) (µmol` C starch g-1 mstruct h-1). Michaelis-Menten function of sucrose concentration in the phloem.
- Parameters:
- Returns:
Rate of Synthesis of grain starch (µmol` C g-1 mstruct h-1)
- Return type:
- calculate_S_grain_structure(prec_structure, RGR_Structure)[source]#
Rate of grain structure synthesis (µmol` C structure h-1). Exponential function, RGR regulated by sucrose concentration in the phloem.
- static calculate_S_proteins(S_grain_structure, S_grain_starch, amino_acids_phloem, sucrose_phloem, structural_dry_mass)[source]#
Protein synthesis in grains. N is assumed to be co-transported along with the unloaded sucrose from phloem (using the ratio amino acids:sucrose of phloem).
- Parameters:
S_grain_structure (float) – Synthesis of grain structure (µmol` C)
S_grain_starch (float) – Synthesis of grain starch (µmol` C g-1 mstruct)
amino_acids_phloem (float) – Amino acids concentration in phloem (µmol` N g-1 mstruct)
sucrose_phloem (float) – Sucrose concentration in phloem (µmol` C g-1 mstruct)
structural_dry_mass (float) – Grain structural dry mass (g)
- Returns:
Synthesis of grain proteins (µmol` N)
- Return type:
- static calculate_starch_derivative(S_grain_starch, structural_dry_mass, R_growth)[source]#
delta grain starch.
- calculate_temperature_effect_on_growth(Tair)[source]#
Effect of the temperature on elongation. Return value of equation from Johnson and Lewin (1946) for temperature. The equation is modified to return zero below zero degree. Identical to modified_Arrhenius_equation in ElongWheat. Should multiply the rate at 20°C
- static modified_Arrhenius_equation(temperature)[source]#
Return value of equation from Johnson and Lewin (1946) for temperature. The equation is modified to return zero below zero degree.
- proteins#
µmol` of N proteins
- starch#
µmol` of C starch
- structural_dry_mass#
g of MS
- structure#
µmol` of C sucrose
- class openalea.cnwheat.model.HiddenZone(label='hiddenzone', mstruct=6.39e-08, Nstruct=2.06e-09, sucrose=0.001, fructan=0, amino_acids=0.001, proteins=0, ratio_DZ=1, cohorts=None, cohorts_replications=None, index=None)[source]#
Bases:
OrganThe class
HiddenZonedefines the CN exchanges in an hidden zone.- D_Fructan#
fructan degradation (µmol` C g-1 mstruct)
- D_Proteins#
protein degradation (µmol` N g-1 mstruct)
- INIT_COMPARTMENTS = <openalea.cnwheat.parameters.HiddenZoneInitCompartments object>#
the initial values of compartments and state parameters
- Nstruct#
g
- PARAMETERS = <openalea.cnwheat.parameters.HiddenZoneParameters object>#
the internal parameters of the hidden zone
- R_residual#
Residual maintenance respiration (cost from protein turn-over, cell ion gradients, futile cycles…) (µmol` C respired)
- S_Fructan#
fructan synthesis (µmol` C g-1 mstruct)
- S_Proteins#
protein synthesis (µmol` N g-1 mstruct)
- Total_Organic_Nitrogen#
current total nitrogen amount (µmol` N)
- Unloading_Amino_Acids#
current Unloading of amino acids from phloem to hiddenzone integrated over delta t (µmol` N)
- Unloading_Sucrose#
current Unloading of sucrose from phloem to hiddenzone integrated over delta t (µmol` C)
- amino_acids#
µmol` N
- calculate_D_Fructan(sucrose, fructan, T_effect_Vmax)[source]#
Rate of fructan degradation (µmol` C fructan g-1 mstruct h-1). Inhibition function by the end product i.e. sucrose (Bancal et al., 2012).
- calculate_D_Proteins(proteins, T_effect_Vmax)[source]#
Rate of protein degradation (µmol` N proteins h-1 g-1 MS). First order kinetic
- calculate_Regul_S_Fructan(Unloading_Sucrose)[source]#
Regulating function for fructan maximal rate of synthesis. Negative regulation by the loading of sucrose from the phloem (“swith-off” sigmoïdal kinetic).
- calculate_S_Fructan(sucrose, Regul_S_Fructan, T_effect_Vmax)[source]#
Rate of fructan synthesis (µmol` C fructan g-1 mstruct h-1). Sigmoïdal function of sucrose.
- Parameters:
- Returns:
Rate of Fructan synthesis (µmol` C g-1 mstruct)
- Return type:
- calculate_S_proteins(amino_acids, T_effect_Vmax)[source]#
Rate of protein synthesis (µmol` N proteins h-1 g-1 MS). Michaelis-Menten function of amino acids.
- static calculate_Total_Organic_Nitrogen(amino_acids, proteins, Nstruct)[source]#
Total amount of organic N (amino acids + proteins + Nstruct). Used to calculate residual respiration.
- calculate_Unloading_Amino_Acids(amino_acids, amino_acids_phloem, mstruct_axis, T_effect_conductivity)[source]#
Rate of amino acids Unloading from phloem to the hidden zone (µmol` N amino acids unloaded h-1). Transport-resistance equation
- Parameters:
- Returns:
Rate of Amino_acids Unloading (µmol` N h-1)
- Return type:
- calculate_Unloading_Sucrose(sucrose, sucrose_phloem, mstruct_axis, T_effect_conductivity)[source]#
Rate of sucrose Unloading from phloem to the hidden zone (µmol` C sucrose unloaded h-1). Transport-resistance equation
- Parameters:
- Returns:
Rate of Sucrose Unloading (µmol` C h-1)
- Return type:
- calculate_aggregated_variables()[source]#
Calculate the integrative variables of the organ recursively.
- calculate_amino_acids_derivative(Unloading_Amino_Acids, S_Proteins, D_Proteins, hiddenzone_Loading_Amino_Acids_contribution)[source]#
delta amino acids of hidden zone.
- Parameters:
- Returns:
delta amino acids (µmol` N amino acids)
- Return type:
- calculate_sucrose_derivative(Unloading_Sucrose, S_Fructan, D_Fructan, hiddenzone_Loading_Sucrose_contribution, R_residual)[source]#
delta sucrose of hidden zone.
- Parameters:
Unloading_Sucrose (float) – Sucrose unloaded (µmol` C)
S_Fructan (float) – Fructan synthesis (µmol` C g-1 mstruct)
D_Fructan (float) – Fructan degradation (µmol` C g-1 mstruct)
hiddenzone_Loading_Sucrose_contribution (float) – Sucrose imported from the emerged tissues (µmol` C)
R_residual (float) – Residual respiration (µmol` C)
- Returns:
delta sucrose (µmol` C sucrose)
- Return type:
- cohorts#
TEMPORARY. Devrait être porté à l’échelle de la plante uniquement mais je ne vois pas comment faire mieux
- Type:
list of cohort values - Hack to treat tillering cases
- cohorts_replications#
dictionary of number of replications per cohort rank
- fructan#
µmol` C
- index#
the index of the phytomer TEMPORARY
- mstruct#
g
- property nb_replications#
- proteins#
µmol` N
- sucrose#
µmol` C
- class openalea.cnwheat.model.Internode(label=None, exposed_element=None, enclosed_element=None)[source]#
Bases:
PhotosyntheticOrganThe class
Internodedefines the CN exchanges in an internode.- PARAMETERS = <openalea.cnwheat.parameters.InternodeParameters object>#
the internal parameters of the internodes
- class openalea.cnwheat.model.InternodeElement(label=None, green_area=0.0001, mstruct=0.005, senesced_mstruct=0, Nstruct=0.001, triosesP=0, starch=0, sucrose=0, fructan=0, nitrates=0, amino_acids=0, proteins=0, cytokinins=0, Tr=0, Ag=0, Ts=12, is_growing=False, cohorts=None, cohorts_replications=None, index=None)[source]#
Bases:
PhotosyntheticOrganElementThe class
InternodeElementdefines the CN exchanges in an internode element.- PARAMETERS = <openalea.cnwheat.parameters.InternodeElementParameters object>#
the internal parameters of the internodes elements
- class openalea.cnwheat.model.Lamina(label=None, exposed_element=None, enclosed_element=None)[source]#
Bases:
PhotosyntheticOrganThe class
Laminadefines the CN exchanges in a lamina.- PARAMETERS = <openalea.cnwheat.parameters.LaminaParameters object>#
the internal parameters of the laminae
- class openalea.cnwheat.model.LaminaElement(label=None, green_area=0.0001, mstruct=0.005, senesced_mstruct=0, Nstruct=0.001, triosesP=0, starch=0, sucrose=0, fructan=0, nitrates=0, amino_acids=0, proteins=0, cytokinins=0, Tr=0, Ag=0, Ts=12, is_growing=False, cohorts=None, cohorts_replications=None, index=None)[source]#
Bases:
PhotosyntheticOrganElementThe class
LaminaElementdefines the CN exchanges in a lamina element.- PARAMETERS = <openalea.cnwheat.parameters.LaminaElementParameters object>#
the internal parameters of the laminae elements
- class openalea.cnwheat.model.Organ(label)[source]#
Bases:
objectThe class
Organdefines the CN exchanges at organ scale.Organis the base class of all organs. DO NOT INSTANTIATE IT.- calculate_aggregated_variables()[source]#
Calculate the integrative variables of the organ recursively.
- label#
the label of the organ
- class openalea.cnwheat.model.Peduncle(label=None, exposed_element=None, enclosed_element=None)[source]#
Bases:
PhotosyntheticOrganThe class
Peduncledefines the CN exchanges in a peduncle.- PARAMETERS = <openalea.cnwheat.parameters.PeduncleParameters object>#
the internal parameters of the peduncles
- class openalea.cnwheat.model.PeduncleElement(label=None, green_area=0.0001, mstruct=0.005, senesced_mstruct=0, Nstruct=0.001, triosesP=0, starch=0, sucrose=0, fructan=0, nitrates=0, amino_acids=0, proteins=0, cytokinins=0, Tr=0, Ag=0, Ts=12, is_growing=False, cohorts=None, cohorts_replications=None, index=None)[source]#
Bases:
PhotosyntheticOrganElementThe class
PeduncleElementdefines the CN exchanges in a peduncle element.- PARAMETERS = <openalea.cnwheat.parameters.PeduncleElementParameters object>#
the internal parameters of the peduncles elements
- class openalea.cnwheat.model.Phloem(label='phloem', sucrose=500, amino_acids=100)[source]#
Bases:
OrganThe class
Phloemdefines the CN exchanges in a phloem.- INIT_COMPARTMENTS = <openalea.cnwheat.parameters.PhloemInitCompartments object>#
the initial values of compartments and state parameters
- PARAMETERS = <openalea.cnwheat.parameters.PhloemParameters object>#
the internal parameters of the phloem
- amino_acids#
µmol` N amino acids
- static calculate_amino_acids_derivative(contributors)[source]#
delta amino acids
- Parameters:
contributors (list [PhotosyntheticOrganElement, Grains, Roots, HiddenZone]) – Organs exchanging N with the phloem
- Returns:
delta amino acids (µmol` N amino acids)
- Return type:
- static calculate_sucrose_derivative(contributors)[source]#
delta sucrose
- Parameters:
contributors (list [PhotosyntheticOrganElement, Grains, Roots, HiddenZone]) – Organs exchanging C with the phloem
- Returns:
delta sucrose (µmol` C sucrose)
- Return type:
- sucrose#
µmol` C sucrose
- class openalea.cnwheat.model.PhotosyntheticOrgan(label, exposed_element, enclosed_element)[source]#
Bases:
OrganThe class
PhotosyntheticOrgandefines the CN exchanges in a photosynthetic organ.A
photosynthetic organmust have at least 1photosynthetic organ element:chaff element,lamina element,internode element,peduncle element, orsheath element.PhotosyntheticOrganis the base class of all photosynthetic organs. DO NOT INSTANTIATE IT.- PARAMETERS = <openalea.cnwheat.parameters.PhotosyntheticOrganParameters object>#
the internal parameters of the photosynthetic organs
- calculate_aggregated_variables()[source]#
Calculate the integrative variables of the organ recursively.
- enclosed_element#
the enclosed element
- exposed_element#
the exposed element
- mstruct#
the structural dry mass
- nitrates(µmol N)#
nitrates (µmol N)
- senesced_mstruct#
senesced structural dry mass
- class openalea.cnwheat.model.PhotosyntheticOrganElement(label=None, green_area=0.0001, mstruct=0.005, senesced_mstruct=0, Nstruct=0.001, triosesP=0, starch=0, sucrose=0, fructan=0, nitrates=0, amino_acids=0, proteins=0, cytokinins=0, Tr=0, Ag=0, Ts=12, is_growing=False, cohorts=None, cohorts_replications=None, index=None)[source]#
Bases:
objectThe class
PhotosyntheticOrganElementdefines the CN exchanges in a photosynthetic organ element.An element must belong to an organ of the same type (e.g. a class:LaminaElement must belong to a class:Lamina).
PhotosyntheticOrganElementis the base class of all photosynthetic organs elements. DO NOT INSTANTIATE IT.- Ag#
Gross assimilation (µmol` m-2 s-1)
- Amino_Acids_import#
Total amino acids imported from roots (µmol` N amino acids)
- D_Fructan#
Rate of fructan degradation ((µmol` C g-1 mstruct)
- D_Proteins#
Rate of protein degradation (µmol` N g-1 mstruct)
- D_Starch#
Rate of starch degradation (µmol` C g-1 mstruct)
- D_cytokinins#
Rate of cytokinins degradation (AU g-1 mstruct)
- INIT_COMPARTMENTS = <openalea.cnwheat.parameters.PhotosyntheticOrganElementInitCompartments object>#
the initial values of compartments and state parameters
- Loading_Amino_Acids#
Rate of amino acids loading to phloem (µmol` N)
- Loading_Sucrose#
Rate of sucrose loading to phloem (µmol` C)
- Nitrates_import#
Total nitrates imported from roots (µmol` N nitrates)
- Nstruct#
Structural N mass (g)
- PARAMETERS = <openalea.cnwheat.parameters.PhotosyntheticOrganElementParameters object>#
the internal parameters of the photosynthetic organs elements
- Photosynthesis#
Total Photosynthesis of an element integrated over a delta t (µmol` C)
- R_Nnit_red#
Nitrate reduction-linked respiration (µmol` C respired)
- R_phloem_loading#
Phloem loading respiration (µmol` C respired)
- R_residual#
Residual maintenance respiration (cost from protein turn-over, cell ion gradients, futile cycles…) (µmol` C respired)
- Regul_S_Fructan#
Maximal rate of fructan synthesis (µmol` C g-1 mstruct)
- S_Amino_Acids#
Rate of amino acids synthesis (µmol` N g-1 mstruct)
- S_Fructan#
Rate of fructan synthesis (µmol` C g-1 mstruct)
- S_Proteins#
Rate of protein synthesis (µmol` N g-1 mstruct)
- S_Starch#
Rate of starch synthesis (µmol` C g-1 mstruct)
- S_Sucrose#
Rate of sucrose synthesis (µmol` C g-1 mstruct)
- Total_Organic_Nitrogen#
current total nitrogen amount (µmol` N)
- Tr#
Transpiration rate (mmol m-2 s-1)
- Transpiration#
Surfacic transpiration rate of an element (mmol H2O s-1)
- Ts#
Organ temperature (°C)
- amino_acids#
µmol` N
- static calculate_Amino_Acids_import(roots_exported_amino_acids, element_transpiration, Total_Transpiration)[source]#
Total amino acids imported from roots (µmol` N amino acids). Amino acids exported by roots are distributed according to the contribution of the element to culm transpiration.
- calculate_D_Fructan(sucrose, fructan, T_effect_Vmax)[source]#
Rate of fructan degradation (µmol` C fructan g-1 mstruct h-1). Inhibition function by the end product i.e. sucrose (Bancal et al., 2012).
- calculate_D_Proteins(proteins, cytokinins, T_effect_Vmax)[source]#
Rate of protein degradation (µmol` N proteins s-1 g-1 MS h-1). First order kinetic regulated by cytokinins concentration.
- calculate_D_Starch(starch, T_effect_Vmax)[source]#
Rate of starch degradation (µmol` C starch g-1 mstruct h-1). First order kinetic.
- calculate_D_cytokinins(cytokinins, T_effect_Vmax)[source]#
Rate of cytokinins degradation (AU g-1 mstruct h-1). First order kinetic. Vary with organ temperature.
- calculate_Export_Amino_Acids(amino_acids, amino_acids_hiddenzone, mstruct_hiddenzone, T_effect_conductivity)[source]#
Rate of amino acids exportation to hidden zone (µmol` N amino acids h-1). Transport-resistance model.
- Parameters:
amino_acids (float) – Amount of amino acids in the element (µmol` N)
amino_acids_hiddenzone (float) – Amino acids amount in the hidden zone (µmol` N)
mstruct_hiddenzone (float) – mstruct of the hidden zone (g)
T_effect_conductivity (float) – Effect of the temperature on the conductivity rate at 20°C (AU)
- Returns:
Rate of Amino acids export (µmol` N h-1)
- Return type:
- calculate_Loading_Amino_Acids(amino_acids, amino_acids_phloem, mstruct_axis, T_effect_conductivity)[source]#
Rate of amino acids loading to phloem (µmol` N amino acids h-1). Transport-resistance model.
- Parameters:
- Returns:
Amino acids loading (µmol` N h-1)
- Return type:
- calculate_Loading_Sucrose(sucrose, sucrose_phloem, mstruct_axis, T_effect_conductivity)[source]#
Rate of sucrose loading to phloem (µmol` C sucrose h-1). Transport-resistance model.
- Parameters:
- Returns:
Rate of Sucrose loading (µmol` C h-1)
- Return type:
- static calculate_Nitrates_import(Export_Nitrates, element_transpiration, Total_Transpiration)[source]#
Total nitrates imported from roots (µmol` N nitrates). Nitrates coming from roots (fraction of uptake + direct export) are distributed according to the contribution of the element to culm transpiration.
- calculate_Regul_S_Fructan(Loading_Sucrose)[source]#
Regulating function for fructan maximal rate of synthesis. Negative regulation by the loading of sucrose from the phloem (“swith-off” sigmoïdal kinetic).
- calculate_S_Fructan(sucrose, Regul_S_Fructan, T_effect_Vmax)[source]#
Rate of fructan synthesis (µmol` C fructan g-1 mstruct h-1). Sigmoïdal function of sucrose.
- Parameters:
- Returns:
Rate of Fructan synthesis (µmol` C g-1 mstruct h-1)
- Return type:
- calculate_S_Starch(triosesP, T_effect_Vmax)[source]#
Rate of starch synthesis (µmol` C starch g-1 mstruct h-1). Michaelis-Menten function of triose phosphates.
- calculate_S_Sucrose(triosesP, T_effect_Vmax)[source]#
Rate of sucrose synthesis (µmol` C sucrose g-1 mstruct h-1). Michaelis-Menten function of triose phosphates.
- calculate_S_amino_acids(nitrates, triosesP, T_effect_Vmax)[source]#
Rate of amino acids synthesis (µmol` N amino acids h-1 g-1 MS). Bi-substrate Michaelis-Menten function of nitrates and triose phosphates.
- calculate_S_proteins(amino_acids, T_effect_Vmax)[source]#
Rate of protein synthesis (µmol` N proteins h-1 g-1 MS). Michaelis-Menten function of amino acids.
- static calculate_Total_Organic_Nitrogen(amino_acids, proteins, Nstruct)[source]#
Total amount of organic N (amino acids + proteins + Nstruct). Used to calculate residual respiration.
- static calculate_Total_Transpiration(Tr, green_area)[source]#
Surfacic transpiration rate of an element
- calculate_amino_acids_derivative(Amino_Acids_import, S_Amino_Acids, S_Proteins, D_Proteins, Loading_Amino_Acids)[source]#
delta amino acids of element.
- Parameters:
Amino_Acids_import (float) – Amino acids import from roots (µmol` N)
S_Amino_Acids (float) – Amino acids synthesis (µmol` N g-1 mstruct)
S_Proteins (float) – Protein synthesis (µmol` N g-1 mstruct)
D_Proteins (float) – Protein degradation (µmol` N g-1 mstruct)
Loading_Amino_Acids (float) – Amino acids loading (µmol` N)
- Returns:
delta amino acids (µmol` N amino acids)
- Return type:
- calculate_cytokinins_derivative(import_cytokinins, D_cytokinins)[source]#
delta cytokinins of element.
- static calculate_cytokinins_import(roots_exporteD_cytokinins, element_transpiration, Total_Transpiration)[source]#
Import of cytokinins (AU). Cytokinin exported by roots are distributed according to the contribution of the element to culm transpiration.
- calculate_export_sucrose(sucrose, sucrose_hiddenzone, mstruct_hiddenzone, T_effect_conductivity)[source]#
Rate of sucrose exportation to hidden zone (µmol` C sucrose h-1). Transport-resistance model.
- Parameters:
- Returns:
Rate of Sucrose export (µmol` C h-1)
- Return type:
- calculate_sucrose_derivative(S_Sucrose, D_Starch, Loading_Sucrose, S_Fructan, D_Fructan, sum_respi)[source]#
delta sucrose of element.
- Parameters:
S_Sucrose (float) – Sucrose synthesis (µmol` C g-1 mstruct)
D_Starch (float) – Starch degradation (µmol` C g-1 mstruct)
Loading_Sucrose (float) – Sucrose loading (µmol` C)
S_Fructan (float) – Fructan synthesis (µmol` C g-1 mstruct)
D_Fructan (float) – Fructan degradation (µmol` C g-1 mstruct)
sum_respi (float) – Sum of respirations for the element i.e. related to C loading to phloem, amino acids synthesis and residual (µmol` C)
- Returns:
delta sucrose (µmol` C sucrose)
- Return type:
- static calculate_total_Photosynthesis(Ag, green_area)[source]#
Total Photosynthesis of an element (µmol` C m-2 h-1 * m2).
- calculate_triosesP_derivative(Photosynthesis, S_Sucrose, S_Starch, S_Amino_Acids)[source]#
delta triose phosphates of element.
- Parameters:
- Returns:
delta triose phosphates (µmol` C triose phosphates)
- Return type:
- cohorts#
TEMPORARY. Devrait être porté à l’échelle de la plante uniquement mais je ne vois pas comment faire mieux
- Type:
list of cohort values - Hack to treat tillering cases
- cohorts_replications#
dictionary of number of replications per cohort rank
- cytokinins#
AU
- cytokinins_import#
Import of cytokinins (AU)
- fructan#
µmol` C
- green_area#
green area (m-2)
- index#
the index of the phytomer TEMPORARY
- label#
the label of the element
- mstruct#
Structural dry mass (g)
- property nb_replications#
- nitrates#
µmol` N
- proteins#
µmol` N
- senesced_mstruct#
Senesced structural dry mass (g)
- starch#
µmol` C
- sucrose#
µmol` C
- sum_respi#
Sum of respirations for the element i.e. related to C loading to phloem, amino acids synthesis and residual (µmol` C)
- triosesP#
µmol` C
- class openalea.cnwheat.model.Phytomer(index=None, chaff=None, peduncle=None, lamina=None, internode=None, sheath=None, hiddenzone=None, cohorts=None, cohorts_replications=None)[source]#
Bases:
objectThe class
Phytomerdefines the CN exchanges at phytomer scale.- A
phytomermust have at least:
- PARAMETERS = <openalea.cnwheat.parameters.PhytomerParameters object>#
the internal parameters of the phytomers
- calculate_aggregated_variables()[source]#
Calculate the integrative variables of the phytomer recursively.
- chaff#
the chaff
- cohorts#
TEMPORARY. Devrait être porté à l’échelle de la plante uniquement mais je ne vois pas comment faire mieux
- Type:
list of cohort values - Hack to treat tillering cases
- cohorts_replications#
dictionary of number of replications per cohort rank
the hidden zone
- index#
the index of the phytomer
- internode#
the internode
- lamina#
the lamina
- mstruct#
the structural mass of the phytomer (g)
- property nb_replications#
- nitrates#
nitrates of the phytomer (µmol N)
- peduncle#
the peduncle
- senesced_mstruct#
senesced structural mass of the phytomer (g)
- sheath#
the sheath
- A
- class openalea.cnwheat.model.Plant(index=None, axes=None)[source]#
Bases:
objectThe class
Plantdefines the CN exchanges at plant scale.A
plantmust have at least oneaxis.- PARAMETERS = <openalea.cnwheat.parameters.PlantParameters object>#
the internal parameters of the plants
- axes#
the list of axes
- calculate_aggregated_variables()[source]#
Calculate the integrative variables of the plant recursively.
- static calculate_temperature_effect_on_Vmax(Tair)[source]#
Effect of the temperature on maximal enzyme activity Should multiply the rate at 20°C
- static calculate_temperature_effect_on_conductivity(Tair)[source]#
Effect of the temperature on phloeme translocation conductivity (Farrar 1988) Should multiply the rate at 20°C
- index#
the index of the plant
- class openalea.cnwheat.model.Population(plants=None)[source]#
Bases:
objectThe class
Populationdefines the CN exchanges at population scale.A
populationmust have at least oneplant.- PARAMETERS = <openalea.cnwheat.parameters.PopulationParameters object>#
the internal parameters of the population
- calculate_aggregated_variables()[source]#
Calculate the integrative variables of the population recursively.
- plants#
the list of plants
- class openalea.cnwheat.model.Roots(label='roots', mstruct=0.15, senesced_mstruct=0, Nstruct=0.0045, sucrose=0, nitrates=0, amino_acids=0, cytokinins=0)[source]#
Bases:
OrganThe class
Rootsdefines the CN exchanges in a set of roots.- C_exudation#
C sucrose lost by root exudation integrated over a delta t (µmol` C g-1 mstruct)
- Export_Amino_Acids#
Total export of amino acids from roots to shoot organs integrated over a delta t (µmol` N)
- Export_Nitrates#
Total export of nitrates from roots to shoot organs integrated over a delta t (µmol` N)
- Export_cytokinins#
Total export of cytokinin from roots to shoot organs integrated over a delta t (AU)
- HATS_LATS#
Nitrate influx (µmol` N)
- INIT_COMPARTMENTS = <openalea.cnwheat.parameters.RootsInitCompartments object>#
the initial values of compartments and state parameters
- N_exudation#
N amino acids lost by root exudation integrated over a delta t (µmol` N g-1 mstruct)
- Nstruct#
Structural N mass (g)
- PARAMETERS = <openalea.cnwheat.parameters.RootsParameters object>#
the internal parameters of the roots
- R_Nnit_red#
Nitrate reduction-linked respiration (µmol` C respired)
- R_Nnit_upt#
Nitrate uptake respiration (µmol` C respired)
- R_residual#
Residual maintenance respiration (cost from protein turn-over, cell ion gradients, futile cycles…) (µmol` C respired)
- S_Amino_Acids#
Rate of amino acid synthesis in roots integrated over a delta t (µmol` N g-1 mstruct)
- S_cytokinins#
Rate of cytokinin synthesis integrated over a delta t (AU g-1 mstruct)
- Total_Organic_Nitrogen#
current amount of organic N (µmol` N)
- Unloading_Amino_Acids#
current Unloading of amino acids from phloem to roots
- Unloading_Sucrose#
current Unloading of sucrose from phloem to roots
- Uptake_Nitrates#
Rate of nitrate uptake by roots integrated over a delta t (µmol` N nitrates)
- amino_acids#
µmol` N amino acids
- calculate_Export_Amino_Acids(amino_acids, regul_transpiration)[source]#
Total export of amino acids from roots to shoot organs Amino acids export is calculated as a function of nitrate export using the ratio amino acids:nitrates in roots.
- calculate_Export_Nitrates(nitrates, regul_transpiration)[source]#
Total export of nitrates from roots to shoot organs Export is calculated as a function on nitrate concentration and culm transpiration.
- calculate_Export_cytokinins(cytokinins, regul_transpiration)[source]#
Total export of cytokinin from roots to shoot organs Cytokinin export is calculated as a function of cytokinin concentration and culm transpiration.
- calculate_S_amino_acids(nitrates, sucrose, T_effect_Vmax)[source]#
Rate of amino acid synthesis in roots (µmol` N amino acids g-1 mstruct h-1). Bi-substrate Michaelis-Menten function of nitrates and sucrose.
- calculate_S_cytokinins(sucrose_roots, nitrates_roots, T_effect_Vmax)[source]#
Rate of cytokinin synthesis (AU cytokinins g-1 mstruct h-1). Cytokinin synthesis regulated by both root sucrose and nitrates. As a signal molecule, cytokinins are assumed have a neglected effect on sucrose. Thus, no cost in C is applied to the sucrose pool.
- static calculate_Total_Organic_Nitrogen(amino_acids, Nstruct)[source]#
Total amount of organic N (amino acids + Nstruct). Used to calculate residual respiration.
- static calculate_Unloading_Amino_Acids(Unloading_Sucrose, sucrose_phloem, amino_acids_phloem)[source]#
Unloading of amino_acids from phloem to roots. Amino acids are assumed to be co-transported along with the unloaded sucrose from phloem (using the ratio amino acids:sucrose of phloem).
- Parameters:
- Returns:
Amino acids Unloading (µmol` N g-1 mstruct)
- Return type:
- calculate_Unloading_Sucrose(sucrose_roots, sucrose_phloem, mstruct_axis, T_effect_conductivity)[source]#
Rate of sucrose Unloading from phloem to roots (µmol` C sucrose unloaded g-1 mstruct h-1).
- Parameters:
- Returns:
Rate of Sucrose Unloading (µmol` C g-1 mstruct h-1)
- Return type:
- calculate_Uptake_Nitrates(Conc_Nitrates_Soil, nitrates_roots, sucrose_roots, T_effect_Vmax)[source]#
- Rate of nitrate uptake by roots
Nitrate uptake is calculated as the sum of the 2 transport systems: HATS and LATS
HATS and LATS parameters are calculated as a function of root nitrate concentration (negative regulation)
Nitrate uptake is finally regulated by the total culm transpiration and sucrose concentration (positive regulation)
- Parameters:
- Returns:
Nitrate uptake (µmol` N nitrates) and nitrate influxes HATS and LATS (µmol` N h-1)
- Return type:
- calculate_aggregated_variables()[source]#
Calculate the integrative variables of the organ recursively.
- calculate_amino_acids_derivative(Unloading_Amino_Acids, S_Amino_Acids, Export_Amino_Acids, N_exudation)[source]#
delta root amino acids.
- Parameters:
- Returns:
delta root amino acids (µmol` N amino acids)
- Return type:
- static calculate_exudation(Unloading_Sucrose, sucrose_roots, amino_acids_roots, amino_acids_phloem)[source]#
- C sucrose and N amino acids lost by root exudation (µmol` C or N g-1 mstruct).
C exudation is calculated as a fraction of C Unloading from phloem
N exudation is calculated from C exudation using the ratio amino acids:sucrose of the phloem
- Parameters:
- Returns:
Rates of C exudated (µmol` C g-1 mstruct h-1) and N_exudation (µmol` N g-1 mstruct h-1)
- Return type:
- calculate_nitrates_derivative(Uptake_Nitrates, Export_Nitrates, S_Amino_Acids)[source]#
delta root nitrates.
- static calculate_regul_transpiration(total_transpiration)[source]#
A function to regulate metabolite exports from roots by shoot transpiration
- calculate_sucrose_derivative(Unloading_Sucrose, S_Amino_Acids, C_exudation, sum_respi)[source]#
delta root sucrose.
- Parameters:
Unloading_Sucrose (float) – Sucrose Unloading (µmol` C g-1 mstruct)
S_Amino_Acids (float) – Amino acids synthesis (µmol` N g-1 mstruct)
C_exudation (float) – C exudation (µmol` C g-1 mstruct)
sum_respi (float) – Sum of respirations for roots i.e. related to N uptake, amino acids synthesis and residual (µmol` C)
- Returns:
delta root sucrose (µmol` C sucrose)
- Return type:
- cytokinins#
AU cytokinins
- mstruct#
Structural mass (g)
- nitrates#
µmol` N nitrates
- regul_transpiration#
Dimensionless regulating factor of metabolite exports from roots by shoot transpiration
- senesced_mstruct#
Senesced structural mass (g)
- sucrose#
µmol` C sucrose
- sum_respi#
Sum of respirations for roots i.e. related to N uptake, amino acids synthesis and residual (µmol` C)
- class openalea.cnwheat.model.Sheath(label=None, exposed_element=None, enclosed_element=None)[source]#
Bases:
PhotosyntheticOrganThe class
Sheathdefines the CN exchanges in a sheath.- PARAMETERS = <openalea.cnwheat.parameters.SheathParameters object>#
the internal parameters of the sheaths
- class openalea.cnwheat.model.SheathElement(label=None, green_area=0.0001, mstruct=0.005, senesced_mstruct=0, Nstruct=0.001, triosesP=0, starch=0, sucrose=0, fructan=0, nitrates=0, amino_acids=0, proteins=0, cytokinins=0, Tr=0, Ag=0, Ts=12, is_growing=False, cohorts=None, cohorts_replications=None, index=None)[source]#
Bases:
PhotosyntheticOrganElementThe class
SheathElementdefines the CN exchanges in a sheath element.- PARAMETERS = <openalea.cnwheat.parameters.SheathElementParameters object>#
the internal parameters of the sheaths elements
- class openalea.cnwheat.model.Soil(volume=None, nitrates=None, Tsoil=None)[source]#
Bases:
objectThe class
Soildefines the amount of nitrogen in the volume of soil explored by roots.- Conc_Nitrates_Soil#
soil nitrate concentration Unloading (µmol` N m-3 soil)
- PARAMETERS = <openalea.cnwheat.parameters.SoilParameters object>#
the internal parameters of the soil
- Tsoil#
soil temperature (°C)
- static calculate_mineralisation(T_effect_Vmax)[source]#
Mineralisation on organic N into nitrates in soil.
- static calculate_nitrates_derivative(mineralisation, soil_contributors, culm_density, constant_Conc_Nitrates)[source]#
delta soil nitrates.
- Parameters:
mineralisation (float) – N mineralisation in soil (µmol` m-2 N nitrates)
soil_contributors ((float, int)) – A tuple with (Nitrate uptake per axis (µmol` N nitrates), the plant id)
culm_density (dict [plant_id, culm_density]) – A dictionary of culm density (culm_density = {plant_id: culm_density, …})
constant_Conc_Nitrates (bool) – If True, the model run with a constant soil nitrate concentration.
- Returns:
delta nitrates (µmol` N nitrates)
- Return type:
- static calculate_temperature_effect_on_Vmax(Tsoil)[source]#
Effect of the temperature on maximal enzyme activity Should multiply the rate at 20°C
- static calculate_temperature_effect_on_conductivity(Tsoil)[source]#
Effect of the temperature on phloeme translocation conductivity (Farrar 1988) Should multiply the rate at 20°C
- constant_Conc_Nitrates#
If True, the model run with a constant soil nitrate concentration (bool)
- mineralisation#
mineralisation on organic N into nitrates in soil (µmol`)
- nitrates#
µmol` N nitrates
- volume#
volume of soil explored by roots (m3)
openalea.cnwheat.parameters module#
- openalea.cnwheat.parameters.AXIS_INIT_COMPARTMENTS = <openalea.cnwheat.parameters.AxisInitCompartments object>#
The instance of class
cnwheat.parameters.HiddenZoneInitCompartmentsfor current process
- openalea.cnwheat.parameters.AXIS_PARAMETERS = <openalea.cnwheat.parameters.AxisParameters object>#
The instance of class
cnwheat.parameters.AxisParametersfor current process
- class openalea.cnwheat.parameters.AxisInitCompartments[source]#
Bases:
objectInitial values for compartments of axis.
- C_exudated#
initial value of C exudated by the roots (\(\mu\) mol C)
- sum_respi_roots#
initial value of C respired by the roots (exept root growth respiration) (\(\mu\) mol C)
- sum_respi_shoot#
initial value of C respired by the shoot (exept leaf and internode growth respiration) (\(\mu\) mol C)
- class openalea.cnwheat.parameters.AxisParameters[source]#
Bases:
objectInternal parameters of axes.
- ALPHA#
Proportion of the structural mass containing the substrates
- openalea.cnwheat.parameters.CHAFF_ELEMENT_PARAMETERS = <openalea.cnwheat.parameters.ChaffElementParameters object>#
The instance of class
cnwheat.parameters.ChaffElementParametersfor current process
- openalea.cnwheat.parameters.CHAFF_PARAMETERS = <openalea.cnwheat.parameters.ChaffParameters object>#
The instance of class
cnwheat.parameters.ChaffParametersfor current process
- class openalea.cnwheat.parameters.ChaffElementParameters[source]#
Bases:
PhotosyntheticOrganElementParametersInternal parameters of chaffs elements.
- ALPHA#
Proportion of structural mass containing substrate
- class openalea.cnwheat.parameters.ChaffParameters[source]#
Bases:
PhotosyntheticOrganParametersInternal parameters of chaffs.
- openalea.cnwheat.parameters.GRAINS_INIT_COMPARTMENTS = <openalea.cnwheat.parameters.GrainsInitCompartments object>#
The instance of class
cnwheat.parameters.GrainsInitCompartmentsfor current process
- openalea.cnwheat.parameters.GRAINS_PARAMETERS = <openalea.cnwheat.parameters.GrainsParameters object>#
The instance of class
cnwheat.parameters.GrainsParametersfor current process
- class openalea.cnwheat.parameters.GrainsInitCompartments[source]#
Bases:
objectInitial values for compartments of grains.
- age_from_flowering#
initial value of age_from_flowering (s)
- proteins#
initial value of proteins (\(\mu\) mol N)
- starch#
initial value of starch (\(\mu\) mol C)
- structure#
initial value of structure (\(\mu\) mol C)
- class openalea.cnwheat.parameters.GrainsParameters[source]#
Bases:
objectInternal parameters of grains.
- ALPHA#
Proportion of structural mass containing substrate
- Arrhenius_ref#
- FILLING_END#
Time (s at 20°C) at which grains filling stops. (Bertheloot et al., 2011)
- FILLING_INIT#
Time (s at 20°C) at which phloem loading switch from grain structure to accumulation of starch
- K_RGR#
Affinity coefficient of the Relative Growth Rate of grain structure (\(\mu\) mol C)
- K_STARCH#
Affinity coefficient of grain filling of starch (\(\mu\) mol C g-1 MS)
- VMAX_RGR#
Maximal value of the Relative Growth Rate of grain structure (s-1 at 20°C)
- VMAX_STARCH#
Maximal rate of grain filling of starch (\(\mu\) mol C s-1 at 20°C g-1 MS)
- openalea.cnwheat.parameters.HIDDEN_ZONE_INIT_COMPARTMENTS = <openalea.cnwheat.parameters.HiddenZoneInitCompartments object>#
The instance of class
cnwheat.parameters.HiddenZoneInitCompartmentsfor current process
- openalea.cnwheat.parameters.HIDDEN_ZONE_PARAMETERS = <openalea.cnwheat.parameters.HiddenZoneParameters object>#
The instance of class
cnwheat.parameters.HiddenZoneParametersfor current process
- class openalea.cnwheat.parameters.HiddenZoneInitCompartments[source]#
Bases:
objectInitial values for compartments of hidden zones.
- Nstruct#
initial value of Nstruct (g)
- amino_acids#
initial value of amino_acids (\(\mu\) mol N)
- fructan#
initial value of fructan (\(\mu\) mol C)
- mstruct#
initial value of mstruct (g)
- proteins#
initial value of proteins (\(\mu\) mol N)
- ratio_DZ#
initial value of ratio of Division Zone into the HiddenZone
- sucrose#
initial value of sucrose (\(\mu\) mol C)
- class openalea.cnwheat.parameters.HiddenZoneParameters[source]#
Bases:
objectInternal parameters of hidden growing zones.
- ALPHA#
Proportion of structural mass containing substrate
- BETA#
Kind of volumetric mass density at power -2/3 ((g m-3)**(-2/3))
- K_DFRUCTAN#
Affinity coefficient of fructan degradation (\(\mu\) mol C g-1 MS)
- K_REGUL_SFRUCTAN#
Affinity coefficient of the regulation function of fructan synthesis (\(\mu\) mol g-1 MS)
- K_SFRUCTAN#
Affinity coefficient of fructan synthesis (\(\mu\) mol C g-1 MS)
- K_SPROTEINS#
Affinity coefficient of protein synthesis (\(\mu\) mol N g-1 MS)
- N_REGUL_SFRUCTAN#
Parameter of the regulation function of fructan synthesis (dimensionless)
- SIGMA#
Coefficient of surface diffusion. Used in Fick’s law (g m-2 s-1).
- VMAX_DFRUCTAN#
Maximal rate of fructan degradation (\(\mu\) mol C s-1 g-1 MS)
- VMAX_SFRUCTAN_POT#
Potential maximal rate of fructan synthesis (\(\mu\) mol C s-1 g-1 MS)
- VMAX_SFRUCTAN_RELATIVE#
Maximal rate of fructan synthesis in the division zone relative to the rate in mature tissus (\(\mu\) mol C s-1 g-1 MS)
- VMAX_SPROTEINS_DZ#
Maximal rate of protein synthesis in the division zone (\(\mu\) mol N s-1 g-1 MS)
- VMAX_SPROTEINS_EMZ#
Maximal rate of protein synthesis in the elongation and mature zones (\(\mu\) mol N s-1 g-1 MS)
- delta_Dproteins#
Relative rate of proteins degradation (s-1)
- openalea.cnwheat.parameters.INTERNODE_ELEMENT_PARAMETERS = <openalea.cnwheat.parameters.InternodeElementParameters object>#
The instance of class
cnwheat.parameters.InternodeElementParametersfor current process
- openalea.cnwheat.parameters.INTERNODE_PARAMETERS = <openalea.cnwheat.parameters.InternodeParameters object>#
The instance of class
cnwheat.parameters.InternodeParametersfor current process
- class openalea.cnwheat.parameters.InternodeElementParameters[source]#
Bases:
PhotosyntheticOrganElementParametersInternal parameters of internodes elements.
- ALPHA#
Proportion of structural mass containing substrate
- class openalea.cnwheat.parameters.InternodeParameters[source]#
Bases:
PhotosyntheticOrganParametersInternal parameters of internodes.
- openalea.cnwheat.parameters.LAMINA_ELEMENT_PARAMETERS = <openalea.cnwheat.parameters.LaminaElementParameters object>#
The instance of class
cnwheat.parameters.LaminaElementParametersfor current process
- openalea.cnwheat.parameters.LAMINA_PARAMETERS = <openalea.cnwheat.parameters.LaminaParameters object>#
The instance of class
cnwheat.parameters.LaminaParametersfor current process
- class openalea.cnwheat.parameters.LaminaElementParameters[source]#
Bases:
PhotosyntheticOrganElementParametersInternal parameters of laminae elements.
- ALPHA#
Proportion of structural mass containing substrate
- class openalea.cnwheat.parameters.LaminaParameters[source]#
Bases:
PhotosyntheticOrganParametersInternal parameters of laminae.
- openalea.cnwheat.parameters.PEDUNCLE_ELEMENT_PARAMETERS = <openalea.cnwheat.parameters.PeduncleElementParameters object>#
The instance of class
cnwheat.parameters.PeduncleElementParametersfor current process
- openalea.cnwheat.parameters.PEDUNCLE_PARAMETERS = <openalea.cnwheat.parameters.PeduncleParameters object>#
The instance of class
cnwheat.parameters.PeduncleParametersfor current process
- openalea.cnwheat.parameters.PHLOEM_INIT_COMPARTMENTS = <openalea.cnwheat.parameters.PhloemInitCompartments object>#
The instance of class
cnwheat.parameters.PhloemInitCompartmentsfor current process
- openalea.cnwheat.parameters.PHLOEM_PARAMETERS = <openalea.cnwheat.parameters.PhloemParameters object>#
The instance of class
cnwheat.parameters.PhloemParametersfor current process
- openalea.cnwheat.parameters.PHOTOSYNTHETIC_ORGAN_ELEMENT_INIT_COMPARTMENTS = <openalea.cnwheat.parameters.PhotosyntheticOrganElementInitCompartments object>#
The instance of class
cnwheat.parameters.PhotosyntheticOrganElementInitCompartmentsfor current process
- openalea.cnwheat.parameters.PHOTOSYNTHETIC_ORGAN_ELEMENT_PARAMETERS = <openalea.cnwheat.parameters.PhotosyntheticOrganElementParameters object>#
The instance of class
cnwheat.parameters.PhotosyntheticOrganElementParametersfor current process
- openalea.cnwheat.parameters.PHOTOSYNTHETIC_ORGAN_PARAMETERS = <openalea.cnwheat.parameters.PhotosyntheticOrganParameters object>#
The instance of class
cnwheat.parameters.PhotosyntheticOrganParametersfor current process
- openalea.cnwheat.parameters.PHYTOMER_PARAMETERS = <openalea.cnwheat.parameters.PhytomerParameters object>#
The instance of class
cnwheat.parameters.PhytomerParametersfor current process
- openalea.cnwheat.parameters.PLANT_PARAMETERS = <openalea.cnwheat.parameters.PlantParameters object>#
The instance of class
cnwheat.parameters.PlantParametersfor current process
- openalea.cnwheat.parameters.POPULATION_PARAMETERS = <openalea.cnwheat.parameters.PopulationParameters object>#
The instance of class
cnwheat.parameters.PopulationParametersfor current process
- class openalea.cnwheat.parameters.PeduncleElementParameters[source]#
Bases:
PhotosyntheticOrganElementParametersInternal parameters of peduncles elements.
- ALPHA#
Proportion of structural mass containing substrate
- class openalea.cnwheat.parameters.PeduncleParameters[source]#
Bases:
PhotosyntheticOrganParametersInternal parameters of peduncles.
- class openalea.cnwheat.parameters.PhloemInitCompartments[source]#
Bases:
objectInitial values for compartments of phloem.
- amino_acids#
initial value of amino_acids (\(\mu\) mol N)
- sucrose#
initial value of sucrose (\(\mu\) mol C)
- class openalea.cnwheat.parameters.PhloemParameters[source]#
Bases:
objectInternal parameters of phloems.
- ALPHA#
Proportion of structural mass containing substrate
- class openalea.cnwheat.parameters.PhotosyntheticOrganElementInitCompartments[source]#
Bases:
objectInitial values for compartments of photosynthetic organ elements.
- Ag#
initial value of Ag (Gross assimilation (\(\mu\) mol m-2 s-1)
- Nstruct#
initial value of Nstruct (g)
- Tr#
initial value of Tr (Transpiration rate (mmol m-2 s-1)
- Ts#
initial value of Ts (Organ temperature)
- amino_acids#
initial value of amino_acids (\(\mu\) mol N)
- cytokinins#
initial value of cytokinins (AU)
- fructan#
initial value of fructan (\(\mu\) mol C)
- green_area#
initial value of green_area (m2)
- mstruct#
initial value of mstruct (g)
- nitrates#
initial value of nitrates (\(\mu\) mol N)
- proteins#
initial value of proteins (\(\mu\) mol N)
- senesced_mstruct#
initial value of senesced_mstruct (g)
- starch#
initial value of starch (\(\mu\) mol C)
- sucrose#
initial value of sucrose (\(\mu\) mol C)
- triosesP#
initial value of triosesP (\(\mu\) mol C)
- class openalea.cnwheat.parameters.PhotosyntheticOrganElementParameters[source]#
Bases:
objectInternal parameters of photosynthetic organs elements.
- class openalea.cnwheat.parameters.PhotosyntheticOrganParameters[source]#
Bases:
objectInternal parameters of photosynthetic organs.
- BETA#
Kind of volumetric mass density at power -2/3 ((g m-3)**(-2/3))
- DELTA_DSTARCH#
Relative rate of starch degradation (s-1)
- DELTA_D_CYTOKININS#
Relative rate of cytokinins degradation (s-1)
- K_AMINO_ACIDS_NITRATES#
Affinity coefficient of amino acid synthesis from nitrates (\(\mu\) mol N g-1 MS)
- K_AMINO_ACIDS_TRIOSESP#
Affinity coefficient of amino acid synthesis from triosesP (\(\mu\) mol C g-1 MS)
- K_DFRUCTAN#
Affinity coefficient of fructan degradation (\(\mu\) mol C g-1 MS)
- K_DPROTEINS#
Affinity coefficient for protein degradation (\(\mu\) g-1 mstruct)
- K_DPROTEINS_CYTOK#
Affinity coefficient with cytokinins for protein degradation (UA g-1 mstruct)
- K_REGUL_SFRUCTAN#
Affinity coefficient of the regulation function of fructan synthesis (\(\mu\) mol g-1 MS)
- K_SFRUCTAN#
Affinity coefficient of fructan synthesis (\(\mu\) mol C g-1 MS)
- K_SPROTEINS#
Affinity coefficient of protein synthesis (\(\mu\) mol N g-1 MS)
- K_STARCH#
Affinity coefficient of starch synthesis (\(\mu\) mol C g-1 MS)
- K_SUCROSE#
Affinity coefficient of sucrose synthesis (\(\mu\) mol C g-1 MS)
- N_DPROTEINS#
A coefficient for the regulation of protein degradation by cytokines (dimensionless)
- N_REGUL_SFRUCTAN#
Parameter of the regulation function of fructan synthesis (dimensionless)
- SIGMA_AMINO_ACIDS#
Conductivity of an organ-phloem pathway (g2 \(\mu\) mol-1 m-2 s-1) ; used to compute the amino acids loaded to the phloem
- SIGMA_SUCROSE#
Conductivity of an organ-phloem pathway (g2 \(\mu\) mol-1 m-2 s-1) ; used to compute the sucrose loaded to the phloem
- VMAX_AMINO_ACIDS#
Maximal rate of amino acid synthesis (\(\mu\) mol N s-1 g-1 MS)
- VMAX_DFRUCTAN#
Maximal rate of fructan degradation (\(\mu\) mol C s-1 g-1 MS)
- VMAX_DPROTEINS#
Maximal rate of protein degradation (\(\mu\) mol g-1 mstruct s-1)
- VMAX_DPROTEINS_CYTOK#
Maximal regulation of protein degradation by cytokinins (\(\mu\) mol g-1 mstruct s-1)
- VMAX_SFRUCTAN_POT#
Potential maximal rate of fructan synthesis (\(\mu\) mol C s-1 g-1 MS)
- VMAX_SPROTEINS#
Maximal rate of protein synthesis (\(\mu\) mol N s-1 g-1 MS)
- VMAX_STARCH#
Maximal rate of starch synthesis (\(\mu\) mol C s-1 g-1 MS)
- VMAX_SUCROSE#
Maximal rate of sucrose synthesis (\(\mu\) mol C s-1 g-1 MS)
- class openalea.cnwheat.parameters.PhytomerParameters[source]#
Bases:
objectInternal parameters of phytomers.
- class openalea.cnwheat.parameters.PlantParameters[source]#
Bases:
objectInternal parameters of plants.
- class openalea.cnwheat.parameters.PopulationParameters[source]#
Bases:
objectInternal parameters of populations.
- openalea.cnwheat.parameters.ROOTS_INIT_COMPARTMENTS = <openalea.cnwheat.parameters.RootsInitCompartments object>#
The instance of class
cnwheat.parameters.RootsInitCompartmentsfor current process
- openalea.cnwheat.parameters.ROOTS_PARAMETERS = <openalea.cnwheat.parameters.RootsParameters object>#
The instance of class
cnwheat.parameters.RootsParametersfor current process
- class openalea.cnwheat.parameters.RootsInitCompartments[source]#
Bases:
objectInitial values for compartments of roots.
- Nstruct#
initial value of Nstruct (g)
- amino_acids#
initial value of amino_acids (\(\mu\) mol N)
- cytokinins#
initial value of cytokinins (AU)
- mstruct#
initial value of mstruct (g)
- nitrates#
initial value of nitrates (\(\mu\) mol C)
- senesced_mstruct#
initial value of senesced_mstruct (g)
- sucrose#
initial value of sucrose (\(\mu\) mol C)
- class openalea.cnwheat.parameters.RootsParameters[source]#
Bases:
objectInternal parameters of roots.
- ALPHA#
Proportion of structural mass containing substrate
- A_K_HATS#
Parameter for estimating the affinity coefficient of nitrates uptake at saturating soil N concentration;HATS (\(\mu\) mol m-3)
- A_LATS#
Parameter for estimating the rate of nitrates uptake at low soil N concentration; LATS (m3 g-1 s-1)
- A_VMAX_HATS#
Parameter for estimating the maximal rate of nitrates uptake at saturating soil N concentration;HATS (\(\mu\) mol g-1 s-1)
- BETA#
Kind of volumetric mass density at power -2/3 ((g m-3)**(-2/3))
- B_K_HATS#
Parameter for estimating the affinity coefficient of nitrates uptake at saturating soil N concentration;HATS (g \(\mu\) mol-1)
- B_LATS#
Parameter for estimating the rate of nitrates uptake at low soil N concentration; LATS (g \(\mu\) mol-1)
- B_VMAX_HATS#
Parameter for estimating the maximal rate of nitrates uptake at saturating soil N concentration;HATS (g \(\mu\) mol-1)
- C_EXUDATION#
Proportion of C exudated from C sucrose unloaded to roots (Keith et al., 1986)
- K_AMINO_ACIDS_EXPORT#
Relative rate of amino acids export from roots (s-1)
- K_AMINO_ACIDS_NITRATES#
Affinity coefficient of amino acid synthesis from nitrates (\(\mu\) mol N g-1 MS)
- K_AMINO_ACIDS_SUCROSE#
Affinity coefficient of amino acid synthesis from sucrose (\(\mu\) mol C g-1 MS)
- K_C#
Affinity coefficient for the regulation function by root C (\(\mu\) mol C sucrose g-1 MS)
- K_CYTOKININS_EXPORT#
Relative rate of cytokinins export from roots (s-1)
- K_NITRATES_CYTOKININS#
Affinity coefficient of cytokinins synthesis for nitrates (\(\mu\) mol N nitrates g-1 mstruct)
- K_NITRATE_EXPORT#
Relative rate of nitrate export from roots (s-1)
- K_SUCROSE_CYTOKININS#
Affinity coefficient of cytokinins synthesis for sucrose (\(\mu\) mol C sucrose g-1 mstruct)
- MIN_INFLUX_FOR_UPTAKE#
Minimum influx rate below wich no net absorption happens (\(\mu\) mol C sucrose g-1 mstruct s-1)
- NET_INFLUX_UPTAKE_RATIO#
nitrate influx)
- Type:
ratio (net uptake
- N_EXUDATION_MAX#
Parameter used to limit the rate of N exudation (dimensionless)
- N_NIT_CYTOKININS#
A parameter for cytokinins synthesis (dimensionless)
- N_SUC_CYTOKININS#
A parameter for cytokinins synthesis (dimensionless)
- SIGMA_SUCROSE#
Conductivity of the roots-phloem pathway (g2 \(\mu\) mol-1 m-2 s-1) ; used to compute the sucrose loaded to the phloem
- VMAX_AMINO_ACIDS#
Maximal rate of amino acid synthesis (\(\mu\) mol N s-1 g-1 MS)
- VMAX_S_CYTOKININS#
Maximal rate of cytokinins synthesis (UA g-1 mstruct s-1)
- openalea.cnwheat.parameters.SHEATH_ELEMENT_PARAMETERS = <openalea.cnwheat.parameters.SheathElementParameters object>#
The instance of class
cnwheat.parameters.SheathElementParametersfor current process
- openalea.cnwheat.parameters.SHEATH_PARAMETERS = <openalea.cnwheat.parameters.SheathParameters object>#
The instance of class
cnwheat.parameters.SheathParametersfor current process
- openalea.cnwheat.parameters.SOIL_PARAMETERS = <openalea.cnwheat.parameters.SoilParameters object>#
The instance of class
cnwheat.parameters.SoilParametersfor current process
- class openalea.cnwheat.parameters.SheathElementParameters[source]#
Bases:
PhotosyntheticOrganElementParametersInternal parameters of sheaths elements.
- ALPHA#
Proportion of structural mass containing substrate
- class openalea.cnwheat.parameters.SheathParameters[source]#
Bases:
PhotosyntheticOrganParametersInternal parameters of sheaths.
- class openalea.cnwheat.parameters.SoilParameters[source]#
Bases:
objectInternal parameters of soil.
- openalea.cnwheat.parameters.from_dataframe(object_, dataframe_)[source]#
Set attributes of object_ from data in dataframe_.
- Parameters:
object_ (
object) - The object to set.dataframe_ (
pandas.DataFrame) - The dataframe used to set the attribute(s) of object_. dataframe_ must have only 2 rows:one row is for the header and contains the name of each attribute,
and one row contains the value of each attribute.
- openalea.cnwheat.parameters.to_dataframe(object_)[source]#
Create and return a dataframe from attributes of object_.
- Parameters:
object_ (
object) - The object used to create the dataframe.
- Returns:
A dataframe which contains the attributes of object_, with only 2 rows:
one row is for the header and contains the name of each attribute,
and one row contains the value of each attribute.
- Returns Type:
pandas.DataFrame
openalea.cnwheat.tools module#
- exception openalea.cnwheat.tools.DataWarning(variable, keys)[source]#
Bases:
UserWarningRaised when there is no data to plot for a variable.
- openalea.cnwheat.tools.OUTPUTS_INDEXES = ['t', 'plant', 'axis', 'metamer', 'organ', 'element']#
All the possible indexes of CN-Wheat outputs
- class openalea.cnwheat.tools.ProgressBar(bar_length=20, title='', block_character='#', uncomplete_character='-')[source]#
Bases:
objectDisplay a console progress bar.
- bar_length#
the number of blocks in the progress bar. MUST BE GREATER THAN ZERO !
- block_character#
the character to represent a block
- block_interval#
the time interval of each block. MUST BE GREATER THAN ZERO !
- last_upper_t#
the last upper t displayed by the progress bar
- progress_mapping#
a mapping to optimize the refresh rate
- t_max#
the maximum t that the progress bar can display. MUST BE GREATER THAN ZERO !
- title#
the title to write on the left side of the progress bar
- uncomplete_character#
the character to represent the uncompleted part of the progress bar
- openalea.cnwheat.tools.compare_actual_to_desired(data_dirpath, actual_data_df, desired_data_filename, actual_data_filename=None, precision=4, overwrite_desired_data=False)[source]#
Compare
difference = actual_data_df - desired_data_df
to
tolerance = 10**-precision * (1 + abs(desired_data_df))
where
desired_data_df = pd.read_csv(os.path.join(data_dirpath, desired_data_filename))
If difference > tolerance, then raise an AssertionError.
- Parameters:
data_dirpath (str) – The path of the directory where to find the data to compare.
actual_data_df (pandas.DataFrame) – The computed data.
desired_data_filename (str) – The file name of the expected data.
actual_data_filename (str) – If not None, save the computed data to actual_data_filename, in directory data_dirpath. Default is None.
precision (int) – The precision to use for the comparison. Default is 4.
overwrite_desired_data (bool) – If True the comparison between actual and desired data is not run. Instead, the desired data will be overwritten using actual data. To be used with caution.
- openalea.cnwheat.tools.plot_cnwheat_ouputs(outputs, x_name, y_name, x_label='', y_label='', x_lim=None, title=None, filters={}, plot_filepath=None, colors=[], linestyles=[], explicit_label=True, kwargs={})[source]#
Plot outputs, with x=`x_name` and y=`y_name`.
The general algorithm is:
find the scale of outputs and keep only the needed columns,
apply filters to outputs and make groups according to the scale,
plot each group as a new line,
save or display the plot.
- Parameters:
outputs (pandas.DataFrame) – The outputs of CN-Wheat.
x_name (str) – x axis of the plot.
y_name (str) – y axis of the plot.
x_label (str) – The x label of the plot. Default is ‘’.
y_label (str or unicode) – The y label of the plot. Default is ‘’.
x_lim (float) – the x-axis limit.
title (str) – the title of the plot. If None (default), create a title which is the concatenation of y_name and each scales which cardinality is one.
filters (dict) – A dictionary whose keys are the columns of outputs for which we want to apply a specific filter. These columns can be one or more element of
OUTPUTS_INDEXES. The value associated to each key is a criteria that the rows of outputs must satisfy to be plotted. The values can be either one value or a list of values. If no value is given for any column, then all rows are plotted (default).colors (list) – The colors for lines. If empty, let matplotlib default line colors.
linestyles (list) – The styles for lines. If empty, let matplotlib default line styles.
plot_filepath (str) – The file path to save the plot. If None, do not save the plot but display it.
explicit_label (bool) – True: makes the line label from concatenation of each scale id (default). - False: makes the line label from concatenation of scales containing several distinct elements.
kwargs (dict) – key arguments to be passed to matplolib
- Examples:
>>> import pandas as pd >>> cnwheat_output_df = pd.read_csv('cnwheat_output.csv') # in this example, 'cnwheat_output.csv' must contain at least the columns 't' and 'Conc_Sucrose'. >>> plot(cnwheat_output_df, x_name = 't', y_name = 'Conc_Sucrose', x_label='Time (Hour)', y_label=u'[Sucrose] (µmol g$^{-1}$ mstruct)', title='{} = f({})'.format('Conc_Sucrose', 't'), filters={'plant': 1, 'axis': 'MS', 'organ': 'Lamina', 'element': 1})
- openalea.cnwheat.tools.setup_logging(config_filepath='logging.json', level=20, log_model=False, log_compartments=False, log_derivatives=False, remove_old_logs=False)[source]#
Setup logging configuration.
- Parameters:
config_filepath (str) – The file path of the logging configuration.
level (int) – The global level of the logging. Use either logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR or logging.CRITICAL.
log_model (bool) – if True, log the messages from
cnwheat.model. False otherwise.log_compartments (bool) – if True, log the values of the compartments. False otherwise.
log_derivatives (bool) – if True, log the values of the derivatives. False otherwise.
remove_old_logs (bool) – if True, remove all files in the logs directory documented in config_filepath.
openalea.cnwheat.converter module#
- openalea.cnwheat.converter.AXES_VARIABLES = ['plant', 'axis', 'mstruct', 'senesced_mstruct', 'C_exudated', 'sum_respi_shoot', 'sum_respi_roots', 'Total_Transpiration']#
the columns of the outputs dataframe at AXIS scale
- openalea.cnwheat.converter.CNWHEAT_CLASSES_TO_DATAFRAME_ORGANS_MAPPING = {<class 'openalea.cnwheat.model.Chaff'>: 'ear', <class 'openalea.cnwheat.model.Grains'>: 'grains', <class 'openalea.cnwheat.model.HiddenZone'>: 'hiddenzone', <class 'openalea.cnwheat.model.Internode'>: 'internode', <class 'openalea.cnwheat.model.Lamina'>: 'blade', <class 'openalea.cnwheat.model.Peduncle'>: 'peduncle', <class 'openalea.cnwheat.model.Phloem'>: 'phloem', <class 'openalea.cnwheat.model.Roots'>: 'roots', <class 'openalea.cnwheat.model.Sheath'>: 'sheath'}#
the mapping of the CN-Wheat organ classes to organ names in MTG
- openalea.cnwheat.converter.DATAFRAME_TO_CNWHEAT_ELEMENTS_NAMES_MAPPING = {'HiddenElement': 'enclosed_element', 'LeafElement1': 'exposed_element', 'StemElement': 'exposed_element'}#
the mapping of the name of each element, from Dataframe to CN-Wheat
- openalea.cnwheat.converter.ELEMENTS_VARIABLES = ['plant', 'axis', 'metamer', 'organ', 'element', 'Ag', 'Nstruct', 'Tr', 'Ts', 'green_area', 'is_growing', 'mstruct', 'senesced_mstruct', 'amino_acids', 'cytokinins', 'fructan', 'nitrates', 'proteins', 'starch', 'sucrose', 'triosesP', 'Photosynthesis', 'R_Nnit_red', 'R_phloem_loading', 'R_residual', 'Transpiration', 'sum_respi', 'nb_replications', 'Amino_Acids_import', 'D_Fructan', 'D_Proteins', 'D_Starch', 'D_cytokinins', 'Loading_Amino_Acids', 'Loading_Sucrose', 'Nitrates_import', 'Regul_S_Fructan', 'S_Fructan', 'S_Starch', 'S_Sucrose', 'S_Amino_Acids', 'S_Proteins', 'cytokinins_import', 'Total_Organic_Nitrogen']#
the columns of the outputs dataframe at ELEMENT scale
- openalea.cnwheat.converter.HIDDENZONE_VARIABLES = ['plant', 'axis', 'metamer', 'Nstruct', 'mstruct', 'ratio_DZ', 'amino_acids', 'fructan', 'proteins', 'sucrose', 'nb_replications', 'D_Fructan', 'D_Proteins', 'S_Fructan', 'S_Proteins', 'Unloading_Amino_Acids', 'Unloading_Sucrose']#
the columns of the outputs dataframe at HIDDEN ZONE scale
- openalea.cnwheat.converter.ORGANS_VARIABLES = ['plant', 'axis', 'organ', 'mstruct', 'Nstruct', 'senesced_mstruct', 'age_from_flowering', 'amino_acids', 'cytokinins', 'nitrates', 'proteins', 'starch', 'structure', 'sucrose', 'C_exudation', 'HATS_LATS', 'N_exudation', 'RGR_Structure', 'R_Nnit_red', 'R_Nnit_upt', 'Respi_growth', 'R_grain_growth_starch', 'R_grain_growth_struct', 'R_residual', 'regul_transpiration', 'sum_respi', 'Export_Amino_Acids', 'Export_Nitrates', 'Export_cytokinins', 'S_Amino_Acids', 'S_cytokinins', 'S_grain_starch', 'S_grain_structure', 'S_Proteins', 'Unloading_Amino_Acids', 'Unloading_Sucrose', 'Uptake_Nitrates', 'Total_Organic_Nitrogen']#
the columns of the outputs dataframe at ORGAN scale
- openalea.cnwheat.converter.PHYTOMERS_VARIABLES = ['plant', 'axis', 'metamer', 'mstruct']#
the columns of the outputs dataframe at PHYTOMER scale
- openalea.cnwheat.converter.PLANTS_VARIABLES = ['plant', 'Tair']#
the columns of the outputs dataframe at PLANT scale
- openalea.cnwheat.converter.SOILS_VARIABLES = ['plant', 'axis', 'Tsoil', 'volume', 'nitrates', 'Conc_Nitrates_Soil', 'mineralisation']#
the columns of the outputs dataframe at SOIL scale
- openalea.cnwheat.converter.from_dataframes(organs_inputs=None, hiddenzones_inputs=None, elements_inputs=None, soils_inputs=None, update_parameters=None)[source]#
If organs_inputs, hiddenzones_inputs and elements_inputs are not None, convert organs_inputs, hiddenzones_inputs and elements_inputs to a
population. If soils_inputs is not None, convert soils_inputs to a dictionary ofsoils.- Parameters:
organs_inputs (pandas.DataFrame) – Organs inputs, with one line by organ.
hiddenzones_inputs (pandas.DataFrame) – Hidden zones inputs, with one line by hidden zone.
elements_inputs (pandas.DataFrame) – Elements inputs, with one line by element.
soils_inputs (pandas.DataFrame) – Soils inputs, with one line by soil.
update_parameters (dict) – A dictionary with the parameters to update, should have the form {‘Organ_label1’: {‘param1’: value1, ‘param2’: value2}, …}.
- Returns:
If organs_inputs, hiddenzones_inputs and elements_inputs are not None, return a
population, and/or if soils_inputs is not None, return adictofsoils.- Return type:
- openalea.cnwheat.converter.to_dataframes(population=None, soils=None)[source]#
Convert a CN-Wheat
populationand/or a dictionary ofsoilsto Pandas dataframes.If population is not None, convert population to Pandas dataframes. If soils is not None, convert soils to Pandas dataframe.
- Parameters:
population (model.Population) – The CN-Wheat population to convert.
soils (dict) – The soils to convert.
- Returns:
If population is not None, return
dataframesdescribing the internal state and compartments of the population at each scale:plant scale: plant index, state parameters, state variables, intermediate variables, fluxes and integrative variables of each plant (see
PLANTS_VARIABLES)axis scale: plant index, axis id, state parameters, state variables, intermediate variables, fluxes and integrative variables of each axis (see
AXES_VARIABLES)phytomer scale: plant index, axis id, phytomer index, state parameters, state variables, intermediate variables, fluxes and integrative variables of
each phytomer (see
PHYTOMERS_VARIABLES) * organ scale:hidden zones: plant index, axis id, phytomer index, state parameters, state variables, intermediate variables, fluxes and integrative variables of
each hidden zone (see
HIDDENZONE_VARIABLES) * roots, phloem and grains: plant index, axis id, organ type, state parameters, state variables, intermediate variables, fluxes and integrative variables of each organ (seeORGANS_VARIABLES)and element scale: plant index, axis id, phytomer index, organ type, element type, state parameters, state variables, intermediate variables, fluxes and integrative variables of
each element (see
ELEMENTS_VARIABLES)and/or
if soils is not None, return a
dataframedescribing internal state and compartments of the soils, with one line per soil:plant index, axis id, state parameters, state variables, intermediate variables, fluxes and integrative variables of each soil (see
SOILS_RUN_VARIABLES)
- Return type:
(pandas.DataFrame)
openalea.cnwheat.postprocessing module#
- openalea.cnwheat.postprocessing.AXES_INDEXES = ['plant', 'axis']#
the indexes to locate the axes in the modeled system
- openalea.cnwheat.postprocessing.AXES_POSTPROCESSING_VARIABLES = ['C_N_ratio', 'C_N_ratio_shoot', 'N_content', 'N_content_shoot', 'N_content_roots', 'N_content_mstruct', 'N_content_mstruct_shoot', 'N_content_total_DM_shoot', 'N_content_mstruct_roots', 'sum_N_g', 'sum_N_g_shoot', 'sum_dry_mass', 'sum_dry_mass_shoot', 'sum_dry_mass_laminae', 'sum_dry_mass_stem', 'sum_dry_mass_roots', 'dry_mass_phloem', 'shoot_roots_ratio', 'shoot_roots_mstruct_ratio', 'Total_Photosynthesis', 'Tillers_Photosynthesis', 'Tillers_Photosynthesis_An', 'NNI', 'NS', 'NS_shoot', 'NS_stem', 'NS_laminae', 'NS_roots', 'mstruct_shoot', 'mstruct_laminae', 'mstruct_stem', 'C_respired_shoot', 'C_respired_roots', 'Cont_WSC_DM', 'Cont_WSC_DM_shoot', 'Cont_WSC_DM_roots', 'Cont_WSC_DM_laminae', 'Cont_WSC_DM_stem', 'sum_C_g', 'sum_NSC_g']#
axes post-processing variables
- openalea.cnwheat.postprocessing.AXES_RUN_POSTPROCESSING_VARIABLES = {'C_N_ratio', 'C_N_ratio_shoot', 'C_exudated', 'C_respired_roots', 'C_respired_shoot', 'Cont_WSC_DM', 'Cont_WSC_DM_laminae', 'Cont_WSC_DM_roots', 'Cont_WSC_DM_shoot', 'Cont_WSC_DM_stem', 'NNI', 'NS', 'NS_laminae', 'NS_roots', 'NS_shoot', 'NS_stem', 'N_content', 'N_content_mstruct', 'N_content_mstruct_roots', 'N_content_mstruct_shoot', 'N_content_roots', 'N_content_shoot', 'N_content_total_DM_shoot', 'Tillers_Photosynthesis', 'Tillers_Photosynthesis_An', 'Total_Photosynthesis', 'Total_Transpiration', 'axis', 'dry_mass_phloem', 'mstruct', 'mstruct_laminae', 'mstruct_shoot', 'mstruct_stem', 'plant', 'senesced_mstruct', 'shoot_roots_mstruct_ratio', 'shoot_roots_ratio', 'sum_C_g', 'sum_NSC_g', 'sum_N_g', 'sum_N_g_shoot', 'sum_dry_mass', 'sum_dry_mass_laminae', 'sum_dry_mass_roots', 'sum_dry_mass_shoot', 'sum_dry_mass_stem', 'sum_respi_roots', 'sum_respi_shoot', 't'}#
concatenation of
AXES_T_INDEXES,AXES_RUN_VARIABLESandAXES_POSTPROCESSING_VARIABLES
- openalea.cnwheat.postprocessing.AXES_T_INDEXES = ['t', 'plant', 'axis']#
concatenation of
T_INDEXandAXES_INDEXES
- openalea.cnwheat.postprocessing.ELEMENTS_INDEXES = ['plant', 'axis', 'metamer', 'organ', 'element']#
the indexes to locate the elements in the modeled system
- openalea.cnwheat.postprocessing.ELEMENTS_POSTPROCESSING_VARIABLES = ['Conc_Amino_Acids', 'Conc_Fructan', 'Conc_Nitrates', 'Conc_Proteins', 'Conc_Starch', 'Conc_Sucrose', 'Conc_TriosesP', 'Cont_Fructan_DM', 'Conc_cytokinins', 'Surfacic_NS', 'NS', 'N_content', 'N_content_total_DM', 'N_tot', 'nb_replications', 'SLA', 'SLN', 'SLN_nonstruct', 'sum_dry_mass', 'Photosynthetic_efficiency', 'Cont_WSC_DM']#
elements post-processing variables
- openalea.cnwheat.postprocessing.ELEMENTS_RUN_POSTPROCESSING_VARIABLES = {'Ag', 'Amino_Acids_import', 'Conc_Amino_Acids', 'Conc_Fructan', 'Conc_Nitrates', 'Conc_Proteins', 'Conc_Starch', 'Conc_Sucrose', 'Conc_TriosesP', 'Conc_cytokinins', 'Cont_Fructan_DM', 'Cont_WSC_DM', 'D_Fructan', 'D_Proteins', 'D_Starch', 'D_cytokinins', 'Loading_Amino_Acids', 'Loading_Sucrose', 'NS', 'N_content', 'N_content_total_DM', 'N_tot', 'Nitrates_import', 'Nstruct', 'PARa', 'Photosynthesis', 'Photosynthetic_efficiency', 'R_Nnit_red', 'R_phloem_loading', 'R_residual', 'Regul_S_Fructan', 'SLA', 'SLN', 'SLN_nonstruct', 'S_Amino_Acids', 'S_Fructan', 'S_Proteins', 'S_Starch', 'S_Sucrose', 'Surfacic_NS', 'Total_Organic_Nitrogen', 'Tr', 'Transpiration', 'Ts', 'amino_acids', 'axis', 'cytokinins', 'cytokinins_import', 'element', 'fructan', 'green_area', 'is_growing', 'length', 'metamer', 'mstruct', 'nb_replications', 'nitrates', 'organ', 'plant', 'proteins', 'senesced_mstruct', 'starch', 'sucrose', 'sum_dry_mass', 'sum_respi', 't', 'triosesP'}#
concatenation of
ELEMENTS_T_INDEXES,ELEMENTS_RUN_VARIABLESandELEMENTS_POSTPROCESSING_VARIABLES
- openalea.cnwheat.postprocessing.ELEMENTS_T_INDEXES = ['t', 'plant', 'axis', 'metamer', 'organ', 'element']#
concatenation of
T_INDEXandELEMENTS_INDEXES
- class openalea.cnwheat.postprocessing.Element[source]#
Bases:
objectPost-processing to apply on Element outputs.
- static calculate_C_g(triosesP, sucrose, starch, fructan, amino_acids, proteins, mstruct)[source]#
Mass of carbon metabolites
- Parameters:
triosesP (float) – Amount of triose phosphates (µmol` C)
sucrose (float) – Amount of sucrose (µmol` C)
starch (float) – Amount of starch (µmol` C)
fructan (float) – Amount of fructan (µmol` C)
amino_acids (float) – Amount of amino acids (µmol` N)
proteins (float) – Amount of proteins (µmol` N)
mstruct (float) – strcural mass (g)
- Returns:
Dry mass (g)
- Return type:
- static calculate_SLN(nitrates, amino_acids, proteins, Nstruct, green_area)[source]#
Surfacic Leaf Nitrogen (SLN, g.m-2)
- static calculate_SLN_nonstruct(nitrates, amino_acids, proteins, green_area)[source]#
Surfacic Leaf Nitrogen (SLN, g.m-2)
- static calculate_WSC_g(triosesP, sucrose, starch, fructan)[source]#
Mass of Water Soluble Carbohydrates
- static calculate_dry_mass(triosesP, sucrose, starch, fructan, nitrates, amino_acids, proteins, mstruct)[source]#
Dry mass
- Parameters:
triosesP – Amount of triose phosphates (µmol` C)
sucrose (float) – Amount of sucrose (µmol` C)
starch (float) – Amount of sucrose (µmol` C)
fructan (float) – Amount of sucrose (µmol` C)
nitrates (float) – Amount of nitrates (µmol` N)
amino_acids (float) – Amount of sucrose (µmol` N)
proteins (float) – Amount of sucrose (µmol` N)
mstruct (float) – strcural mass (g)
- Returns:
Dry mass (g)
- Return type:
- class openalea.cnwheat.postprocessing.Grains[source]#
Bases:
objectPost-processing to apply on Grains outputs.
- openalea.cnwheat.postprocessing.HIDDENZONE_INDEXES = ['plant', 'axis', 'metamer']#
the indexes to locate the hidden zones in the modeled system
- openalea.cnwheat.postprocessing.HIDDENZONE_POSTPROCESSING_VARIABLES = ['Conc_Amino_Acids', 'Conc_Fructan', 'Conc_Proteins', 'Conc_Sucrose', 'RER', 'nb_replications', 'Cont_Fructan_DM', 'Cont_Proteins_DM', 'sum_dry_mass', 'N_content', 'Cont_WSC_DM']#
hidden zones post-processing variables
- openalea.cnwheat.postprocessing.HIDDENZONE_RUN_POSTPROCESSING_VARIABLES = {'AA_consumption_mstruct', 'Conc_Amino_Acids', 'Conc_Fructan', 'Conc_Proteins', 'Conc_Sucrose', 'Cont_Fructan_DM', 'Cont_Proteins_DM', 'Cont_WSC_DM', 'D_Fructan', 'D_Proteins', 'N_content', 'Nstruct', 'RER', 'Respi_growth', 'S_Fructan', 'S_Proteins', 'Unloading_Amino_Acids', 'Unloading_Sucrose', 'amino_acids', 'axis', 'delta_leaf_L', 'fructan', 'internode_L', 'leaf_L', 'leaf_is_emerged', 'leaf_pseudostem_length', 'metamer', 'mstruct', 'nb_replications', 'plant', 'proteins', 'ratio_DZ', 'sucrose', 'sucrose_consumption_mstruct', 'sum_dry_mass', 't'}#
concatenation of
HIDDENZONE_T_INDEXES,HIDDENZONE_RUN_VARIABLESandHIDDENZONE_POSTPROCESSING_VARIABLES
- openalea.cnwheat.postprocessing.HIDDENZONE_T_INDEXES = ['t', 'plant', 'axis', 'metamer']#
concatenation of
T_INDEXandHIDDENZONE_INDEXES
- class openalea.cnwheat.postprocessing.HiddenZone[source]#
Bases:
objectPost-processing to apply on HiddenZone outputs.
- static calculate_C_g(sucrose, starch, fructan, amino_acids, proteins, mstruct)[source]#
Mass of carbon metabolites
- Parameters:
- Returns:
Dry mass (g)
- Return type:
- static calculate_dry_mass(sucrose, starch, fructan, amino_acids, proteins, mstruct)[source]#
Dry mass
- Parameters:
- Returns:
Dry mass (g)
- Return type:
- openalea.cnwheat.postprocessing.ORGANS_INDEXES = ['plant', 'axis', 'organ']#
the indexes to locate the organs in the modeled system
- openalea.cnwheat.postprocessing.ORGANS_POSTPROCESSING_VARIABLES = ['Conc_Amino_Acids', 'Conc_Nitrates', 'Conc_Sucrose', 'Conc_cytokinins', 'Dry_Mass', 'Proteins_N_Mass', 'N_tot', 'WSC_g']#
organs post-processing variables
- openalea.cnwheat.postprocessing.ORGANS_RUN_POSTPROCESSING_VARIABLES = {'AA_consumption_mstruct', 'C_exudation', 'Conc_Amino_Acids', 'Conc_Nitrates', 'Conc_Sucrose', 'Conc_cytokinins', 'Dry_Mass', 'Export_Amino_Acids', 'Export_Nitrates', 'Export_cytokinins', 'HATS_LATS', 'N_exudation', 'N_tot', 'Nstruct', 'Proteins_N_Mass', 'RGR_Structure', 'R_Nnit_red', 'R_Nnit_upt', 'R_grain_growth_starch', 'R_grain_growth_struct', 'R_residual', 'Respi_growth', 'S_Amino_Acids', 'S_Proteins', 'S_cytokinins', 'S_grain_starch', 'S_grain_structure', 'Total_Organic_Nitrogen', 'Unloading_Amino_Acids', 'Unloading_Sucrose', 'Uptake_Nitrates', 'WSC_g', 'age_from_flowering', 'amino_acids', 'axis', 'cytokinins', 'mstruct', 'nitrates', 'organ', 'plant', 'proteins', 'regul_transpiration', 'senesced_mstruct', 'starch', 'structure', 'sucrose', 'sucrose_consumption_mstruct', 'sum_respi', 'synthetized_mstruct', 't'}#
concatenation of
ORGANS_T_INDEXES,ORGANS_RUN_VARIABLESandORGANS_POSTPROCESSING_VARIABLES
- openalea.cnwheat.postprocessing.ORGANS_T_INDEXES = ['t', 'plant', 'axis', 'organ']#
concatenation of
T_INDEXandORGANS_INDEXES
- openalea.cnwheat.postprocessing.PHYTOMERS_INDEXES = ['plant', 'axis', 'metamer']#
the indexes to locate the phytomers in the modeled system
- openalea.cnwheat.postprocessing.PHYTOMERS_POSTPROCESSING_VARIABLES = []#
phytomers post-processing variables
- openalea.cnwheat.postprocessing.PHYTOMERS_RUN_POSTPROCESSING_VARIABLES = {'axis', 'metamer', 'mstruct', 'plant', 't'}#
concatenation of
PHYTOMERS_T_INDEXES,PHYTOMERS_RUN_VARIABLESandPHYTOMERS_POSTPROCESSING_VARIABLES
- openalea.cnwheat.postprocessing.PHYTOMERS_T_INDEXES = ['t', 'plant', 'axis', 'metamer']#
concatenation of
T_INDEXandPHYTOMERS_INDEXES
- openalea.cnwheat.postprocessing.PLANTS_INDEXES = ['plant']#
the index to locate the plants in the modeled system
- openalea.cnwheat.postprocessing.PLANTS_POSTPROCESSING_VARIABLES = []#
plants post-processing variables
- openalea.cnwheat.postprocessing.PLANTS_RUN_POSTPROCESSING_VARIABLES = {'Tair', 'plant', 't'}#
concatenation of
PLANTS_T_INDEXES,PLANTS_RUN_VARIABLESandPLANTS_POSTPROCESSING_VARIABLES
- openalea.cnwheat.postprocessing.PLANTS_T_INDEXES = ['t', 'plant']#
concatenation of
T_INDEXandPLANTS_INDEXES
- class openalea.cnwheat.postprocessing.Phloem[source]#
Bases:
objectPost-processing to apply on Phloem outputs.
- static calculate_conc_amino_acids(amino_acids, mstruct_axis)[source]#
Amino_acids concentration. Related to the structural dry mass of the culm.
- class openalea.cnwheat.postprocessing.Roots[source]#
Bases:
objectPost-processing to apply on Roots outputs.
- openalea.cnwheat.postprocessing.SOILS_INDEXES = ['plant', 'axis']#
the indexes to locate the soils in the modeled system
- openalea.cnwheat.postprocessing.SOILS_POSTPROCESSING_VARIABLES = []#
soils post-processing variables
- openalea.cnwheat.postprocessing.SOILS_RUN_POSTPROCESSING_VARIABLES = ['t', 'plant', 'axis', 'Tsoil', 'volume', 'nitrates', 'Conc_Nitrates_Soil', 'mineralisation']#
concatenation of
SOILS_T_INDEXES,SOILS_RUN_VARIABLESandSOILS_POSTPROCESSING_VARIABLES
- openalea.cnwheat.postprocessing.SOILS_T_INDEXES = ['t', 'plant', 'axis']#
concatenation of
T_INDEXandSOILS_INDEXES
- openalea.cnwheat.postprocessing.T_INDEX = ['t']#
the time index
- openalea.cnwheat.postprocessing.generate_graphs(axes_df=None, hiddenzones_df=None, organs_df=None, elements_df=None, soils_df=None, graphs_dirpath='.')[source]#
Generate graphs to validate the outputs of CN-Wheat, and save them in directory graphs_dirpath.
- Parameters:
axes_df (pandas.DataFrame) – CN-Wheat outputs and post-processing at axis scale (see
PLANTS_RUN_POSTPROCESSING_VARIABLES)hiddenzones_df (pandas.DataFrame) – CN-Wheat outputs at hidden zone scale (see
HIDDENZONE_RUN_POSTPROCESSING_VARIABLES)organs_df (pandas.DataFrame) – CN-Wheat outputs at organ scale (see
ORGANS_RUN_POSTPROCESSING_VARIABLES)elements_df (pandas.DataFrame) – CN-Wheat outputs at element scale (see
ELEMENTS_RUN_POSTPROCESSING_VARIABLES)soils_df (pandas.DataFrame) – CN-Wheat outputs at soil scale (see
SOILS_RUN_POSTPROCESSING_VARIABLES)graphs_dirpath (str) – the path of the directory to save the generated graphs in
- openalea.cnwheat.postprocessing.postprocessing(plants_df=None, axes_df=None, metamers_df=None, hiddenzones_df=None, organs_df=None, elements_df=None, soils_df=None, delta_t=1)[source]#
Compute post-processing from CN-Wheat outputs, and format the post-processing to
dataframes.For each post-processing output dataframe:
compute post-processing from CN-Wheat outputs,
concatenate CN-Wheat outputs and post-processing and place the results in a jointed dataframe,
reorder the columns of the dataframes according to
PLANTS_RUN_POSTPROCESSING_VARIABLES,AXES_RUN_POSTPROCESSING_VARIABLES,PHYTOMERS_RUN_POSTPROCESSING_VARIABLES,ORGANS_RUN_POSTPROCESSING_VARIABLES,HIDDENZONE_RUN_POSTPROCESSING_VARIABLES,ELEMENTS_RUN_POSTPROCESSING_VARIABLESandSOILS_RUN_POSTPROCESSING_VARIABLES,and convert the indexes of plants and metamers to integers (if relevant).
- Parameters:
plants_df (pandas.DataFrame) – CN-Wheat outputs at plant scale (see
simulation.Simulation.PLANTS_RUN_VARIABLES)axes_df (pandas.DataFrame) – CN-Wheat outputs at axis scale (see
simulation.Simulation.AXES_RUN_VARIABLES)metamers_df (pandas.DataFrame) – CN-Wheat outputs at phytomer scale (see
simulation.Simulation.PHYTOMERS_RUN_VARIABLES)hiddenzones_df (pandas.DataFrame) – CN-Wheat outputs at hidden zone scale (see
simulation.Simulation.HIDDENZONE_RUN_VARIABLES)organs_df (pandas.DataFrame) – CN-Wheat outputs at organ scale (see
simulation.Simulation.ORGANS_RUN_VARIABLES)elements_df (pandas.DataFrame) – CN-Wheat outputs at element scale (see
simulation.Simulation.ELEMENTS_RUN_VARIABLES)soils_df (pandas.DataFrame) – CN-Wheat outputs at soil scale (see
simulation.Simulation.SOILS_RUN_VARIABLES)delta_t (float) – Delta t between 2 outputs (in seconds).
- Returns:
- post-processing for each scale:
plant (see
PLANTS_RUN_POSTPROCESSING_VARIABLES)axis (see
AXES_RUN_POSTPROCESSING_VARIABLES)metamer (see
PHYTOMERS_RUN_POSTPROCESSING_VARIABLES)organ (see
ORGANS_RUN_POSTPROCESSING_VARIABLES)hidden zone (see
HIDDENZONE_RUN_POSTPROCESSING_VARIABLES)element (see
ELEMENTS_RUN_POSTPROCESSING_VARIABLES)and soil (see
SOILS_RUN_POSTPROCESSING_VARIABLES)
depending of the dataframes given as argument. For example, if user passes only dataframes plants_df, axes_df and metamers_df, then only post-processing dataframes of plants, axes and metamers are returned.
- Return type:
tuple [pandas.DataFrame]