Reference guide#

This manual details, for each module of openalea.cnwgrass.cnmetabolism, the functions and objects included in openalea.cnwgrass.cnmetabolism, describing what they are and what they do.

openalea.cnwgrass.cnmetabolism package#

openalea.cnwgrass.cnmetabolism.simulation module#

class openalea.cnwgrass.cnmetabolism.simulation.Simulation(respiration_model, delta_t=1, culm_density=None, interpolate_forcing=False, senescence_forcing_delta_t=None, photosynthesis_forcing_delta_t=None, external_soil_model=False)[source]#

Bases: object

The Simulation class permits to initialize and run the model.

User should use method initialize() to initialize the model, and method run() to run the model.

Parameters:
  • respiration_model (class) –

    the model of respiration to use. This model must define a class implementing these functions: * R_Nnit_upt(U_Nnit, sucrose): Nitrate uptake respiration.

    • Parameters:
      • U_Nnit (float) - uptake of N nitrates (µmol` N)

      • sucrose (float) - amount of C sucrose in organ (µmol` C)

    • Returns: _R_Nnit_upt (µmol` C respired)

    • Returns Type: float

    • R_phloem(sucrose_loading, sucrose, mstruct): Phloem loading respiration
      • Parameters:
        • sucrose_loading (float) - Loading flux from the C substrate pool to phloem (µmol` C g-1 mstruct)

        • sucrose (float) - amount of C sucrose in organ (µmol` C)

        • mstruct (float) - structural dry mass of organ (g)

      • Returns: _R_phloem (µmol` C respired)

      • Returns Type: float

    • 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…)
      • Parameters:
        • sucrose (float) - amount of C sucrose (µmol` C)

        • mstruct (float) - structural dry mass of organ (g)

        • Ntot (float) - total N in organ (µmol` N)

        • delta_t (float) - timestep (s)

        • Ts (float) - organ temperature (°C)

      • Returns: _R_residual (µmol` C respired)

      • Returns Type: float

    • R_grain_growth(mstruct_growth, starch_filling, mstruct): Grain growth respiration
      • Parameters:
        • mstruct_growth (float) - gross growth of grain structure (µmol` C added in grain structure)

        • starch_filling (float) - gross growth of grain starch (µmol` C added in grain starch g-1 mstruct)

        • mstruct (float) - structural dry mass of organ (g)

      • Returns: R_grain_growth (µmol` C respired)

      • Returns Type: float

  • delta_t (int) – the delta t of the simulation (in seconds) ; default is 1.

  • culm_density (dict [int, int]) – culm density (culm m-2).

  • interpolate_forcing (bool) – if True: interpolate senescence and photosynthesis forcing from values of senescence_forcing_delta_t`and `senescence_forcing_delta_t. Default is False (do not interpolate the forcing).

  • senescence_forcing_delta_t (int) –

    the delta t of the senescence forcing (in seconds) ; default is None.

    If the user sets interpolate_forcing to True, then he/she must also set senescence_forcing_delta_t to an integer value greater or equal to delta_t. For example, if interpolate_forcing is True and delta_t==3600, then senescence_forcing_delta_t must be greater or equal to 3600, that is for example 7200.

    param int photosynthesis_forcing_delta_t:
    the delta t of the photosynthesis forcing (in seconds) ; default is None.

    If the user sets interpolate_forcing to True, then he/she must also set photosynthesis_forcing_delta_t to an integer value greater or equal to delta_t. For example, if interpolate_forcing is True and delta_t==3600, then photosynthesis_forcing_delta_t must be greater or equal to 3600, that is for example 7200.

    • interpolate_forcing (bool) - if True: interpolate senescence and photosynthesis forcing from values of senescence_forcing_delta_t and senescence_forcing_delta_t. Default is False (do not interpolate the forcing).

    • senescence_forcing_delta_t (int) - the delta t of the senescence forcing (in seconds) ; default is None. If the user sets interpolate_forcing to True, then he/she must also set senescence_forcing_delta_t to an integer value greater or equal to delta_t. For example, if interpolate_forcing is True and delta_t==3600, then senescence_forcing_delta_t must be greater or equal to 3600, that is for example 7200.

    • photosynthesis_forcing_delta_t (int) - the delta t of the photosynthesis forcing (in seconds) ; default is None. If the user sets interpolate_forcing to True, then he/she must also set photosynthesis_forcing_delta_t to an integer value greater or equal to delta_t. For example, if interpolate_forcing is True and delta_t==3600, then photosynthesis_forcing_delta_t must be greater or equal to 3600, that is for example 7200.

  • external_soil_model (bool) – whether an external soil model is coupled to cnmetabolism. If True, cnmetabolism will skip calculations made in soil and uptake N by roots

ALL_STATE_PARAMETERS = {<class 'openalea.cnwgrass.cnmetabolism.model.Axis'>: ['mstruct', 'SAM_temperature', 'nb_leaves', 'status'], <class 'openalea.cnwgrass.cnmetabolism.model.HiddenZone'>: ['Nstruct', 'mstruct', 'ratio_DZ', 'is_over'], <class 'openalea.cnwgrass.cnmetabolism.model.Organ'>: ['mstruct', 'Nstruct', 'senesced_mstruct'], <class 'openalea.cnwgrass.cnmetabolism.model.PhotosyntheticOrganElement'>: ['Ag', 'Nstruct', 'Tr', 'Ts', 'green_area', 'is_growing', 'mstruct', 'senesced_mstruct'], <class 'openalea.cnwgrass.cnmetabolism.model.Phytomer'>: ['mstruct'], <class 'openalea.cnwgrass.cnmetabolism.model.Plant'>: [], <class 'openalea.cnwgrass.cnmetabolism.model.Soil'>: ['Tsoil', 'volume', 'SRWC']}#

a dictionary of all the variables which define the state of the modelled 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 modelled 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', 'SAM_temperature', 'nb_leaves', 'status', 'Total_Transpiration']#

all the variables computed during a run step of the simulation at axis scale

AXES_STATE = ['mstruct', 'SAM_temperature', 'nb_leaves', 'status']#

the variables which define the state of the modelled system at axis scale, formed be the concatenation of AXES_STATE_PARAMETERS and the names of the compartments associated to each axis (see MODEL_COMPARTMENTS_NAMES)

AXES_STATE_PARAMETERS = ['mstruct', 'SAM_temperature', 'nb_leaves', 'status']#

the parameters which define the state of the modelled system at axis scale

AXES_T_INDEXES = ['t', 'plant', 'axis']#

concatenation of T_INDEX and AXES_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_INDEXES = ['plant', 'axis', 'metamer', 'organ', 'element']#

the indexes to locate the elements in the modelled 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_forcing = ('Ag', 'Tr', 'Ts')#

the names of the elements photosynthesis forcing

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_forcing = ('Nstruct', 'green_area', 'mstruct')#

the names of the elements senescence forcing

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 modelled system at element scale, formed be the concatenation of ELEMENTS_STATE_PARAMETERS and the names of the compartments associated to each element (see MODEL_COMPARTMENTS_NAMES)

ELEMENTS_STATE_PARAMETERS = ['Ag', 'Nstruct', 'Tr', 'Ts', 'green_area', 'is_growing', 'mstruct', 'senesced_mstruct']#

the parameters which define the state of the modelled system at element scale

ELEMENTS_T_INDEXES = ['t', 'plant', 'axis', 'metamer', 'organ', 'element']#

concatenation of T_INDEX and ELEMENTS_INDEXES

ELEMENTS_forcing = ('Ag', 'Tr', 'Ts', 'Nstruct', 'green_area', 'mstruct')#

the names of the elements photosynthesis and senescence forcing

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 modelled system

HIDDENZONE_INTEGRATIVE_VARIABLES = []#

the variables computed by integrating values of hidden zone components parameters/variables recursively

