Reference guide#
This manual details, for each module of openalea.cnwgrass.growth,
the functions and objects included in openalea.cnwgrass.growth,
describing what they are and what they do.
openalea.cnwgrass.growth package#
growth#
The model Growth.
Mechanistic model of wheat growth. See:
growth.simulationfor the front-end of the model,
growth.modelfor the equations of the model,
growth.parametersfor the parameters of the model.
openalea.cnwgrass.growth.model module#
- class openalea.cnwgrass.growth.model.GrowthModel[source]#
Bases:
object- calculate_delta_Nstruct(delta_mstruct)[source]#
delta Nstruct of hidden zone and emerged tissue (lamina and sheath).
- static calculate_delta_emerged_tissue_mstruct(SW, previous_mstruct, metric)[source]#
delta mstruct of emerged tissue (lamina, sheath and internode). Calculated from tissue area.
- Parameters:
SW (float) – For Lamina : Structural Specific Weight (g m-2); For sheath and internode : Lineic Structural Weight (g m-1)
previous_mstruct (float) – mstruct at the previous time step i.e. not yet updated (g)
metric (float) – For Lamina : Area at the current time step, as updated by the geometrical model (m2); For sheath and internode : Length at the current time step (m)
- Returns:
delta mstruct (g)
- Return type:
- calculate_delta_internode_enclosed_mstruct(internode_L, delta_internode_L, ratio_mstruct_DM)[source]#
Relation between length and mstruct for the internode segment located in the hidden zone. Same relationship than for enclosed leaf corrected by RATIO_ENCLOSED_LEAF_INTERNODE. Parameters alpha_mass_growth and beta_mass_growth estimated from Williams (1975) and expressed in g of dry mass. The actual ratio_mstruct_DM is then used to convert in g of structural dry mass.
- calculate_delta_internode_enclosed_mstruct_postL(delta_internode_pseudo_age, internode_pseudo_age, internode_L, internode_pseudostem_L, internode_Lmax, LSIW, enclosed_mstruct)[source]#
mstruct of the enclosed internode from the ligulation of the leaf to the end of elongation. Final mstruct of the enclosed internode matches internode mstruct calculation when it is mature.
- Parameters:
delta_internode_pseudo_age (float) – Delta of Pseudo age of the internode since beginning of automate elongation (s)
internode_pseudo_age (float) – Pseudo age of the internode since beginning of automate elongation (s)
internode_L (float) – Current length of the internode (m)
internode_pseudostem_L (float) – Pseudostem length of the internode (m)
internode_Lmax (float) – Final length of the internode (m)
LSIW (float) – Lineic Structural Internode Weight (g m-1)
enclosed_mstruct (float) – mstruct of the enclosed leaf (g)
- Returns:
delta_internode_enclosed_mstruct (g)
- Return type:
- calculate_delta_leaf_enclosed_mstruct(leaf_L, delta_leaf_L, ratio_mstruct_DM, init_leaf_L=None, leaf_pseudo_age=None)[source]#
Relation between length and mstruct for the leaf segment located in the hidden zone during the exponential-like growth phase. Parameters alpha_mass_growth and beta_mass_growth estimated from Williams (1960) and expressed in g of dry mass The actual ratio_mstruct_DM is then used to convert in g of structural dry mass.
- Parameters:
leaf_L (float) – Total leaf length (m)
delta_leaf_L (float) – delta of leaf length (m)
ratio_mstruct_DM (float) – Ratio mstruct/dry matter (dimensionless)
init_leaf_L (float) – Total leaf length before update in Hydraulics sub-model (m). Not used in this instance of the model
leaf_pseudo_age (float) – Pseudo age of the leaf since beginning of automate elongation (s). Not used in this instance of the model
- Returns:
delta_leaf_enclosed_mstruct (g)
- Return type:
- calculate_delta_leaf_enclosed_mstruct_postE(delta_leaf_pseudo_age, leaf_pseudo_age, leaf_pseudostem_L, enclosed_mstruct, LSSW, sucrose, mstruct)[source]#
mstruct of the enclosed leaf from the emergence of the leaf to the end of elongation. Final mstruct of the enclosed leaf matches sheath mstruct calculation when it is mature. #TODO : Hiddenzone mstruct calculation is not correct for sheath shorten than previous one. :param float delta_leaf_pseudo_age: Delta of Pseudo age of the leaf since beginning of automate elongation (s) :param float leaf_pseudo_age: Pseudo age of the leaf since beginning of automate elongation (s) :param float leaf_pseudostem_L: Pseudostem length (m) :param float enclosed_mstruct: mstruct of the enclosed leaf (g) :param float LSSW: Lineic Structural Sheath Weight (g m-1) :param float sucrose: Sucrose amount (µmol C) :param float mstruct: Structural mass (g)
- Returns:
delta_leaf_enclosed_mstruct (g)
- Return type:
- static calculate_export(delta_mstruct, metabolite, hiddenzone_mstruct)[source]#
Export of metabolite from the hidden zone towards the emerged part of the leaf integrated over delta_t.
- calculate_init_cytokinins_emerged_tissue(delta_mstruct)[source]#
Initial amount of cytokinins allocated in the mstruct of a newly emerged tissue.
- static calculate_ratio_mstruct_DM(mstruct, sucrose, fructans, amino_acids, proteins)[source]#
Ratio mstruct/dry matter (dimensionless)
- calculate_roots_mstruct_growth(sucrose, amino_acids, mstruct, delta_teq, postflowering_stages, nb_leaves, xylem_water_potential=None)[source]#
Root structural dry mass growth integrated over delta_t
- Parameters:
sucrose (float) – Amount of sucrose in roots (µmol C)
amino_acids (float) – Amount of amino acids in roots (µmol N)
mstruct (float) – Root structural mass (g)
delta_teq (float) – Time compensated for the effect of temperature - Time equivalent at Tref (s)
postflowering_stages (bool) – Option : True to run a simulation with postflo parameter
nb_leaves (int) – Current number of leaves on the axis
xylem_water_potential (float) – Water potential of xylem (Mpa)
- Returns:
mstruct_C_growth (µmol C), mstruct_growth (g), Nstruct_growth (g), Nstruct_N_growth (µmol N)
- Return type:
- calculate_roots_s_mstruct_sucrose(delta_roots_mstruct, s_Nstruct_amino_acids_N)[source]#
Consumption of sucrose for the calculated mstruct growth (µmol C consumed by mstruct growth)
- static calculate_s_Nstruct_amino_acids(delta_hiddenzone_Nstruct, delta_lamina_Nstruct, delta_sheath_Nstruct, delta_internode_Nstruct)[source]#
Consumption of amino acids for the calculated mstruct growth (µmol N consumed by mstruct growth)
- Parameters:
- Returns:
Amino acid consumption (µmol N)
- Return type:
- calculate_s_mstruct_sucrose(delta_hiddenzone_mstruct, delta_lamina_mstruct, delta_sheath_mstruct, s_Nstruct_amino_acids_N)[source]#
Consumption of sucrose for the calculated mstruct growth (µmol C consumed by mstruct growth)
- Parameters:
- Returns:
Sucrose consumption (µmol C)
- Return type:
- static calculate_sheath_mstruct(sheath_L, LSSW)[source]#
mstruct of the sheath. Final mstruct of the enclosed leaf matches sheath mstruct calculation when it is mature.
the outputs computed by Growth
- class openalea.cnwgrass.growth.model.GrowthModelHydraulics[source]#
Bases:
GrowthModel- calculate_delta_leaf_enclosed_mstruct(leaf_L, delta_leaf_L, ratio_mstruct_DM, init_leaf_L=0, leaf_pseudo_age=0)[source]#
Relation between length and mstruct for the leaf segment located in the hidden zone during the exponential-like growth phase. Parameters alpha_mass_growth and beta_mass_growth estimated from Williams (1960) and expressed in g of dry mass The actual ratio_mstruct_DM is then used to convert in g of structural dry mass.
- Parameters:
leaf_L (float) – Total leaf length after update in Hydraulics sub-model (m)
delta_leaf_L (float) – delta of leaf length (m)
ratio_mstruct_DM (float) – Ratio mstruct/dry matter (dimensionless)
init_leaf_L (float) – Total leaf length before update in Hydraulics sub-model (m)
leaf_pseudo_age (float) – Pseudo age of the leaf since beginning of automate elongation (s)
- Returns:
delta_leaf_enclosed_mstruct (g)
- Return type:
- calculate_roots_mstruct_growth(sucrose, amino_acids, mstruct, delta_teq, postflowering_stages, nb_leaves=None, xylem_water_potential=0)[source]#
Root structural dry mass growth integrated over delta_t
- Parameters:
sucrose (float) – Amount of sucrose in roots (µmol C)
amino_acids (float) – Amount of amino acids in roots (µmol N)
mstruct (float) – Root structural mass (g)
delta_teq (float) – Time compensated for the effect of temperature - Time equivalent at Tref (s)
postflowering_stages (bool) – Option : True to run a simulation with postflo parameter
nb_leaves (int) – Current number of leaves on the axis
xylem_water_potential (float) – Water potential of xylem (Mpa)
- Returns:
mstruct_C_growth (µmol C), mstruct_growth (g), Nstruct_growth (g), Nstruct_N_growth (µmol N)
- Return type:
openalea.cnwgrass.growth.simulation module#
- class openalea.cnwgrass.growth.simulation.Simulation(delta_t=1, hydraulics=False, update_parameters=None)[source]#
Bases:
objectThe Simulation class permits to initialize and run a simulation.
- axis_inputs#
The inputs and outputs of Growth at each scale.
- delta_t#
the delta t of the simulation (in seconds)
- hydraulics#
Checks whether the Hydraulic version should be used
- inputs#
inputs is a dictionary of dictionaries: {‘hiddenzone’: {(plant_index, axis_label, metamer_index): {hiddenzone_input_name: hiddenzone_input_value, …}, …},
‘elements’: {(plant_index, axis_label, metamer_index, organ_label, element_label): {organ_input_name: organ_input_value, …}, …}, ‘roots’: {(plant_index, axis_label): {root_input_name: root_input_value, …}, …}}
- outputs#
outputs is a dictionary of dictionaries: {‘hiddenzone’: {(plant_index, axis_label, metamer_index): {hiddenzone_input_name: hiddenzone_input_value, …}, …},
‘elements’: {(plant_index, axis_label, metamer_index, organ_label, element_label): {organ_input_name: organ_input_value, …}, …} ‘roots’: {(plant_index, axis_label): {root_input_name: root_input_value, …}, …}}
- exception openalea.cnwgrass.growth.simulation.SimulationRunError[source]#
Bases:
SimulationError
openalea.cnwgrass.growth.converter module#
- openalea.cnwgrass.growth.converter.HIDDENZONE_TOPOLOGY_COLUMNS = ['plant', 'axis', 'metamer']#
the columns which define the topology in the input/output dataframe
- openalea.cnwgrass.growth.converter.from_dataframes(hiddenzone_inputs, element_inputs, root_inputs, axis_inputs)[source]#
Convert inputs/outputs from Pandas dataframe to Growth format.
- Parameters:
hiddenzone_inputs (pandas.DataFrame) – Hidden zone inputs dataframe to convert, with one line by hidden zone.
element_inputs (pandas.DataFrame) – Element inputs dataframe to convert, with one line by element.
root_inputs (pandas.DataFrame) – Root inputs dataframe to convert, with one line by root.
axis_inputs (pandas.DataFrame) – axis inputs dataframe to convert, with one line by axis.
- Returns:
The inputs in a dictionary.
- Return type:
see also:: see
simulation.Simulation.inputsfor the structure of Growth inputs.
- openalea.cnwgrass.growth.converter.to_dataframes(data_dict, axis_outputs, hiddenzone_outputs, element_outputs, root_outputs)[source]#
Convert outputs from Growth format to Pandas dataframe.
- Parameters:
data_dict (dict) – The outputs in Morphogenesis format.
axis_outputs (list) – The list of output names for axes
hiddenzone_outputs (list) – The list of output names for hiddenzones
element_outputs (list) – The list of output names for elements
root_outputs (list) – The list of output names for roots
- Returns:
Four dataframes : for hiddenzone outputs, element outputs, roots outputs and axes outputs
- Return type:
pandas.DataFrame
openalea.cnwgrass.growth.parameters module#
- openalea.cnwgrass.growth.parameters.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)
- openalea.cnwgrass.growth.parameters.CONVERSION_FACTOR_20_TO_12 = 0.45#
modified_Arrhenius_equation(12)/modified_Arrhenius_equation(20)
- openalea.cnwgrass.growth.parameters.C_MOLAR_MASS = 12#
Carbon molar mass (g mol-1)
- openalea.cnwgrass.growth.parameters.HEXOSE_MOLAR_MASS_C_RATIO = 0.42#
Contribution of C in hexose mass
- openalea.cnwgrass.growth.parameters.MINERAL_LIVING_TISSUE = 0.05#
Mineral content of the structural mass (g g-1 mstruct) (Thornley and Cannell, 2000)
- openalea.cnwgrass.growth.parameters.MINERAL_SENESCED_TISSUE = 0.025#
Mineral content of the structural mass of a senescent tissue (g g-1 mstruct) (Thornley and Cannell, 2000)
- openalea.cnwgrass.growth.parameters.N_MOLAR_MASS = 14#
Nitrogen molar mass (g mol-1)
- class openalea.cnwgrass.growth.parameters.OrganInit[source]#
Bases:
objectInitial values for organs
- Nresidual#
g
- Nstruct#
g
- amino_acids#
µmol N
- conc_cytokinins#
AU / g mstruct # Not used
- cytokinins#
g
- fructan#
µmol C
- green_area#
m2
- mstruct#
g
- nitrates#
µmol N
- proteins#
µmol N
- senesced_length_element#
m
- senesced_mstruct#
g
- sucrose#
µmol C
- openalea.cnwgrass.growth.parameters.PROTEINS_MOLAR_MASS_N_RATIO = 0.151#
Mean contribution of N in protein mass (Penning De Vries 1989)
- class openalea.cnwgrass.growth.parameters.Parameters[source]#
Bases:
object- AMINO_ACIDS_C_RATIO#
Mean number of mol of C in 1 mol of the major amino acids of plants (Glu, Gln, Ser, Asp, Ala, Gly) from (Penning de Vries, Witlage and Kremer, 1978)
- AMINO_ACIDS_N_RATIO#
Mean number of mol of N in 1 mol of the major amino acids of plants (Glu, Gln, Ser, Asp, Ala, Gly) from (Penning de Vries, Witlage and Kremer, 1978)
- BETA#
Parameter of the relation between leaf mass and leaf length (dimensionless)
- FITTED_L0#
Fitted value of leaf length at t=0 after rescaling the beta function with L0 (m); Fournier 2005 sur courbe corrigee
- FITTED_L0_IN#
Scaling factor of the internode in automate growth (dimensionless), fitted from Malvoisin 1984 II
- INIT_CYTOKININS_EMERGED_TISSUE#
Initial concentration of cytokinins allocated in the mstruct of a newly emerged tissue (AU g-1)
- K_ROOTS_GROWTH_POSTFLO#
Affinity coefficient of root structural dry matter growth (µmol C g-1 MS) post flo
- K_ROOTS_GROWTH_PREFLO#
Affinity coefficient of root structural dry matter growth (µmol C g-1 MS) pre flo
- RATIO_AMINO_ACIDS_MSTRUCT#
Mass of N (under amino acid/protein form, g) in 1 g of mstruct (Penning de Vries, Witlage and Kremer, 1978)
- RATIO_ENCLOSED_LEAF_INTERNODE#
lamina of the specific structural dry masses (from data of J. Bertheloot, 2004)
- Type:
We use ratio sheath
- RATIO_MSTRUCT_DM#
Ratio mstruct/dry matter (dimensionless)
- RATIO_SUCROSE_MSTRUCT#
0.384 from (Penning de Vries, Witlage and Kremer, 1978), 0.444 for cellulose (about 45% C in
- Type:
Mass of C (under carbohydrate form, g) in 1 g of mstruct
- VMAX_ROOTS_GROWTH_POSTFLO#
Maximal rate of root structural dry matter growth (µmol C s-1 g-1 MS) post flo at 12°C
- VMAX_ROOTS_GROWTH_PREFLO#
Maximal rate of root structural dry matter growth (µmol C s-1 g-1 MS) pre flo at 12°C
- VMAX_ROOTS_GROWTH_SEMINALS#
Maximal rate of root structural dry matter growth used during seed emergence (µmol C s-1 g-1 MS). Deals with the transition from seminal to nodal roots.
- conc_sucrose_offset#
sucrose concentration under which no root growth occurs (µmol of C g-1 mstruct) - same for leaf and internode growth, see morphogenesis
- te#
end of leaf elongation in automate growth (s at 12°c); fitted from adapted data from Fournier 2005
- te_IN#
end of internode elongation in automate growth (s at 12°c) ; fitted from Malvoisin 1984 II
- class openalea.cnwgrass.growth.parameters.ParametersHydraulics[source]#
Bases:
Parameters- K_ROOTS_GROWTH#
Affinity coefficient of root structural dry matter growth (µmol C g-1 MS) post flo
- n#
Shape parameter of hydraulic regulation of root growth (-)
- te_IN#
end of internode elongation in automate growth; Ljutovac 2002, 250pl.m-2
- water_potential_crit#
Critical xylem water potential at which root growth is reduced by 50% (Sharp et al., 2004)
- openalea.cnwgrass.growth.parameters.RATIO_C_MSTRUCT_ROOTS = 0.444#
same as shoot
- Type:
Mean contribution of carbon to root structural dry mass (g C g-1 Mstruct)
- openalea.cnwgrass.growth.parameters.RATIO_N_MSTRUCT_ROOTS = 0.005#
same as shoot
- Type:
Mean contribution of nitrogen to root structural dry mass (g N g-1 Mstruct)
- openalea.cnwgrass.growth.parameters.parameters_factory(hydraulics=False)[source]#
Factory for parameter instantiation according to the version of the model used
- Parameters:
hydraulics (bool) – if True the model will assume the coupling to the turgor-driven growth model
- Returns:
Instance of Parameters oo ParametersHydraulics