HIDDENZONE_INTERMEDIATE_VARIABLES = ['Respi_growth', 'R_residual', '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', 'is_over', 'amino_acids', 'fructan', 'proteins', 'sucrose', 'Respi_growth', 'R_residual', '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 plant scale

HIDDENZONE_STATE = ['Nstruct', 'mstruct', 'ratio_DZ', 'is_over', 'amino_acids', 'fructan', 'proteins', 'sucrose']#

the variables which define the state of the modelled system at hidden zone scale, formed be the concatenation of HIDDENZONE_STATE_PARAMETERS and the names of the compartments associated to each hidden zone (see MODEL_COMPARTMENTS_NAMES)

HIDDENZONE_STATE_PARAMETERS = ['Nstruct', 'mstruct', 'ratio_DZ', 'is_over']#

the parameters which define the state of the modelled system at hidden zone scale

HIDDENZONE_T_INDEXES = ['t', 'plant', 'axis', 'metamer']#

concatenation of T_INDEX and HIDDENZONE_INDEXES

LOGGERS_NAMES = {'compartments': {<class 'openalea.cnwgrass.cnmetabolism.model.Axis'>: 'cnmetabolism.compartments.axes', <class 'openalea.cnwgrass.cnmetabolism.model.HiddenZone'>: 'cnmetabolism.compartments.hiddenzones', <class 'openalea.cnwgrass.cnmetabolism.model.Organ'>: 'cnmetabolism.compartments.organs', <class 'openalea.cnwgrass.cnmetabolism.model.PhotosyntheticOrganElement'>: 'cnmetabolism.compartments.elements', <class 'openalea.cnwgrass.cnmetabolism.model.Phytomer'>: 'cnmetabolism.compartments.phytomers', <class 'openalea.cnwgrass.cnmetabolism.model.Plant'>: 'cnmetabolism.compartments.plants', <class 'openalea.cnwgrass.cnmetabolism.model.Soil'>: 'cnmetabolism.compartments.soils'}, 'derivatives': {<class 'openalea.cnwgrass.cnmetabolism.model.Axis'>: 'cnmetabolism.derivatives.axes', <class 'openalea.cnwgrass.cnmetabolism.model.HiddenZone'>: 'cnmetabolism.derivatives.hiddenzones', <class 'openalea.cnwgrass.cnmetabolism.model.Organ'>: 'cnmetabolism.derivatives.organs', <class 'openalea.cnwgrass.cnmetabolism.model.PhotosyntheticOrganElement'>: 'cnmetabolism.derivatives.elements', <class 'openalea.cnwgrass.cnmetabolism.model.Phytomer'>: 'cnmetabolism.derivatives.phytomers', <class 'openalea.cnwgrass.cnmetabolism.model.Plant'>: 'cnmetabolism.derivatives.plants', <class 'openalea.cnwgrass.cnmetabolism.model.Soil'>: 'cnmetabolism.derivatives.soils'}}#

the name of the loggers for compartments and derivatives

MODEL_COMPARTMENTS_NAMES = {<class 'openalea.cnwgrass.cnmetabolism.model.Axis'>: [], <class 'openalea.cnwgrass.cnmetabolism.model.HiddenZone'>: ['amino_acids', 'fructan', 'proteins', 'sucrose'], <class 'openalea.cnwgrass.cnmetabolism.model.Organ'>: ['age_from_flowering', 'amino_acids', 'cytokinins', 'nitrates', 'proteins', 'starch', 'structure', 'sucrose', 'moistening'], <class 'openalea.cnwgrass.cnmetabolism.model.PhotosyntheticOrganElement'>: ['amino_acids', 'cytokinins', 'fructan', 'nitrates', 'proteins', 'starch', 'sucrose', 'triosesP'], <class 'openalea.cnwgrass.cnmetabolism.model.Phytomer'>: [], <class 'openalea.cnwgrass.cnmetabolism.model.Plant'>: [], <class 'openalea.cnwgrass.cnmetabolism.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, and model.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', 'D_starch', 'D_proteins']#

the fluxes exchanged between the compartments at organ scale

ORGANS_INDEXES = ['plant', 'axis', 'organ']#

the indexes to locate the organs in the modelled 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', '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', 'moistening', 'C_exudation', 'HATS_LATS', 'N_exudation', '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', 'D_starch', 'D_proteins', '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', 'moistening']#

the variables which define the state of the modelled system at organ scale, formed be the concatenation of ORGANS_STATE_PARAMETERS and the names of the compartments associated to each organ (see MODEL_COMPARTMENTS_NAMES)

ORGANS_STATE_PARAMETERS = ['mstruct', 'Nstruct', 'senesced_mstruct']#

the parameters which define the state of the modelled system at organ scale

ORGANS_T_INDEXES = ['t', 'plant', 'axis', 'organ']#

concatenation of T_INDEX and ORGANS_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 modelled 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 modelled system at phytomer scale, formed be the concatenation of PHYTOMERS_STATE_PARAMETERS and the names of the compartments associated to each phytomer (see MODEL_COMPARTMENTS_NAMES)

PHYTOMERS_STATE_PARAMETERS = ['mstruct']#

the parameters which define the state of the modelled system at phytomer scale

PHYTOMERS_T_INDEXES = ['t', 'plant', 'axis', 'metamer']#

concatenation of T_INDEX and PHYTOMERS_INDEXES

PLANTS_FLUXES = []#

the fluxes exchanged between the compartments at plant scale

PLANTS_INDEXES = ['plant']#

the index to locate the plants in the modelled 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 = []#

all the variables computed during a run step of the simulation at plant scale

PLANTS_STATE = []#

the variables which define the state of the modelled system at plant scale, formed be the concatenation of PLANTS_STATE_PARAMETERS and the names of the compartments associated to each plant (see MODEL_COMPARTMENTS_NAMES)

PLANTS_STATE_PARAMETERS = []#

the parameters which define the state of the modelled system at plant scale

PLANTS_T_INDEXES = ['t', 'plant']#

concatenation of T_INDEX and PLANTS_INDEXES

ROOTS_forcing = ('Nstruct', 'mstruct')#

the names of the roots (senescence) forcing

SOILS_FLUXES = []#

the fluxes exchanged between the compartments at soil scale

SOILS_INDEXES = ['plant', 'axis']#

the indexes to locate the soils in the modelled 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', 'SRWC', 'nitrates', 'Conc_Nitrates_Soil', 'mineralisation']#

all the variables computed during a run step of the simulation at soil scale

SOILS_STATE = ['Tsoil', 'volume', 'SRWC', 'nitrates']#

the variables which define the state of the modelled system at soil scale, formed be the concatenation of SOILS_STATE_PARAMETERS and the names of the compartments associated to each soil (see MODEL_COMPARTMENTS_NAMES)

SOILS_STATE_PARAMETERS = ['Tsoil', 'volume', 'SRWC']#

the parameters which define the state of the modelled system at soil scale

SOILS_T_INDEXES = ['t', 'plant', 'axis']#

concatenation of T_INDEX and SOILS_INDEXES

T_INDEX = ['t']#

the time index

culm_density#

culm density (culm m-2)

delta_t#

the delta t of the simulation (in seconds)

external_soil_model#

a boolean flag which indicates if an external soil model is coupled to cnmetabolism.

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, 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 soils

  • Tsoil (float) – soil temperature (°C)

interpolate_forcing#

do not interpolate)

Type:

a boolean flag which indicates if we want to interpolate or not the forcing (True

Type:

interpolate, False

interpolation_functions#

functions to interpolate the forcing

new_forcing_values#

new values of the forcing

nfev_total#

cumulative number of RHS function evaluations

photosynthesis_forcing_delta_t_ratio#

ratio between delta t of the photosynthesis forcing and the delta t of the simulation

population#

the population to simulate on

previous_forcing_values#

previous values of the forcing

respiration_model#

the model of respiration to use

run()[source]#

Compute CN exchanges which occurred in population and soils over delta_t.

senescence_forcing_delta_t_ratio#

ratio between the delta t of the senescence forcing and the delta t of the simulation

soils#

The inputs of the soils.

soils is a dictionary of objects of type model.Soil:

{(plant_index, axis_label): soil_object, …}

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.cnwgrass.cnmetabolism.simulation.SimulationConstructionError[source]#

Bases: SimulationError

Exception raised when a problem occurs in the constructor, in particular when the arguments are not consistent with each other.

exception openalea.cnwgrass.cnmetabolism.simulation.SimulationError[source]#

Bases: Exception

Abstract class for the management of simulation errors. Do not instance it directly.

exception openalea.cnwgrass.cnmetabolism.simulation.SimulationInitializationError[source]#

Bases: SimulationError

Exception raised when a problem occurs at initialization time, in particular when checking the consistency of inputs population and soils (see initialize()).

exception openalea.cnwgrass.cnmetabolism.simulation.SimulationRunError[source]#

Bases: SimulationError

Exception raised when running a simulation, for example when a problem occurs during the integration of the system of differential equations.

openalea.cnwgrass.cnmetabolism.model module#

class openalea.cnwgrass.cnmetabolism.model.Axis(label=None, roots=None, phloem=None, grains=None, endosperm=None, phytomers=None, status='vegetative', SAM_temperature=12, C_exuded=0, sum_respi_shoot=0, sum_respi_roots=0.001, nb_leaves=11)[source]#

Bases: object

The class Axis defines the CN exchanges at axis scale.

An axis must have:

.

INIT_COMPARTMENTS = <openalea.cnwgrass.cnmetabolism.parameters.AxisInitCompartments object>#

the initial values of compartments and state parameters

PARAMETERS = <openalea.cnwgrass.cnmetabolism.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.

endosperm#

the endosperm

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)

class openalea.cnwgrass.cnmetabolism.model.Chaff(label=None, exposed_element=None, enclosed_element=None)[source]#

Bases: PhotosyntheticOrgan

The class Chaff defines the CN exchanges in a chaff.

PARAMETERS = <openalea.cnwgrass.cnmetabolism.parameters.ChaffParameters object>#

the internal parameters of the chaffs

class openalea.cnwgrass.cnmetabolism.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: PhotosyntheticOrganElement

The class ChaffElement defines the CN exchanges in a chaff element.

PARAMETERS = <openalea.cnwgrass.cnmetabolism.parameters.ChaffElementParameters object>#

the internal parameters of the chaffs elements

class openalea.cnwgrass.cnmetabolism.model.EcophysiologicalConstants[source]#

Bases: object

Ecophysiological 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.cnwgrass.cnmetabolism.model.Endosperm(label='endosperm', starch=0, proteins=0, mstruct=0, moistening=1)[source]#

Bases: Organ

The class Endosperm defines the CN exchanges from the seed during germination.

D_proteins#

current degradation of proteins integrated over a delta t (µmol` N g-1)

D_starch#

current degradation of starch integrated over a delta t (µmol` C g-1)

PARAMETERS = <openalea.cnwgrass.cnmetabolism.parameters.EndospermParameters object>#

the internal parameters of seed endosperm

R_residual#

maintenance respiration of endosperm (µmol` C respired)

static calculate_D_proteins(proteins, T_effect_Vmax)[source]#

Protein degradation in seed endosperm.

Parameters:
  • proteins (float) – Protein amount in endosperm (µmol` N)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Proteins degradation (µmol` N h-1)

Return type:

float

static calculate_D_starch(starch, T_effect_Vmax)[source]#

Rate of starch degradation from seed endosperm (µmol` C starch h-1). First order kinetic.

Parameters:
  • starch (float) – Amount of starch (µmol` C)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Starch degradation (µmol` C h-1)

Return type:

float

static calculate_moistening()[source]#
static calculate_proteins_derivative(D_Proteins)[source]#

delta proteins of seed endosperm.

Parameters:

D_Proteins (float) – Degradation of proteins in endosperm (µmol` N g-1)

Returns:

delta grain proteins (µmol` N proteins)

Return type:

float

static calculate_starch_derivative(D_grain_starch, R_residual)[source]#

delta starch of seed endosperm.

Parameters:
  • D_grain_starch (float) – Degradation of starch in endosperm (µmol` C g-1 h-1)

  • R_residual (float) – Residual respiration (maintenance) of the seed (µmol` C respired)

Returns:

delta seed starch (µmol` C starch)

Return type:

float

calculate_temperature_effect_on_growth(Tair)[source]#

Effect of the temperature on seed. 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 Morphogenesis. Should multiply the rate at 20°C

Parameters:

Tair (float) – Air temperature(°C)

Returns:

Correction to apply to endosperm remobilisation (dimensionless)

Return type:

float

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.

Parameters:

temperature (float) – organ temperature (degree Celsius)

Returns:

Return value of Eyring equation from Johnson and Lewin (1946) for temperature (dimensionless). The equation is modified to return zero below zero degree.

Return type:

float

mstruct#

g of MS (~ pericarp)

proteins#

µmol` of N (endosperm)

starch#

µmol` of C starch (endosperm)

class openalea.cnwgrass.cnmetabolism.model.Grains(label='grains', age_from_flowering=0, starch=0, structure=1, proteins=0)[source]#

Bases: Organ

The class Grains defines 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.cnwgrass.cnmetabolism.parameters.GrainsInitCompartments object>#

the initial values of compartments and state parameters

PARAMETERS = <openalea.cnwgrass.cnmetabolism.parameters.GrainsParameters object>#

the internal parameters of the grains

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

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:
  • sucrose_phloem (float) – Sucrose amount in phloem (µmol` C)

  • mstruct_axis (float) – The structural dry mass of the axis (g)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Rate of Synthesis of grain starch (µmol` C g-1 mstruct h-1)

Return type:

float

calculate_S_grain_structure(prec_structure, sucrose_phloem, mstruct_axis, T_effect_growth)[source]#

Rate of grain structure synthesis (µmol` C structure h-1). Exponential function, RGR regulated by sucrose concentration in the phloem.

Parameters:
  • prec_structure (float) – Grain structure at t-1 (µmol` C)

  • sucrose_phloem (float) – Sucrose amount in phloem (µmol` C)

  • mstruct_axis (float) – The structural dry mass of the axis (g)

  • T_effect_growth (float) – Effect of the temperature on the growth rate at 20°C (AU)

Returns:

Rate of Synthesis of grain structure (µmol` C h-1)

Return type:

float

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:

float

static calculate_proteins_derivative(S_Proteins)[source]#

delta grain proteins.

Parameters:

S_Proteins (float) – Synthesis of grain proteins (µmol` N)

Returns:

delta grain proteins (µmol` N proteins)

Return type:

float

static calculate_starch_derivative(S_grain_starch, structural_dry_mass, R_growth)[source]#

delta grain starch.

Parameters:
  • S_grain_starch (float) – Synthesis of grain starch (µmol` C g-1 mstruct)

  • structural_dry_mass (float) – Grain structural dry mass (g)

  • R_growth (float) – Grain growth respiration (µmol` C respired)

Returns:

delta grain starch (µmol` C starch)

Return type:

float

static calculate_structural_dry_mass(structure)[source]#

Grain structural dry mass.

Parameters:

structure (float) – Grain structural C mass (µmol` C)

Returns:

Grain structural dry mass (g)

Return type:

float

static calculate_structure_derivative(S_grain_structure, R_growth)[source]#

delta grain structure.

Parameters:
  • S_grain_structure (float) – Synthesis of grain structure (µmol` C)

  • R_growth (float) – Grain growth respiration (µmol` C respired)

Returns:

delta grain structure (µmol` C structure)

Return type:

float

calculate_temperature_effect_on_growth(SAM_temperature)[source]#

Effect of the temperature on grain growth. 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 Morphogenesis. Should multiply the rate at 20°C

Parameters:

SAM_temperature (float) – Temperature of the Shoot Apical Meristem (°C)

Returns:

Correction to apply to RGR Structure of the grains (dimensionless)

Return type:

float

initialize()[source]#

Initialize the derived attributes of the organ.

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.

Parameters:

temperature (float) – organ temperature (degree Celsius)

Returns:

Return value of Eyring equation from Johnson and Lewin (1946) for temperature (dimensionless). The equation is modified to return zero below zero degree.

Return type:

float

proteins#

µmol` of N proteins

starch#

µmol` of C starch

structural_dry_mass#

g of MS

structure#

µmol` of C sucrose

class openalea.cnwgrass.cnmetabolism.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, is_over=False, cohorts=None, cohorts_replications=None, index=None)[source]#

Bases: Organ

The class HiddenZone defines the CN exchanges in a hidden zone.

D_Fructan#

fructan degradation (µmol` C g-1 mstruct)

D_Proteins#

protein degradation (µmol` N g-1 mstruct)

INIT_COMPARTMENTS = <openalea.cnwgrass.cnmetabolism.parameters.HiddenZoneInitCompartments object>#

the initial values of compartments and state parameters

Nstruct#

g

PARAMETERS = <openalea.cnwgrass.cnmetabolism.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).

Parameters:
  • sucrose (float) – Amount of sucrose (µmol` C)

  • fructan (float) – Amount of fructan (µmol` C)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Rate of Fructan degradation (µmol` C g-1 mstruct)

Return type:

float

calculate_D_Proteins(proteins, T_effect_Vmax)[source]#

Rate of protein degradation (µmol` N proteins h-1 g-1 MS). First order kinetic

Parameters:
  • proteins (float) – Protein amount in the hidden zone (µmol` N)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Rate of Protein degradation (µmol` N g-1 mstruct h-1)

Return type:

float

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 (“switch-off” sigmoïdal kinetic).

Parameters:

Unloading_Sucrose (float) – Sucrose unloading (µmol` C)

Returns:

Maximal rate of fructan synthesis (µmol` C g-1 mstruct)

Return type:

float

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:
  • sucrose (float) – Amount of sucrose (µmol` C)

  • Regul_S_Fructan (float) – Maximal rate of fructan synthesis regulated by sucrose loading (µmol` C g-1 mstruct)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Rate of Fructan synthesis (µmol` C g-1 mstruct)

Return type:

float

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.

Parameters:
  • amino_acids (float) – Amino acid amount in the hidden zone (µmol` N)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Rate of Protein synthesis (µmol` N g-1 mstruct h-1)

Return type:

float

static calculate_Total_Organic_Nitrogen(amino_acids, proteins, Nstruct)[source]#

Total amount of organic N (amino acids + proteins + Nstruct). Used to calculate residual respiration.

Parameters:
  • amino_acids (float) – Amount of amino acids (µmol` N)

  • proteins (float) – Amount of proteins (µmol` N)

  • Nstruct (float) – Structural N mass (g)

Returns:

Total amount of organic N (µmol` N)

Return type:

float

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:
  • amino_acids (float) – Amino_acids amount in the hidden zone (µmol` N)

  • amino_acids_phloem (float) – Amino_acids amount in phloem (µmol` N)

  • mstruct_axis (float) – The structural dry mass of the axis (g)

  • T_effect_conductivity (float) – Effect of the temperature on the conductivity rate at 20°C (AU)

Returns:

Rate of Amino_acids Unloading (µmol` N h-1)

Return type:

float

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:
  • sucrose (float) – Sucrose amount in the hidden zone (µmol` C)

  • sucrose_phloem (float) – Sucrose amount in phloem (µmol` C)

  • mstruct_axis (float) – The structural dry mass of the axis (g)

  • T_effect_conductivity (float) – Effect of the temperature on the conductivity rate at 20°C (AU)

Returns:

Rate of Sucrose Unloading (µmol` C h-1)

Return type:

float

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:
  • Unloading_Amino_Acids (float) – Amino acids unloaded (µmol` N)

  • S_Proteins (float) – Protein synthesis (µmol` N g-1 mstruct)

  • D_Proteins (float) – Protein degradation (µmol` N g-1 mstruct)

  • hiddenzone_Loading_Amino_Acids_contribution (float) – Amino acids imported from the emerged tissues (µmol` N)

Returns:

delta amino acids (µmol` N amino acids)

Return type:

float

calculate_fructan_derivative(S_Fructan, D_Fructan)[source]#

delta fructans of hidden zone.

Parameters:
  • S_Fructan (float) – Fructans synthesis (µmol` C g-1 mstruct)

  • D_Fructan (float) – Fructans degradation (µmol` C g-1 mstruct)

Returns:

delta fructans (µmol` C fructans)

Return type:

float

calculate_proteins_derivative(S_Proteins, D_Proteins)[source]#

delta proteins of hidden zone.

Parameters:
  • S_Proteins (float) – Protein synthesis (µmol` N g-1 mstruct)

  • D_Proteins (float) – Protein degradation (µmol` N g-1 mstruct)

Returns:

delta proteins (µmol` N proteins)

Return type:

float

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:

float

cohorts#

list of cohort values

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.cnwgrass.cnmetabolism.model.Internode(label=None, exposed_element=None, enclosed_element=None)[source]#

Bases: PhotosyntheticOrgan

The class Internode defines the CN exchanges in an internode.

PARAMETERS = <openalea.cnwgrass.cnmetabolism.parameters.InternodeParameters object>#

the internal parameters of the internodes

class openalea.cnwgrass.cnmetabolism.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: PhotosyntheticOrganElement

The class InternodeElement defines the CN exchanges in an internode element.

PARAMETERS = <openalea.cnwgrass.cnmetabolism.parameters.InternodeElementParameters object>#

the internal parameters of the internodes elements

class openalea.cnwgrass.cnmetabolism.model.Lamina(label=None, exposed_element=None, enclosed_element=None)[source]#

Bases: PhotosyntheticOrgan

The class Lamina defines the CN exchanges in a lamina.

PARAMETERS = <openalea.cnwgrass.cnmetabolism.parameters.LaminaParameters object>#

the internal parameters of the laminae

class openalea.cnwgrass.cnmetabolism.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: PhotosyntheticOrganElement

The class LaminaElement defines the CN exchanges in a lamina element.

PARAMETERS = <openalea.cnwgrass.cnmetabolism.parameters.LaminaElementParameters object>#

the internal parameters of the laminae elements

class openalea.cnwgrass.cnmetabolism.model.Organ(label)[source]#

Bases: object

The class Organ defines the CN exchanges at organ scale.

Organ is the base class of all organs. DO NOT INSTANTIATE IT.

calculate_aggregated_variables()[source]#

Calculate the integrative variables of the organ recursively.

initialize()[source]#

Initialize the derived attributes of the organ.

label#

the label of the organ

class openalea.cnwgrass.cnmetabolism.model.Peduncle(label=None, exposed_element=None, enclosed_element=None)[source]#

Bases: PhotosyntheticOrgan

The class Peduncle defines the CN exchanges in a peduncle.

PARAMETERS = <openalea.cnwgrass.cnmetabolism.parameters.PeduncleParameters object>#

the internal parameters of the peduncles

class openalea.cnwgrass.cnmetabolism.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: PhotosyntheticOrganElement

The class PeduncleElement defines the CN exchanges in a peduncle element.

PARAMETERS = <openalea.cnwgrass.cnmetabolism.parameters.PeduncleElementParameters object>#

the internal parameters of the peduncles elements

class openalea.cnwgrass.cnmetabolism.model.Phloem(label='phloem', sucrose=500, amino_acids=100)[source]#

Bases: Organ

The class Phloem defines the CN exchanges in a phloem.

INIT_COMPARTMENTS = <openalea.cnwgrass.cnmetabolism.parameters.PhloemInitCompartments object>#

the initial values of compartments and state parameters

PARAMETERS = <openalea.cnwgrass.cnmetabolism.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, Endosperm]) – Organs exchanging N with the phloem

Returns:

delta amino acids (µmol` N amino acids)

Return type:

float

static calculate_sucrose_derivative(contributors)[source]#

delta sucrose

Parameters:

contributors (list [PhotosyntheticOrganElement, Grains, Roots, HiddenZone, Endosperm]) – Organs exchanging C with the phloem

Returns:

delta sucrose (µmol` C sucrose)

Return type:

float

sucrose#

µmol` C sucrose

class openalea.cnwgrass.cnmetabolism.model.PhotosyntheticOrgan(label, exposed_element, enclosed_element)[source]#

Bases: Organ

The class PhotosyntheticOrgan defines the CN exchanges in a photosynthetic organ.

A photosynthetic organ must have at least 1 photosynthetic organ element: chaff element, lamina element, internode element, peduncle element, or sheath element.

PhotosyntheticOrgan is the base class of all photosynthetic organs. DO NOT INSTANTIATE IT.

PARAMETERS = <openalea.cnwgrass.cnmetabolism.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#

nitrates (µmol N)

senesced_mstruct#

senesced structural dry mass

class openalea.cnwgrass.cnmetabolism.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: object

The class PhotosyntheticOrganElement defines 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).

PhotosyntheticOrganElement is 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.cnwgrass.cnmetabolism.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.cnwgrass.cnmetabolism.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.

Parameters:
  • roots_exported_amino_acids (float) – Exported amino acids by roots (µmol` N)

  • element_transpiration (float) – Element transpiration (mmol H2O s-1)

  • Total_Transpiration (float) – Culm transpiration (mmol H2O s-1)

Returns:

Total amino acids import (µmol` N amino acids)

Return type:

float

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).

Parameters:
  • sucrose (float) – Amount of sucrose (µmol` C)

  • fructan (float) – Amount of fructan (µmol` C)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Rate of Fructan degradation (µmol` C g-1 mstruct h-1)

Return type:

float

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.

Parameters:
  • proteins (float) – Amount of proteins (µmol` N)

  • cytokinins (float) – Amount of cytokinins (AU)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Rate of protein degradation (µmol` N g-1 mstruct)

Return type:

float

calculate_D_Starch(starch, T_effect_Vmax)[source]#

Rate of starch degradation (µmol` C starch g-1 mstruct h-1). First order kinetic.

Parameters:
  • starch (float) – Amount of starch (µmol` C)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Starch degradation (µmol` C g-1 mstruct h-1)

Return type:

float

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.

Parameters:
  • cytokinins (float) – Amount of cytokinins (AU)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Rate of Cytokinin degradation (AU g-1 mstruct h-1)

Return type:

float

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:

float

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:
  • amino_acids (float) – Amount of amino acids in the element (µmol` N)

  • amino_acids_phloem (float) – Amount of amino acids in the phloem (µmol` N)

  • mstruct_axis (float) – Structural dry mass of the axis (g)

  • T_effect_conductivity (float) – Effect of the temperature on the conductivity rate at 20°C (AU)

Returns:

Amino acids loading (µmol` N h-1)

Return type:

float

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:
  • sucrose (float) – Amount of sucrose in the element (µmol` C)

  • sucrose_phloem (float) – Amount of sucrose in the phloem (µmol` C)

  • mstruct_axis (float) – Structural dry mass of the axis (g)

  • T_effect_conductivity (float) – Effect of the temperature on the conductivity rate at 20°C (AU)

Returns:

Rate of Sucrose loading (µmol` C h-1)

Return type:

float

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.

Parameters:
  • Export_Nitrates (float) – Exported nitrates by roots (µmol` N)

  • element_transpiration (float) – Element transpiration (mmol H2O s-1)

  • Total_Transpiration (float) – Culm transpiration (mmol H2O s-1)

Returns:

Total nitrates import (µmol` N nitrates)

Return type:

float

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 (“switch-off” sigmoïdal kinetic).

Parameters:

Loading_Sucrose (float) – Sucrose loading (µmol` C)

Returns:

Maximal rate of fructan synthesis (µmol` C g-1 mstruct h-1)

Return type:

float

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:
  • sucrose (float) – Amount of sucrose (µmol` C)

  • Regul_S_Fructan (float) – Maximal rate of fructan synthesis regulated by sucrose loading (µmol` C g-1 mstruct)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Rate of Fructan synthesis (µmol` C g-1 mstruct h-1)

Return type:

float

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.

Parameters:
  • triosesP (float) – Amount of triose phosphates (µmol` C)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Rate of Starch synthesis (µmol` C g-1 mstruct h-1)

Return type:

float

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.

Parameters:
  • triosesP (float) – Amount of triose phosphates (µmol` C)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Rate of Sucrose synthesis (µmol` C g-1 mstruct h-1)

Return type:

float

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.

Parameters:
  • nitrates (float) – Amount of nitrates (µmol` N)

  • triosesP (float) – Amount of triosesP (µmol` C)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Rate of Amino acids synthesis (µmol` N h-1 g-1 mstruct)

Return type:

float

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.

Parameters:
  • amino_acids (float) – Amount of amino acids (µmol` N)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Protein synthesis (µmol` N h-1 g-1 mstruct)

Return type:

float

static calculate_Total_Organic_Nitrogen(amino_acids, proteins, Nstruct)[source]#

Total amount of organic N (amino acids + proteins + Nstruct). Used to calculate residual respiration.

Parameters:
  • amino_acids (float) – Amount of amino acids (µmol` N)

  • proteins (float) – Amount of proteins (µmol` N)

  • Nstruct (float) – Structural N mass (g)

Returns:

Total amount of organic N (µmol` N)

Return type:

float

static calculate_Total_Transpiration(Tr, green_area)[source]#

Surfacic transpiration rate of an element

Parameters:
  • Tr (float) – Transpiration rate (mmol H2O m-2 s-1)

  • green_area (float) – Green area (m2)

Returns:

Total transpiration (mmol H2O s-1)

Return type:

float

calculate_aggregated_variables()[source]#

Calculate the integrative variables of the 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:

float

calculate_cytokinins_derivative(import_cytokinins, D_cytokinins, phyto_id, cytokinins)[source]#

delta cytokinins of element.

Parameters:
  • import_cytokinins (float) – Cytokinin import (AU)

  • D_cytokinins (float) – Cytokinin degradation (AU g-1 mstruct)

  • phyto_id (int) – phytomer index

  • cytokinins (float) – Cytokinin amount (AU)

Returns:

delta cytokinins (AU cytokinins)

Return type:

float

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.

Parameters:
  • roots_exported_cytokinins (float) – Exported cytokinins from roots (AU)

  • element_transpiration (float) – Element transpiration (mmol H2O s-1)

  • Total_Transpiration (float) – Culm transpiration (mmol H2O s-1)

Returns:

Cytokinin import (AU)

Return type:

float

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:
  • sucrose (float) – Amount of sucrose in the element (µmol` C)

  • sucrose_hiddenzone (float) – Sucrose amount in the hidden zone (µmol` C)

  • 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 Sucrose export (µmol` C h-1)

Return type:

float

calculate_fructan_derivative(S_Fructan, D_Fructan)[source]#

delta fructan of element.

Parameters:
  • S_Fructan (float) – Fructan synthesis (µmol` C g-1 mstruct)

  • D_Fructan (float) – Fructan degradation (µmol` C g-1 mstruct)

Returns:

delta fructan (µmol` C fructan)

Return type:

float

calculate_nitrates_derivative(Nitrates_import, S_Amino_Acids)[source]#

delta nitrates of element.

Parameters:
  • Nitrates_import (float) – Nitrate import from roots (µmol` N)

  • S_Amino_Acids (float) – Amino acids synthesis (µmol` N g-1 mstruct)

Returns:

delta nitrates (µmol` N nitrates)

Return type:

float

calculate_proteins_derivative(S_Proteins, D_Proteins)[source]#

delta proteins of element.

Parameters:
  • S_Proteins (float) – Protein synthesis (µmol` N g-1 mstruct)

  • D_Proteins (float) – Protein degradation (µmol` N g-1 mstruct)

Returns:

delta proteins (µmol` N proteins)

Return type:

float

calculate_starch_derivative(S_Starch, D_Starch)[source]#

delta starch of element.

Parameters:
  • S_Starch (float) – Starch synthesis (µmol` C g-1 mstruct)

  • D_Starch (float) – Starch degradation (µmol` C g-1 mstruct)

Returns:

delta starch (µmol` C starch)

Return type:

float

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:

float

static calculate_total_Photosynthesis(Ag, green_area)[source]#

Total Photosynthesis of an element (µmol` C m-2 h-1 * m2).

Parameters:
  • Ag (float) – Gross Photosynthesis rate (µmol` C m-2 s-1)

  • green_area (float) – Green area (m2)

Returns:

Rate of Total Photosynthesis (µmol` C h-1)

Return type:

float

calculate_triosesP_derivative(Photosynthesis, S_Sucrose, S_Starch, S_Amino_Acids)[source]#

delta triose phosphates of element.

Parameters:
  • Photosynthesis (float) – Total gross Photosynthesis (µmol` C)

  • S_Sucrose (float) – Sucrose synthesis (µmol` C g-1 mstruct)

  • S_Starch (float) – Starch synthesis (µmol` C g-1 mstruct)

  • S_Amino_Acids (float) – Amino acids synthesis (µmol` N g-1 mstruct)

Returns:

delta triose phosphates (µmol` C triose phosphates)

Return type:

float

cohorts#

list of cohort values

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

is_growing#

Flag indicating if the element is growing or not (bool)

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.cnwgrass.cnmetabolism.model.Phytomer(index=None, chaff=None, peduncle=None, lamina=None, internode=None, sheath=None, hiddenzone=None, cohorts=None, cohorts_replications=None)[source]#

Bases: object

The class Phytomer defines the CN exchanges at phytomer scale.

A phytomer must have at least:

PARAMETERS = <openalea.cnwgrass.cnmetabolism.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#

list of cohort values

cohorts_replications#

dictionary of number of replications per cohort rank

hiddenzone#

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

class openalea.cnwgrass.cnmetabolism.model.Plant(index=None, axes=None)[source]#

Bases: object

The class Plant defines the CN exchanges at plant scale.

A plant must have at least one axis.

PARAMETERS = <openalea.cnwgrass.cnmetabolism.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

Parameters:

Tair (float) – Air temperature (°C)

Returns:

Correction to apply to enzyme activity

Return type:

float

static calculate_temperature_effect_on_conductivity(Tair)[source]#

Effect of the temperature on phloem translocation conductivity (Farrar 1988) Should multiply the rate at 20°C

Parameters:

Tair (float) – Air temperature (°C)

Returns:

Correction to apply to conductivity coefficients.

Return type:

float

cohorts#

TEMPORARY

Type:

list of cohort values - Hack to treat tillering cases

index#

the index of the plant

class openalea.cnwgrass.cnmetabolism.model.Population(plants=None)[source]#

Bases: object

The class Population defines the CN exchanges at population scale.

A population must have at least one plant.

PARAMETERS = <openalea.cnwgrass.cnmetabolism.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.cnwgrass.cnmetabolism.model.Roots(label='roots', mstruct=0.15, senesced_mstruct=0, Nstruct=0.0045, sucrose=0, nitrates=0, amino_acids=0, cytokinins=0)[source]#

Bases: Organ

The class Roots defines 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.cnwgrass.cnmetabolism.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.cnwgrass.cnmetabolism.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.

Parameters:
  • amino_acids (float) – Amount of amino acids in roots (µmol` N)

  • regul_transpiration (float) – Regulating factor by transpiration (mmol H2O m-2 s-1)

Returns:

Rate of Export of amino acids (µmol` N h-1)

Returns Type:

float

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.

Parameters:
  • nitrates (float) – Amount of nitrates in roots (µmol` N)

  • regul_transpiration (float) – Regulating factor by transpiration (mmol H2O m-2 s-1)

Returns:

Rate of Export of nitrates (µmol` N h-1)

Return type:

float

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.

Parameters:
  • cytokinins (float) – Amount of cytokinins in roots (AU)

  • regul_transpiration (float) – Regulating factor by transpiration (mmol H2O m-2 s-1)

Returns:

Rate of Cytokinin export (AU h-1)

Return type:

float

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.

Parameters:
  • nitrates (float) – Amount of nitrates in roots (µmol` N)

  • sucrose (float) – Amount of sucrose in roots (µmol` C)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Amino acids synthesis (µmol` N g-1 mstruct h-1)

Return type:

float

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 to have a neglected effect on sucrose. Thus, no cost in C is applied to the sucrose pool.

Parameters:
  • sucrose_roots (float) – Amount of sucrose in roots (µmol` C)

  • nitrates_roots (float) – Amount of nitrates in roots (µmol` N)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Rate of Cytokinin synthesis (AU g-1 mstruct h-1)

Return type:

float

static calculate_Total_Organic_Nitrogen(amino_acids, Nstruct)[source]#

Total amount of organic N (amino acids + Nstruct). Used to calculate residual respiration.

Parameters:
  • amino_acids (float) – Amount of amino acids (µmol` N)

  • Nstruct (float) – Structural N mass (g)

Returns:

Total amount of organic N (µmol` N)

Return type:

float

calculate_Unloading_Amino_Acids(amino_acids_roots, amino_acids_phloem, sucrose_phloem, Unloading_Sucrose, mstruct_axis, T_effect_conductivity)[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:
  • Unloading_Sucrose (float) – Sucrose Unloading (µmol` C g-1 mstruct)

  • sucrose_phloem (float) – Sucrose concentration in phloem (µmol` C g-1 mstruct)

  • amino_acids_phloem (float) – Amino acids concentration in phloem (µmol` N g-1 mstruct)

Returns:

Amino acids Unloading (µmol` N g-1 mstruct)

Return type:

float

calculate_Unloading_Sucrose(sucrose_roots, sucrose_phloem, mstruct_axis, T_effect_conductivity, nb_leaves)[source]#

Rate of sucrose Unloading from phloem to roots (µmol` C sucrose unloaded g-1 mstruct h-1).

Parameters:
  • sucrose_roots (float) – Amount of sucrose in roots (µmol` C)

  • sucrose_phloem (float) – Sucrose concentration in phloem (µmol` C g-1 mstruct)

  • mstruct_axis (float) – The structural dry mass of the axis (g)

  • T_effect_conductivity (float) – Effect of the temperature on the conductivity rate at 20°C (AU)

  • nb_leaves (int) – Number of leaves

Returns:

Rate of Sucrose Unloading (µmol` C g-1 mstruct h-1)

Return type:

float

calculate_Uptake_Nitrates(Conc_Nitrates_Soil, nitrates_roots, sucrose_roots, T_effect_Vmax, SRWC=100)[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 sucrose concentration (positive regulation)

Parameters:
  • Conc_Nitrates_Soil (float) – Soil nitrate concentration Unloading (µmol` N m-3 soil)

  • nitrates_roots (float) – Amount of nitrates in roots (µmol` N)

  • sucrose_roots (float) – Amount of sucrose in roots (µmol` C)

  • T_effect_Vmax (float) – Correction to apply to enzyme activity

  • SRWC (float) – Soil Relative Water Content (%)

Returns:

Nitrate uptake (µmol` N nitrates) and nitrate influxes HATS and LATS (µmol` N h-1)

Return type:

(float, float)

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:
  • Unloading_Amino_Acids (float) – Amino acids Unloading (µmol` N g-1 mstruct)

  • S_Amino_Acids (float) – Amino acids synthesis (µmol` N g-1 mstruct)

  • Export_Amino_Acids (float) – Export of amino acids (µmol` N)

  • N_exudation (float) – N exuded (µmol` g-1 mstruct)

Returns:

delta root amino acids (µmol` N amino acids)

Return type:

float

calculate_cytokinins_derivative(S_cytokinins, Export_cytokinins, cytokinins, empty_endosperm)[source]#

delta root cytokinins.

Parameters:
  • S_cytokinins (float) – Cytokinin synthesis (AU g-1 mstruct)

  • Export_cytokinins (float) – Cytokinin export (AU)

  • cytokinins (float) – Amount of cytokinins in roots (AU)

  • empty_endosperm (bool) – If the starch and proteins of the endosperm have been fully hydrolysed or not

Returns:

delta root cytokinins (AU cytokinins)

Return type:

float

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:
  • Unloading_Sucrose (float) – Sucrose Unloading (µmol` C g-1 mstruct h-1)

  • sucrose_roots (float) – Amount of sucrose in roots (µmol` C)

  • amino_acids_roots (float) – Amount of amino acids in roots (µmol` N)

  • amino_acids_phloem (float) – Amount of amino acids in phloem (µmol` N)

Returns:

Rates of C exuded (µmol` C g-1 mstruct h-1) and N_exudation (µmol` N g-1 mstruct h-1)

Return type:

(float, float)

calculate_nitrates_derivative(Uptake_Nitrates, Export_Nitrates, S_Amino_Acids)[source]#

delta root nitrates.

Parameters:
  • Uptake_Nitrates (float) – Nitrate uptake (µmol` N nitrates)

  • Export_Nitrates (float) – Export of nitrates (µmol` N)

  • S_Amino_Acids (float) – Amino acids synthesis (µmol` N g-1 mstruct)

Returns:

delta root nitrates (µmol` N nitrates)

Return type:

float

static calculate_regul_transpiration(total_transpiration)[source]#

A function to regulate metabolite exports from roots by shoot transpiration

Parameters:

total_transpiration (float) – Total transpiration (mmol s-1)

Returns:

Dimensionless regulating factor

Return type:

float

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:

float

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.cnwgrass.cnmetabolism.model.Sheath(label=None, exposed_element=None, enclosed_element=None)[source]#

Bases: PhotosyntheticOrgan

The class Sheath defines the CN exchanges in a sheath.

PARAMETERS = <openalea.cnwgrass.cnmetabolism.parameters.SheathParameters object>#

the internal parameters of the sheaths

class openalea.cnwgrass.cnmetabolism.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: PhotosyntheticOrganElement

The class SheathElement defines the CN exchanges in a sheath element.

PARAMETERS = <openalea.cnwgrass.cnmetabolism.parameters.SheathElementParameters object>#

the internal parameters of the sheaths elements

class openalea.cnwgrass.cnmetabolism.model.Soil(volume=None, nitrates=None, Tsoil=12, SRWC=100)[source]#

Bases: object

The class Soil defines 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.cnwgrass.cnmetabolism.parameters.SoilParameters object>#

the internal parameters of the soil

calculate_Conc_Nitrates(nitrates)[source]#

Nitrate concentration in soil.

Parameters:

nitrates (float) – Amount of nitrates (µmol` N)

Returns:

Nitrate concentration (µmol` nitrates m-3)

Return type:

float

static calculate_mineralisation(T_effect_Vmax)[source]#

Mineralisation on organic N into nitrates in soil.

Parameters:

T_effect_Vmax (float) – Correction to apply to enzyme activity

Returns:

Rate of Nitrate mineralisation (µmol` h-1)

Return type:

float

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:

float

static calculate_temperature_effect_on_Vmax(Tsoil)[source]#

Effect of the temperature on maximal enzyme activity Should multiply the rate at 20°C

Parameters:

Tsoil (float) – Soil temperature (°C)

Returns:

Correction to apply to enzyme activity

Return type:

float

static calculate_temperature_effect_on_conductivity(Tsoil)[source]#

Effect of the temperature on phloem translocation conductivity (Farrar 1988) Should multiply the rate at 20°C

Parameters:

Tsoil (float) – Soil temperature (°C)

Returns:

Correction to apply to conductivity coefficients.

Return type:

float

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`)

openalea.cnwgrass.cnmetabolism.parameters module#

automodule:: openalea.cnwgrass.cnmetabolism.parameters
members:

undoc-members:

show-inheritance:

synopsis:

openalea.cnwgrass.cnmetabolism.tools module#

openalea.cnwgrass.cnmetabolism.tools.OUTPUTS_INDEXES = ['t', 'plant', 'axis', 'metamer', 'organ', 'element']#

All the possible indexes of CN-Metabolism outputs

openalea.cnwgrass.cnmetabolism.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 cnmetabolism.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.cnwgrass.cnmetabolism.converter module#

openalea.cnwgrass.cnmetabolism.converter.AXES_VARIABLES = ['plant', 'axis', 'mstruct', 'SAM_temperature', 'nb_leaves', 'status', 'Total_Transpiration']#

the columns of the outputs dataframe at AXIS scale

openalea.cnwgrass.cnmetabolism.converter.CNMETABOLISM_CLASSES_TO_DATAFRAME_ORGANS_MAPPING = {<class 'openalea.cnwgrass.cnmetabolism.model.Chaff'>: 'ear', <class 'openalea.cnwgrass.cnmetabolism.model.Endosperm'>: 'endosperm', <class 'openalea.cnwgrass.cnmetabolism.model.Grains'>: 'grains', <class 'openalea.cnwgrass.cnmetabolism.model.HiddenZone'>: 'hiddenzone', <class 'openalea.cnwgrass.cnmetabolism.model.Internode'>: 'internode', <class 'openalea.cnwgrass.cnmetabolism.model.Lamina'>: 'blade', <class 'openalea.cnwgrass.cnmetabolism.model.Peduncle'>: 'peduncle', <class 'openalea.cnwgrass.cnmetabolism.model.Phloem'>: 'phloem', <class 'openalea.cnwgrass.cnmetabolism.model.Roots'>: 'roots', <class 'openalea.cnwgrass.cnmetabolism.model.Sheath'>: 'sheath'}#

the mapping of the CN-Metabolism organ classes to organ names in MTG

openalea.cnwgrass.cnmetabolism.converter.DATAFRAME_TO_CNMETABOLISM_ELEMENTS_NAMES_MAPPING = {'HiddenElement': 'enclosed_element', 'LeafElement1': 'exposed_element', 'StemElement': 'exposed_element'}#

the mapping of the name of each element, from Dataframe to CN-Metabolism

openalea.cnwgrass.cnmetabolism.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.cnwgrass.cnmetabolism.converter.HIDDENZONE_VARIABLES = ['plant', 'axis', 'metamer', 'Nstruct', 'mstruct', 'ratio_DZ', 'is_over', 'amino_acids', 'fructan', 'proteins', 'sucrose', 'Respi_growth', 'R_residual', '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.cnwgrass.cnmetabolism.converter.ORGANS_VARIABLES = ['plant', 'axis', 'organ', 'mstruct', 'Nstruct', 'senesced_mstruct', 'age_from_flowering', 'amino_acids', 'cytokinins', 'nitrates', 'proteins', 'starch', 'structure', 'sucrose', 'moistening', 'C_exudation', 'HATS_LATS', 'N_exudation', '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', 'D_starch', 'D_proteins', 'Total_Organic_Nitrogen']#

the columns of the outputs dataframe at ORGAN scale

openalea.cnwgrass.cnmetabolism.converter.PHYTOMERS_VARIABLES = ['plant', 'axis', 'metamer', 'mstruct']#

the columns of the outputs dataframe at PHYTOMER scale

openalea.cnwgrass.cnmetabolism.converter.PLANTS_VARIABLES = ['plant']#

the columns of the outputs dataframe at PLANT scale

openalea.cnwgrass.cnmetabolism.converter.SOILS_VARIABLES = ['plant', 'axis', 'Tsoil', 'volume', 'SRWC', 'nitrates', 'Conc_Nitrates_Soil', 'mineralisation']#

the columns of the outputs dataframe at SOIL scale

openalea.cnwgrass.cnmetabolism.converter.from_dataframes(axes_inputs=None, 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 of soils.

Parameters:
  • axes_inputs (pandas.DataFrame) – Organs inputs, with one line by axis.

  • 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 or None) – 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 a dict of soils.

Return type:

(pandas.DataFrame, dict) or dict

openalea.cnwgrass.cnmetabolism.converter.to_dataframes(population=None, soils=None)[source]#

Convert a CN-Metabolism population and/or a dictionary of soils to 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-Metabolism population to convert.

  • soils (dict) – The soils to convert.

Returns:

If population is not None, return dataframes describing 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 (see ORGANS_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 dataframe describing 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.cnwgrass.cnmetabolism.postprocessing module#

openalea.cnwgrass.cnmetabolism.postprocessing.AXES_INDEXES = ['plant', 'axis']#

the indexes to locate the axes in the modelled system

openalea.cnwgrass.cnmetabolism.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', 'C_exuded']#

axes post-processing variables

openalea.cnwgrass.cnmetabolism.postprocessing.AXES_RUN_POSTPROCESSING_VARIABLES = {'C_N_ratio', 'C_N_ratio_shoot', 'C_exuded', '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', 'SAM_temperature', 'Tillers_Photosynthesis', 'Tillers_Photosynthesis_An', 'Total_Photosynthesis', 'Total_Transpiration', 'axis', 'dry_mass_phloem', 'mstruct', 'mstruct_laminae', 'mstruct_shoot', 'mstruct_stem', 'nb_leaves', 'plant', 'shoot_roots_mstruct_ratio', 'shoot_roots_ratio', 'status', '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', 't'}#

concatenation of AXES_T_INDEXES, AXES_RUN_VARIABLES and AXES_POSTPROCESSING_VARIABLES

openalea.cnwgrass.cnmetabolism.postprocessing.AXES_T_INDEXES = ['t', 'plant', 'axis']#

concatenation of T_INDEX and AXES_INDEXES

openalea.cnwgrass.cnmetabolism.postprocessing.ELEMENTS_INDEXES = ['plant', 'axis', 'metamer', 'organ', 'element']#

the indexes to locate the elements in the modelled system

openalea.cnwgrass.cnmetabolism.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.cnwgrass.cnmetabolism.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_VARIABLES and ELEMENTS_POSTPROCESSING_VARIABLES

openalea.cnwgrass.cnmetabolism.postprocessing.ELEMENTS_T_INDEXES = ['t', 'plant', 'axis', 'metamer', 'organ', 'element']#

concatenation of T_INDEX and ELEMENTS_INDEXES

class openalea.cnwgrass.cnmetabolism.postprocessing.Element[source]#

Bases: object

Post-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 or pandas.Series) – Amount of triose phosphates (µmol` C)

  • sucrose (float or pandas.Series) – Amount of sucrose (µmol` C)

  • starch (float or pandas.Series) – Amount of starch (µmol` C)

  • fructan (float or pandas.Series) – Amount of fructan (µmol` C)

  • amino_acids (float or pandas.Series) – Amount of amino acids (µmol` N)

  • proteins (float or pandas.Series) – Amount of proteins (µmol` N)

  • mstruct (float or pandas.Series) – structural mass (g)

Returns:

Dry mass (g)

Return type:

float

static calculate_Conc_Amino_Acids(amino_acids, mstruct)[source]#

Amino_acid concentration.

Parameters:
  • amino_acids (float or pandas.Series) – Amount of amino acids (µmol` N)

  • mstruct (float or pandas.Series) – Structural mass

Returns:

Amino_acid concentration (µmol` amino acids g-1 mstruct)

Return type:

float

static calculate_Conc_Nitrates(nitrates, mstruct)[source]#

Nitrate concentration.

Parameters:
  • nitrates (float or pandas.Series) – Amount of nitrates (µmol` N)

  • mstruct (float or pandas.Series) – Structural mass

Returns:

Nitrate concentration (µmol` nitrates g-1 mstruct)

Return type:

float

static calculate_N_g(nitrates, amino_acids, proteins, Nstruct)[source]#

Mass of N metabolites

Parameters:
  • nitrates (float or pandas.Series) – Amount of nitrates (µmol` N)

  • amino_acids (float or pandas.Series) – Amount of amino acids (µmol` N)

  • proteins (float or pandas.Series) – Amount of proteins (µmol` N)

  • Nstruct (float or pandas.Series) – N structural mass(g)

Returns:

Dry mass (g)

Return type:

float

static calculate_SLA(dry_mass, green_area)[source]#

Specific Leaf Area (SLA, m2.kg-1)

Parameters:
  • dry_mass (float or pandas.Series) – Dry mass (g)

  • green_area (float or pandas.Series) – Green area (m-2)

Returns:

Specific Leaf Area (SLA, m2 kg-1)

Return type:

float

static calculate_SLN(nitrates, amino_acids, proteins, Nstruct, green_area)[source]#

Surfacic Leaf Nitrogen (SLN, g.m-2)

Parameters:
  • nitrates (float or pandas.Series) – Amount of nitrates (µmol` N)

  • amino_acids (float or pandas.Series) – Amount of amino_acids (µmol` N)

  • proteins (float or pandas.Series) – Amount of proteins (µmol` N)

  • Nstruct (float or pandas.Series) – Structural N (g)

  • green_area (float or pandas.Series) – Green area (m-2)

Returns:

Surfacic Leaf Nitrogen (SLN, g.m-2)

Return type:

float

static calculate_SLN_nonstruct(nitrates, amino_acids, proteins, green_area)[source]#

Surfacic Leaf Nitrogen (SLN, g.m-2)

Parameters:
  • nitrates (float or pandas.Series) – Amount of nitrates (µmol` N)

  • amino_acids (float or pandas.Series) – Amount of amino_acids (µmol` N)

  • proteins (float or pandas.Series) – Amount of proteins (µmol` N)

  • green_area (float or pandas.Series) – Green area (m-2)

Returns:

Surfacic Leaf Nitrogen (SLN, g.m-2)

Return type:

float

static calculate_WSC_g(triosesP, sucrose, starch, fructan)[source]#

Mass of Water Soluble Carbohydrates

Parameters:
  • triosesP (float or pandas.Series) – Amount of triose phosphates (µmol` C)

  • sucrose (float or pandas.Series) – Amount of sucrose (µmol` C)

  • starch (float or pandas.Series) – Amount of sucrose (µmol` C)

  • fructan (float or pandas.Series) – Amount of sucrose (µmol` C)

Returns:

Water Soluble Carbohydrates (g)

Return type:

float

static calculate_conc_cytokinins(cytokinins, mstruct)[source]#

Cytokinin concentration.

Parameters:
  • cytokinins (float or pandas.Series) – Amount of cytokinins (AU)

  • mstruct (float or pandas.Series) – Structural mass

Returns:

Cytokinin concentration (AU g-1 mstruct)

Return type:

float

static calculate_conc_fructan(fructan, mstruct)[source]#

Fructan concentration.

Parameters:
  • fructan (float or pandas.Series) – Amount of fructan (µmol` C)

  • mstruct (float or pandas.Series) – Structural mass

Returns:

Fructan concentration (µmol` fructan g-1 mstruct, eq. glucose).

Return type:

float

static calculate_conc_proteins(proteins, mstruct)[source]#

Protein concentration.

Parameters:
  • proteins (float or pandas.Series) – Amount of proteins (µmol` N)

  • mstruct (float or pandas.Series) – Structural mass

Returns:

Protein concentration (g proteins g-1 mstruct)

Return type:

float

static calculate_conc_starch(starch, mstruct)[source]#

Starch concentration.

Parameters:
  • starch (float or pandas.Series) – Amount of sucrose (µmol` C)

  • mstruct (float or pandas.Series) – Structural mass

Returns:

Starch concentration (µmol` starch g-1 mstruct)

Return type:

float

static calculate_conc_sucrose(sucrose, mstruct)[source]#

Sucrose concentration.

Parameters:
  • sucrose (float or pandas.Series) – Amount of sucrose (µmol` C)

  • mstruct (float or pandas.Series) – Structural mass

Returns:

Sucrose concentration (µmol` sucrose g-1 mstruct)

Return type:

float

static calculate_conc_triosesP(triosesP, mstruct)[source]#

Triose Phosphates concentration.

Parameters:
  • triosesP (float or pandas.Series) – Amount of triose phosphates (µmol` C)

  • mstruct (float or pandas.Series) – Structural mass

Returns:

Triose phosphates concentration (µmol` triosesP g-1 mstruct)

Return type:

float

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 or pandas.Series) – Amount of sucrose (µmol` C)

  • starch (float or pandas.Series) – Amount of sucrose (µmol` C)

  • fructan (float or pandas.Series) – Amount of sucrose (µmol` C)

  • nitrates (float or pandas.Series) – Amount of nitrates (µmol` N)

  • amino_acids (float or pandas.Series) – Amount of sucrose (µmol` N)

  • proteins (float or pandas.Series) – Amount of sucrose (µmol` N)

  • mstruct (float or pandas.Series) – structural mass (g)

Returns:

Dry mass (g)

Return type:

float

static calculate_fructan_g(fructan)[source]#

Mass of fructans

Parameters:

fructan (float or pandas.Series) – Amount of fructans (µmol` C)

Returns:

Dry mass (g)

Return type:

float

static calculate_ratio_non_structural(dry_mass, mstruct)[source]#

Surfacic content of nitrogen

Parameters:
  • dry_mass (float or pandas.Series) – Dry mass (g)

  • mstruct (float or pandas.Series) – Structural mass (g)

Returns:

Surfacic non-structural mass (g m-2)

Return type:

float

static calculate_surfacic_non_structural(dry_mass, mstruct, green_area)[source]#

Surfacic content of non-structural mass

Parameters:
  • dry_mass (float or pandas.Series) – Dry mass (g)

  • mstruct (float or pandas.Series) – Structural mass (g)

  • green_area (float or pandas.Series) – Green area (m-2)

Returns:

Surfacic non-structural mass (g m-2)

Return type:

float

class openalea.cnwgrass.cnmetabolism.postprocessing.Endosperm[source]#

Bases: object

Post-processing to apply on Endosperm outputs.

static calculate_dry_mass(starch, proteins, mstruct)[source]#

Endosperm total dry mass.

Parameters:
  • starch (float or pandas.Series) – Endosperm starch content (µmol` C)

  • proteins (float or pandas.Series) – Endosperm protein content (µmol` N)

  • mstruct (float or pandas.Series) – structural mass (g)

Returns:

Endosperm total dry mass (g)

Return type:

float

static calculate_protein_N_mass(proteins)[source]#

Endosperm protein mass.

Parameters:

proteins (float or pandas.Series) – Endosperm protein content (µmol` N)

Returns:

Endosperm protein N mass (g)

Return type:

float

static calculate_starch_g(starch)[source]#

Endosperm starch mass

Parameters:

starch (float or pandas.Series) – Endosperm starch content (µmol` C)

Returns:

starch (g)

Return type:

float

class openalea.cnwgrass.cnmetabolism.postprocessing.Grains[source]#

Bases: object

Post-processing to apply on Grains outputs.

static calculate_WSC_g(sucrose, starch)[source]#

Mass of Water Soluble Carbohydrates

Parameters:
  • sucrose (float or pandas.Series) – Amount of sucrose (µmol` C)

  • starch (float or pandas.Series) – Amount of sucrose (µmol` C)

Returns:

Water Soluble Carbohydrates (g)

Return type:

float

static calculate_dry_mass(structure, starch, proteins)[source]#

Grain total dry mass.

Parameters:
  • structure (float or pandas.Series) – Grain structural C mass (µmol` C)

  • starch (float or pandas.Series) – Grain starch content (µmol` C)

  • proteins (float or pandas.Series) – Grain protein content (µmol` N)

Returns:

Grain total dry mass (g)

Return type:

float

static calculate_protein_N_mass(proteins)[source]#

Grain total protein mass.

Parameters:

proteins (float or pandas.Series) – Grain protein content (µmol` N)

Returns:

Grain total protein mass (g)

Return type:

float

openalea.cnwgrass.cnmetabolism.postprocessing.HIDDENZONE_INDEXES = ['plant', 'axis', 'metamer']#

the indexes to locate the hidden zones in the modelled system

openalea.cnwgrass.cnmetabolism.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.cnwgrass.cnmetabolism.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', 'R_residual', 'Respi_growth', 'S_Fructan', 'S_Proteins', 'Unloading_Amino_Acids', 'Unloading_Sucrose', 'amino_acids', 'axis', 'delta_leaf_L', 'fructan', 'internode_L', 'is_over', '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_VARIABLES and HIDDENZONE_POSTPROCESSING_VARIABLES

openalea.cnwgrass.cnmetabolism.postprocessing.HIDDENZONE_T_INDEXES = ['t', 'plant', 'axis', 'metamer']#

concatenation of T_INDEX and HIDDENZONE_INDEXES

class openalea.cnwgrass.cnmetabolism.postprocessing.HiddenZone[source]#

Bases: object

Post-processing to apply on HiddenZone outputs.

static calculate_C_g(sucrose, starch, fructan, amino_acids, proteins, mstruct)[source]#

Mass of carbon metabolites

Parameters:
  • sucrose (float or pandas.Series) – Amount of sucrose (µmol` C)

  • starch (float or pandas.Series) – Amount of starch (µmol` C)

  • fructan (float or pandas.Series) – Amount of fructan (µmol` C)

  • amino_acids (float or pandas.Series) – Amount of amino acids (µmol` N)

  • proteins (float or pandas.Series) – Amount of proteins (µmol` N)

  • mstruct (float or pandas.Series) – structural mass (g)

Returns:

Dry mass (g)

Return type:

float

static calculate_Conc_Amino_Acids(amino_acids, mstruct)[source]#

Amino acid concentration.

Parameters:
  • amino_acids (float or pandas.Series) – N amino acids (µmol` N)

  • mstruct (float or pandas.Series) – Structural mass

Returns:

Amino_acid concentration (µmol` amino acids g-1 mstruct)

Return type:

float

static calculate_N_g(amino_acids, proteins, Nstruct)[source]#

Mass of N metabolites

Parameters:
  • amino_acids (float or pandas.Series) – Amount of amino acids (µmol` N)

  • proteins (float or pandas.Series) – Amount of proteins (µmol` N)

  • Nstruct (float or pandas.Series) – N structural mass(g)

Returns:

Dry mass (g)

Return type:

float

static calculate_RER(delta_leaf_L, leaf_L, delta_t)[source]#

Relative Extension Rate.

Parameters:
  • delta_leaf_L (float or pandas.Series) – delta of leaf length between t and t-1 (m)

  • leaf_L (float or pandas.Series) – leaf length (m)

  • delta_t (float or pandas.Series) – delta_t (s)

Returns:

Relative Extension Rate (s-1)

Return type:

float

static calculate_WSC_g(sucrose, fructan)[source]#

Mass of Water Soluble Carbohydrates

Parameters:
  • sucrose (float or pandas.Series) – Amount of sucrose (µmol` C)

  • fructan (float or pandas.Series) – Amount of fructan (µmol` C)

Returns:

Water Soluble Carbohydrates (g)

Return type:

float

static calculate_conc_fructan(fructan, mstruct)[source]#

Fructan concentration.

Parameters:
  • fructan (float or pandas.Series) – C fructan (µmol` C)

  • mstruct (float or pandas.Series) – Structural mass

Returns:

Fructan concentration (µmol` fructan g-1 mstruct, eq. glucose).

Return type:

float

static calculate_conc_protein(proteins, mstruct)[source]#

Proteins concentration.

Parameters:
  • proteins (float or pandas.Series) – N proteins (µmol` N)

  • mstruct (float or pandas.Series) – Structural mass

Returns:

Protein concentration (g proteins g-1 mstruct)

Return type:

float

static calculate_conc_sucrose(sucrose, mstruct)[source]#

Sucrose concentration.

Parameters:
  • sucrose (float or pandas.Series) – C sucrose (µmol` C)

  • mstruct (float or pandas.Series) – Structural mass

Returns:

Sucrose concentration (µmol` sucrose g-1 mstruct)

Return type:

float

static calculate_dry_mass(sucrose, fructan, amino_acids, proteins, mstruct)[source]#

Dry mass

Parameters:
  • sucrose (float or pandas.Series) – Amount of sucrose (µmol` C)

  • fructan (float or pandas.Series) – Amount of fructan (µmol` C)

  • amino_acids (float or pandas.Series) – Amount of amino acids (µmol` N)

  • proteins (float or pandas.Series) – Amount of proteins (µmol` N)

  • mstruct (float or pandas.Series) – structural mass (g)

Returns:

Dry mass (g)

Return type:

float

static calculate_fructan_g(fructan)[source]#

Mass of fructans

Parameters:

fructan (float or pandas.Series) – Amount of fructans (µmol` C)

Returns:

Dry mass (g)

Return type:

float

static calculate_proteins_g(proteins)[source]#

Mass of proteins

Parameters:

proteins (float or pandas.Series) – Amount of proteins (µmol` N)

Returns:

Dry mass (g)

Return type:

float

openalea.cnwgrass.cnmetabolism.postprocessing.ORGANS_INDEXES = ['plant', 'axis', 'organ']#

the indexes to locate the organs in the modelled system

openalea.cnwgrass.cnmetabolism.postprocessing.ORGANS_POSTPROCESSING_VARIABLES = ['Conc_Amino_Acids', 'Conc_Nitrates', 'Conc_Sucrose', 'Conc_cytokinins', 'Dry_Mass', 'Starch_g', 'Proteins_N_Mass', 'N_tot', 'WSC_g']#

organs post-processing variables

openalea.cnwgrass.cnmetabolism.postprocessing.ORGANS_RUN_POSTPROCESSING_VARIABLES = {'AA_consumption_mstruct', 'C_exudation', 'Conc_Amino_Acids', 'Conc_Nitrates', 'Conc_Sucrose', 'Conc_cytokinins', 'D_proteins', 'D_starch', 'Dry_Mass', 'Export_Amino_Acids', 'Export_Nitrates', 'Export_cytokinins', 'HATS_LATS', 'N_exudation', 'N_tot', 'Nstruct', 'Proteins_N_Mass', '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', 'Starch_g', 'Total_Organic_Nitrogen', 'Unloading_Amino_Acids', 'Unloading_Sucrose', 'Uptake_Nitrates', 'WSC_g', 'age_from_flowering', 'amino_acids', 'axis', 'cytokinins', 'moistening', '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_VARIABLES and ORGANS_POSTPROCESSING_VARIABLES

openalea.cnwgrass.cnmetabolism.postprocessing.ORGANS_T_INDEXES = ['t', 'plant', 'axis', 'organ']#

concatenation of T_INDEX and ORGANS_INDEXES

openalea.cnwgrass.cnmetabolism.postprocessing.PHYTOMERS_INDEXES = ['plant', 'axis', 'metamer']#

the indexes to locate the phytomers in the modelled system

openalea.cnwgrass.cnmetabolism.postprocessing.PHYTOMERS_POSTPROCESSING_VARIABLES = []#

phytomers post-processing variables

openalea.cnwgrass.cnmetabolism.postprocessing.PHYTOMERS_RUN_POSTPROCESSING_VARIABLES = {'axis', 'metamer', 'mstruct', 'plant', 't'}#

concatenation of PHYTOMERS_T_INDEXES, PHYTOMERS_RUN_VARIABLES and PHYTOMERS_POSTPROCESSING_VARIABLES

openalea.cnwgrass.cnmetabolism.postprocessing.PHYTOMERS_T_INDEXES = ['t', 'plant', 'axis', 'metamer']#

concatenation of T_INDEX and PHYTOMERS_INDEXES

openalea.cnwgrass.cnmetabolism.postprocessing.PLANTS_INDEXES = ['plant']#

the index to locate the plants in the modelled system

openalea.cnwgrass.cnmetabolism.postprocessing.PLANTS_POSTPROCESSING_VARIABLES = []#

plants post-processing variables

openalea.cnwgrass.cnmetabolism.postprocessing.PLANTS_RUN_POSTPROCESSING_VARIABLES = {'plant', 't'}#

concatenation of PLANTS_T_INDEXES, PLANTS_RUN_VARIABLES and PLANTS_POSTPROCESSING_VARIABLES

openalea.cnwgrass.cnmetabolism.postprocessing.PLANTS_T_INDEXES = ['t', 'plant']#

concatenation of T_INDEX and PLANTS_INDEXES

class openalea.cnwgrass.cnmetabolism.postprocessing.Phloem[source]#

Bases: object

Post-processing to apply on Phloem outputs.

static calculate_WSC_g(sucrose)[source]#

Mass of Water Soluble Carbohydrates

Parameters:

sucrose (float or pandas.Series) – Amount of sucrose (µmol` C)

Returns:

Water Soluble Carbohydrates (g)

Return type:

float

static calculate_conc_amino_acids(amino_acids, mstruct_axis)[source]#

Amino_acids concentration. Related to the structural dry mass of the culm.

Parameters:
  • amino_acids (float or pandas.Series) – Amount of amino_acids in phloem (µmol` N)

  • mstruct_axis (float or pandas.Series) – The structural dry mass of the axis (g)

Returns:

Amino_acids concentration (µmol` amino_acids g-1 mstruct)

Return type:

float

static calculate_conc_sucrose(sucrose, mstruct_axis)[source]#

Sucrose concentration. Related to the structural dry mass of the culm

Parameters:
  • sucrose (float or pandas.Series) – Amount of sucrose in phloem (µmol` C)

  • mstruct_axis (float or pandas.Series) – The structural dry mass of the axis (g)

Returns:

Sucrose concentration (µmol` sucrose g-1 mstruct)

Return type:

float

class openalea.cnwgrass.cnmetabolism.postprocessing.Roots[source]#

Bases: object

Post-processing to apply on Roots outputs.

static calculate_Conc_Amino_Acids(amino_acids, mstruct)[source]#

Amino_acid concentration.

Parameters:
  • amino_acids (float or pandas.Series) – Amount of amino acids (µmol` N)

  • mstruct (float or pandas.Series) – Structural mass (g)

Returns:

Amino_acid concentration (µmol` amino_acids g-1 mstruct)

Return type:

float

static calculate_Conc_Nitrates(nitrates, mstruct)[source]#

Nitrate concentration.

Parameters:
  • nitrates (float or pandas.Series) – Amount of nitrates (µmol` N)

  • mstruct (float or pandas.Series) – Structural mass (g)

Returns:

Nitrate concentration (µmol` nitrates g-1 mstruct)

Return type:

float

static calculate_WSC_g(sucrose)[source]#

Mass of Water Soluble Carbohydrates

Parameters:

sucrose (float or pandas.Series) – Amount of sucrose (µmol` C)

Returns:

Water Soluble Carbohydrates (g)

Return type:

float

static calculate_conc_cytokinins(cytokinins, mstruct)[source]#

Cytokinin concentration.

Parameters:
  • cytokinins (float or pandas.Series) – Amount of cytokinins (AU)

  • mstruct (float or pandas.Series) – Structural mass (g)

Returns:

cytokinins concentration (AU cytokinins g-1 mstruct)

Return type:

float

static calculate_conc_sucrose(sucrose, mstruct)[source]#

Sucrose concentration.

Parameters:
  • sucrose (float or pandas.Series) – Amount of sucrose (µmol` C)

  • mstruct (float or pandas.Series) – Structural mass (g)

Returns:

Sucrose concentration (µmol` sucrose g-1 mstruct)

Return type:

float

openalea.cnwgrass.cnmetabolism.postprocessing.SOILS_INDEXES = ['plant', 'axis']#

the indexes to locate the soils in the modelled system

openalea.cnwgrass.cnmetabolism.postprocessing.SOILS_POSTPROCESSING_VARIABLES = []#

soils post-processing variables

openalea.cnwgrass.cnmetabolism.postprocessing.SOILS_RUN_POSTPROCESSING_VARIABLES = ['t', 'plant', 'axis', 'Tsoil', 'volume', 'SRWC', 'nitrates', 'Conc_Nitrates_Soil', 'mineralisation']#

concatenation of SOILS_T_INDEXES, SOILS_RUN_VARIABLES and SOILS_POSTPROCESSING_VARIABLES

openalea.cnwgrass.cnmetabolism.postprocessing.SOILS_T_INDEXES = ['t', 'plant', 'axis']#

concatenation of T_INDEX and SOILS_INDEXES

openalea.cnwgrass.cnmetabolism.postprocessing.T_INDEX = ['t']#

the time index

openalea.cnwgrass.cnmetabolism.postprocessing.generate_graphs(axes_df=None, hiddenzones_df=None, organs_df=None, elements_df=None, soils_df=None, meteo_data=None, graphs_dirpath='.')[source]#

Generate graphs to validate the outputs of CN-Metabolism, and save them in directory graphs_dirpath.

Parameters:
openalea.cnwgrass.cnmetabolism.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-Metabolism outputs, and format the post-processing to dataframes.

For each post-processing output dataframe:

Parameters:
  • plants_df (pandas.DataFrame) – CN-Metabolism outputs at plant scale (see simulation.Simulation.PLANTS_RUN_VARIABLES)

  • axes_df (pandas.DataFrame) – CN-Metabolism outputs at axis scale (see simulation.Simulation.AXES_RUN_VARIABLES)

  • metamers_df (pandas.DataFrame) – CN-Metabolism outputs at phytomer scale (see simulation.Simulation.PHYTOMERS_RUN_VARIABLES)

  • hiddenzones_df (pandas.DataFrame) – CN-Metabolism outputs at hidden zone scale (see simulation.Simulation.HIDDENZONE_RUN_VARIABLES)

  • organs_df (pandas.DataFrame) – CN-Metabolism outputs at organ scale (see simulation.Simulation.ORGANS_RUN_VARIABLES)

  • elements_df (pandas.DataFrame) – CN-Metabolism outputs at element scale (see simulation.Simulation.ELEMENTS_RUN_VARIABLES)

  • soils_df (pandas.DataFrame) – CN-Metabolism 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:

depending on 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]