Reference guide#

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

openalea.cnwgrass.hydraulics package#

hydraulics#

Hydraulics is a turgor-driven model of leaf growth. See:

  • hydraulics.simulation: the simulator (front-end) to run the model,

  • hydraulics.model: the state and the equations of the model,

  • hydraulics.parameters: the parameters of the model,

  • hydraulics.postprocessing: the post-processing and graph functions,

  • hydraulics.tools: tools to help for the validation of the outputs,

  • and hydraulics.converter: functions to convert Hydraulics inputs/outputs to/from Pandas dataframes.

openalea.cnwgrass.hydraulics.simulation module#

hydraulics.simulation#

The module hydraulics.simulation is the front-end to run the model Hydraulics. The public API consists of methods initialize() and run().

class openalea.cnwgrass.hydraulics.simulation.Simulation(delta_t=1, interpolate_forcing=False, elements_forcing_delta_t=None, hiddenzone_forcing_delta_t=None)[source]#

Bases: object

The Simulation class allows to initialize and run the model.

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

ALL_STATE_PARAMETERS = {<class 'openalea.cnwgrass.hydraulics.model.Axis'>: ['SAM_temperature'], <class 'openalea.cnwgrass.hydraulics.model.HiddenZone'>: ['leaf_pseudo_age', 'leaf_pseudostem_length', 'fructan', 'amino_acids', 'proteins', 'sucrose', 'mstruct', 'hiddenzone_age', 'leaf_enclosed_mstruct', 'leaf_Wmax', 'length_hz_En', 'lamina_Lmax'], <class 'openalea.cnwgrass.hydraulics.model.Organ'>: ['age', 'amino_acids', 'proteins', 'sucrose', 'mstruct', 'Tr', 'green_area', 'SRWC', 'Tsoil'], <class 'openalea.cnwgrass.hydraulics.model.PhotosyntheticOrganElement'>: ['amino_acids', 'green_area', 'mstruct', 'proteins', 'sucrose', 'fructan', 'Ts', 'Tr', 'age', 'is_growing', 'Wmax'], <class 'openalea.cnwgrass.hydraulics.model.Phytomer'>: [], <class 'openalea.cnwgrass.hydraulics.model.Plant'>: [], <class 'openalea.cnwgrass.hydraulics.model.Soil'>: []}#

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_turgor', 'Growth', 'water_influx', 'plant_water_content']#

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 = ['SAM_temperature', 'Total_Transpiration_turgor', 'Growth', 'water_influx', 'plant_water_content']#

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

AXES_STATE = ['SAM_temperature']#

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 = ['SAM_temperature']#

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 = ['water_influx']#

the fluxes exchanged between the compartments at organ scale

ELEMENTS_FORCING = ('green_area', 'Tr')#

the names of the elements forcing

ELEMENTS_INDEXES = ['plant', 'axis', 'metamer', 'organ', 'element']#

the indexes to locate the ELEMENTS in the modelled system

ELEMENTS_INTEGRATIVE_VARIABLES = ['Total_Transpiration_turgor', 'total_water_influx']#

the variables computed by integrating values of organ components parameters/variables recursively

ELEMENTS_INTERMEDIATE_VARIABLES = ['osmotic_water_potential', 'resistance', 'water_potential', 'volume', 'epsilon_volume', 'organ_volume', 'WC_mstruct']#

the variables that we need to compute in order to compute fluxes and/or compartments values at organ scale

ELEMENTS_RUN_VARIABLES = ['amino_acids', 'green_area', 'mstruct', 'proteins', 'sucrose', 'fructan', 'Ts', 'Tr', 'age', 'is_growing', 'Wmax', 'length', 'turgor_water_potential', 'water_content', 'width', 'thickness', 'osmotic_water_potential', 'resistance', 'water_potential', 'volume', 'epsilon_volume', 'organ_volume', 'WC_mstruct', 'water_influx', 'Total_Transpiration_turgor', 'total_water_influx']#

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

ELEMENTS_STATE = ['amino_acids', 'green_area', 'mstruct', 'proteins', 'sucrose', 'fructan', 'Ts', 'Tr', 'age', 'is_growing', 'Wmax', 'length', 'turgor_water_potential', 'water_content', 'width', 'thickness']#

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

ELEMENTS_STATE_PARAMETERS = ['amino_acids', 'green_area', 'mstruct', 'proteins', 'sucrose', 'fructan', 'Ts', 'Tr', 'age', 'is_growing', 'Wmax']#

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

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

concatenation of T_INDEX and ELEMENTS_INDEXES

HIDDENZONE_FLUXES = ['water_influx', 'water_outflow', 'Growth']#

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 = ['osmotic_water_potential', 'resistance', 'water_potential', 'volume', 'length', 'phi_width', 'phi_thickness', 'phi_length', 'phi_volume', 'epsilon_volume', 'organ_volume', 'WC_mstruct', 'omega', 'leaf_Lmax', 'delta_hiddenzone_dimensions_plastic', 'delta_weq', 'delta_leaf_L']#

the variables that we need to compute in order to compute fluxes and/or compartments values at hidden zone scale

HIDDENZONE_RUN_VARIABLES = ['leaf_pseudo_age', 'leaf_pseudostem_length', 'fructan', 'amino_acids', 'proteins', 'sucrose', 'mstruct', 'hiddenzone_age', 'leaf_enclosed_mstruct', 'leaf_Wmax', 'length_hz_En', 'lamina_Lmax', 'leaf_L', 'turgor_water_potential', 'water_content', 'width', 'thickness', 'osmotic_water_potential', 'resistance', 'water_potential', 'volume', 'length', 'phi_width', 'phi_thickness', 'phi_length', 'phi_volume', 'epsilon_volume', 'organ_volume', 'WC_mstruct', 'omega', 'leaf_Lmax', 'delta_hiddenzone_dimensions_plastic', 'delta_weq', 'delta_leaf_L', 'water_influx', 'water_outflow', 'Growth']#

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

HIDDENZONE_STATE = ['leaf_pseudo_age', 'leaf_pseudostem_length', 'fructan', 'amino_acids', 'proteins', 'sucrose', 'mstruct', 'hiddenzone_age', 'leaf_enclosed_mstruct', 'leaf_Wmax', 'length_hz_En', 'lamina_Lmax', 'leaf_L', 'turgor_water_potential', 'water_content', 'width', 'thickness']#

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 = ['leaf_pseudo_age', 'leaf_pseudostem_length', 'fructan', 'amino_acids', 'proteins', 'sucrose', 'mstruct', 'hiddenzone_age', 'leaf_enclosed_mstruct', 'leaf_Wmax', 'length_hz_En', 'lamina_Lmax']#

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.hydraulics.model.Axis'>: 'hydraulics.compartments.axes', <class 'openalea.cnwgrass.hydraulics.model.HiddenZone'>: 'hydraulics.compartments.hiddenzones', <class 'openalea.cnwgrass.hydraulics.model.Organ'>: 'hydraulics.compartments.organs', <class 'openalea.cnwgrass.hydraulics.model.PhotosyntheticOrganElement'>: 'hydraulics.compartments.elements', <class 'openalea.cnwgrass.hydraulics.model.Phytomer'>: 'hydraulics.compartments.phytomers', <class 'openalea.cnwgrass.hydraulics.model.Plant'>: 'hydraulics.compartments.plants'}, 'derivatives': {<class 'openalea.cnwgrass.hydraulics.model.Axis'>: 'hydraulics.derivatives.axes', <class 'openalea.cnwgrass.hydraulics.model.HiddenZone'>: 'hydraulics.derivatives.hiddenzones', <class 'openalea.cnwgrass.hydraulics.model.Organ'>: 'hydraulics.derivatives.organs', <class 'openalea.cnwgrass.hydraulics.model.PhotosyntheticOrganElement'>: 'hydraulics.derivatives.elements', <class 'openalea.cnwgrass.hydraulics.model.Phytomer'>: 'hydraulics.derivatives.phytomers', <class 'openalea.cnwgrass.hydraulics.model.Plant'>: 'hydraulics.derivatives.plants'}}#

the name of the loggers for compartments and derivatives

MODEL_COMPARTMENTS_NAMES = {<class 'openalea.cnwgrass.hydraulics.model.Axis'>: [], <class 'openalea.cnwgrass.hydraulics.model.HiddenZone'>: ['leaf_L', 'turgor_water_potential', 'water_content', 'width', 'thickness'], <class 'openalea.cnwgrass.hydraulics.model.Organ'>: [], <class 'openalea.cnwgrass.hydraulics.model.PhotosyntheticOrganElement'>: ['length', 'turgor_water_potential', 'water_content', 'width', 'thickness'], <class 'openalea.cnwgrass.hydraulics.model.Phytomer'>: [], <class 'openalea.cnwgrass.hydraulics.model.Plant'>: [], <class 'openalea.cnwgrass.hydraulics.model.Roots'>: [], <class 'openalea.cnwgrass.hydraulics.model.Soil'>: ['water_content']}#

the name of the compartments attributes in the model

ORGANS_FLUXES = []#

the fluxes exchanged between the compartments at organ scale

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

the indexes to locate the organ in the modelled system

ORGANS_INTEGRATIVE_VARIABLES = []#

the variables computed by integrating values of xylem components parameters/variables recursively

ORGANS_INTERMEDIATE_VARIABLES = ['water_potential']#

the variables that we need to compute in order to compute fluxes and/or compartments values at organ scale

ORGANS_RUN_VARIABLES = ['age', 'amino_acids', 'proteins', 'sucrose', 'mstruct', 'Tr', 'green_area', 'SRWC', 'Tsoil', 'water_potential']#

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

ORGANS_STATE = ['age', 'amino_acids', 'proteins', 'sucrose', 'mstruct', 'Tr', 'green_area', 'SRWC', 'Tsoil']#

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

ORGANS_STATE_PARAMETERS = ['age', 'amino_acids', 'proteins', 'sucrose', 'mstruct', 'Tr', 'green_area', 'SRWC', 'Tsoil']#

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 ORGAN_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 = []#

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

PHYTOMERS_STATE = []#

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 = []#

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

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 = ['SRWC', 'water_potential']#

the variables that we need to compute in order to compute fluxes and/or compartments values at soil scale

SOILS_RUN_VARIABLES = ['water_content', 'SRWC', 'water_potential']#

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

SOILS_STATE = ['water_content']#

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 = []#

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

delta_t#

the delta t of the simulation (in seconds)

elements_forcing_delta_t_ratio#

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

hiddenzone_forcing_delta_t_ratio#

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

initial_conditions#

the initial conditions of the compartments in the population and soil

initial_conditions_mapping#

dictionary to map the compartments to their indexes in initial_conditions

initialize(population, soils)[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

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

population#

the population to simulate on

previous_forcing_values#

previous values of the forcing

run()[source]#

Compute turgor pressure driven growth in population over delta_t.

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.hydraulics.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.hydraulics.simulation.SimulationError[source]#

Bases: Exception

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

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

Bases: SimulationError

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

exception openalea.cnwgrass.hydraulics.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.hydraulics.model module#

hydraulics.model#

The module hydraulics.model defines the equations of water flow, turgor pressure and growth.

class openalea.cnwgrass.hydraulics.model.Axis(label=None, roots=None, xylem=None, phytomers=None, SAM_temperature=12)[source]#

Bases: object

The class Axis.

An axis must have:

Growth#

water influx in the hiddenzones related to growth (g H2O)

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

the initial values of compartments and state parameters

PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.AxisParameters object>#

the internal parameters of the axes

Total_Transpiration_turgor#

the total transpiration (mmol s-1)

calculate_aggregated_variables()[source]#

Calculate the integrative variables of the axis recursively.

static calculate_ratio_WC_mstruct(plant_water_content, mstruct)[source]#

Ratio between water content and structural mass of the axis

Parameters:
  • plant_water_content (float) – g

  • mstruct (float) – g

Returns:

Water content : Structural mass ratio (%)

Return type:

float

phytomers#

the list of phytomers

plant_water_content#

plant water content (g H2O)

water_influx#

water influx in non growing organs (g H2O)

class openalea.cnwgrass.hydraulics.model.HiddenZone(label='hiddenzone', fructan=0, leaf_enclosed_mstruct=1.26e-07, leaf_pseudo_age=-1, hiddenzone_age=0, amino_acids=7.5e-05, proteins=0.0011, sucrose=0.000384, length_hz_En=None, lamina_Lmax=None, mstruct=1.26e-07, osmotic_water_potential=-0.8, water_potential=-0.11900250579120161, leaf_pseudostem_length=4e-05, leaf_L=5e-05, thickness=0.0005, width=0.003, turgor_water_potential=0.6809974942087984, water_content=7.500000000000001e-05, water_influx=0, water_outflow=0, cohorts=None, cohorts_replications=None, leaf_Wmax=None, leaf_is_growing=True, index=None)[source]#

Bases: Organ

The class HiddenZone.

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

the initial values of compartments and state parameters

PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.HiddenZoneParameters object>#

the internal parameters of the hidden zone

amino_acids#

\(:math:\)\mu mol N``

calculate_aggregated_variables()[source]#
Returns:

static calculate_delta_organ_dimensions_elastic(delta_turgor_water_potential, organ_dimensions)[source]#

Reversible delta of organ dimensions according to turgor water potential, dimensions and extensibility. Hidden zone geometry is supposed to be a rectangular prism.

Parameters:
  • delta_turgor_water_potential (float) – delta of turgor water potential integrated over delta t (MPa)

  • organ_dimensions (dict) – dict of organ dimensions at time t. Keys = [length’, ‘width’, ‘thickness’] (m)

Returns:

Delta of organ specific-dimensions (m). Keys = [‘leaf_L’’, ‘width’, ‘thickness’]

Return type:

dict

static calculate_delta_organ_dimensions_plastic(turgor_water_potential, phi, organ_dimensions)[source]#

Irreversible delta of organ dimensions according to turgor water potential, dimensions and plasticity. Hidden zone geometry is supposed to be a rectangular prism.

Parameters:
  • turgor_water_potential (float) – MPa

  • phi (dict) – dict of cell wall extensibility (MPa). Keys = [‘x’, ‘y’, ‘z]

  • organ_dimensions (dict) – dict of organ dimensions at time t. Keys = [length’, ‘width’, ‘thickness’] (m)

Returns:

Delta of organ specific-dimensions (m). Keys = [‘Leaf_L’’, ‘width’, ‘thickness’]

Return type:

dict

static calculate_delta_turgor_water_potential(phi, turgor_water_potential, organ_volume, delta_water_content)[source]#

Delta of turgor water potential of hidden zone.

Parameters:
  • phi (dict [str, float]) – float phi: dict of cell wall extensibility (MPa). Keys = [‘x’, ‘y’, ‘z]

  • turgor_water_potential (float) – MPa

  • organ_volume (float) – m3

  • delta_water_content (float) – delta water content integrated over delta t (g)

Returns:

Delta of turgor water potential (MPa)

Return type:

float

static calculate_delta_water_content(water_influx, water_outflow)[source]#

delta of water flow for the hidden zone.

Parameters:
  • water_influx (float) – Water influx integrated over delta_t (g H2O)

  • water_outflow (float) – Water loss through the emerged lamina or sheath if any (g H2O)

Returns:

Delta of water flow into the organ (g)

Return type:

float

static calculate_extensibility_temperature(age, delta_teq, delta_t)[source]#

Hidden zone extensibility in each dimension in relation to non-reversible dimensional changes. From Coussement et al. (2018) With temperature effect on leaf_pseudo_age and on maximum extensibility.

Parameters:
  • age (float) – hidden zone age (°Cd)

  • delta_teq (float) – temperature-compensated time (s)

  • delta_t (float) – time step of the simulation (s)

Returns:

Extensibility z, y and x (MPa-1): {‘z’: float, ‘y’: float, ‘x’: float}

Return type:

dict

static calculate_hiddenzone_length(leaf_L, leaf_pseudostem_length)[source]#

Length of the hidden zone

Parameters:
  • leaf_L (float) – Total leaf length (m)

  • leaf_pseudostem_length (float) – Length of the pseudostem (m)

Returns:

Length of the hidden zone (m)

Return type:

float

static calculate_initial_volume(mstruct)[source]#

Hidden zone initial volume calculated from mstruct. This calculation is only performed at t = previous leaf emergence

Parameters:

mstruct (float) –

Returns:

volume (m3), water content (g)

Return type:

(float, float)

static calculate_organ_volume(hiddenzone_dimensions)[source]#

HiddenZone volume, assumed to be equal to a box dimensions.

Parameters:

hiddenzone_dimensions (dict) – dict of hidden zone dimensions at time t. Keys = [‘length’, ‘thickness’, ‘width’] (m)

Returns:

volume (m3)

Return type:

float

static calculate_osmotic_water_potential(fructan, sucrose, amino_acids, volume, temperature)[source]#

Osmotic water potential of the organ calculated according to metabolites

Parameters:
  • fructan (float) – µmol C under the form of fructan

  • sucrose (float) – µmol C under the form of sucrose

  • amino_acids (float) – µmol N under the form of amino acids

  • volume (float) – (g H2O)

  • temperature (float) – hidden zone temperature, approximated by SAM temperature (°C)

Returns:

Osmotic water potential (MPa)

Return type:

float

static calculate_resistance(hiddenzone_dimensions)[source]#

Resistance of water flow between the hiddenzone and the xylem. Relations were set proportional to the length and inversely proportional to the area of organ’s cross-section. From Coussement et al. (2018)

Parameters:

hiddenzone_dimensions (dict) – dict of hidden zone dimensions at time t. Keys = [‘length’, ‘thickness’, ‘width’] (m)

Returns:

resistance (MPa s g-1)

Return type:

float

static calculate_time_equivalent_Tref(temperature_hz, time)[source]#

Return the time equivalent to a reference temperature i.e. temperature-compensated time (Parent, 2010).

Parameters:
  • temperature_hz (float) – hiddenzone temperature, approximated by SAM temperature (degree Celsius)

  • time (float) – time duration (s)

Returns:

temperature-compensated time (s)

Return type:

float

static calculate_volume(water_content)[source]#

Hidden zone volume, assumed to be proportional to water content.

Parameters:

water_content (float) – g H2O

Returns:

volume (m3)

Return type:

float

static calculate_water_flux(organ_water_potential, xylem_water_potential, resistance, delta_t)[source]#

Water flow into the organ according to water potential gradient with the xylem.

Parameters:
  • organ_water_potential (float) – water potential of the current organ (MPa)

  • xylem_water_potential (float) – water potential of the xylem (MPa)

  • resistance (float) – transport resistance between organ and xylem (MPa s g-1)

  • delta_t (float) – time step of the simulation (s)

Returns:

Water influx into the current organ integrated over delta_t (g)

Return type:

float

static calculate_water_potential(turgor_water_potential, osmotic_water_potential)[source]#

Total water potential of the organ

Parameters:
  • turgor_water_potential (float) – MPa

  • osmotic_water_potential (float) – MPa

Returns:

Total water potential (MPa)

Return type:

float

cohorts#

TEMPORARY. Devrait être porté à l’échelle de la plante uniquement mais je ne vois pas comment faire mieux

Type:

list of cohort values - Hack to treat tillering cases

cohorts_replications#

dictionary of number of replications per cohort rank

extensibility#

MPa-1

fructan#

\(:math:\)\mu mol C``

hiddenzone_age#

°Cd

initial_volume#

m3

lamina_Lmax#

m

leaf_L#

m

leaf_Lmax#

m

leaf_Wmax#

m

leaf_enclosed_mstruct#

g

leaf_is_growing#
leaf_pseudo_age#

°Cd

leaf_pseudostem_length#

m

length#

m

length_hz_En#

m

mstruct#

g

property nb_replications#
osmotic_water_potential#

MPa

proteins#

\(:math:\)\mu mol N``

resistance#

resistance of water flux between two organs (MPa s g-1)

sucrose#

\(:math:\)\mu mol C``

thickness#

m

turgor_water_potential#

MPa

water_content#

g H2O

water_influx#

current flow of water from xylem to hiddenzone integrated over delta t (g H2O)

water_outflow#

current flow of water from hiddenzone to emerged lamina if any integrated over delta t (g H2O)

water_potential#

MPa

width#

m

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

Bases: PhotosyntheticOrgan

The class Internode.

class openalea.cnwgrass.hydraulics.model.InternodeElement(label=None, is_growing=None, temperature=0, age=None, green_area=0.0001, mstruct=0, Ts=12, Tr=0, sucrose=0, amino_acids=0, proteins=0, fructan=0, osmotic_water_potential=-0.8, water_potential=-0.11900250579120161, turgor_water_potential=0.6809974942087984, water_influx=0, Wmax=None, length=4e-05, thickness=0.0005, width=0.003, water_content=6.0000000000000015e-05, cohorts=None, cohorts_replications=None, index=None)[source]#

Bases: PhotosyntheticOrganElement

The class InternodeElement.

INIT_COMPARTMENTS = <openalea.cnwgrass.hydraulics.parameters.InternodeElementInitCompartments object>#

the initial values of compartments and state parameters

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

the internal parameters of the internode

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

Bases: PhotosyntheticOrgan

The class Lamina.

class openalea.cnwgrass.hydraulics.model.LaminaElement(label=None, is_growing=None, temperature=0, age=None, green_area=0.0001, mstruct=0, Ts=12, Tr=0, sucrose=0, amino_acids=0, proteins=0, fructan=0, osmotic_water_potential=-0.8, water_potential=-0.11900250579120161, turgor_water_potential=0.6809974942087984, water_influx=0, Wmax=None, length=4e-05, thickness=0.0005, width=0.003, water_content=6.0000000000000015e-05, cohorts=None, cohorts_replications=None, index=None)[source]#

Bases: PhotosyntheticOrganElement

The class LaminaElement.

INIT_COMPARTMENTS = <openalea.cnwgrass.hydraulics.parameters.LaminaElementInitCompartments object>#

the initial values of compartments and state parameters

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

the internal parameters of the lamina

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

Bases: object

The class Organ.

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

PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.OrganParameters object>#

the internal parameters of the organ

calculate_aggregated_variables()[source]#

Calculate the integrative variables of the organ recursively.

initialize()[source]#

Initialize the derived attributes of the organ.

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

Bases: Organ

The class PhotosyntheticOrgan defines the water flow in a photosynthetic organ.

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

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

Total_Transpiration_turgor#

g H2O

calculate_aggregated_variables()[source]#

Calculate the integrative variables of the organ recursively.

green_area#

m2

water_content#

g H2O

water_influx#

g H2O

class openalea.cnwgrass.hydraulics.model.PhotosyntheticOrganElement(label=None, is_growing=None, temperature=0, age=None, green_area=0.0001, mstruct=0, Ts=12, Tr=0, sucrose=0, amino_acids=0, proteins=0, fructan=0, osmotic_water_potential=-0.8, water_potential=-0.11900250579120161, turgor_water_potential=0.6809974942087984, water_influx=0, Wmax=None, length=4e-05, thickness=0.0005, width=0.003, water_content=6.0000000000000015e-05, cohorts=None, cohorts_replications=None, index=None)[source]#

Bases: object

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

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

PhotosyntheticOrganElement is the base class of all photosynthetic organ elements. DO NOT INSTANTIATE IT.

INIT_COMPARTMENTS = <openalea.cnwgrass.hydraulics.parameters.PhotosyntheticOrganElementInitCompartments object>#

the initial values of compartments and state parameters

PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.PhotosyntheticOrganElementParameters object>#

the internal parameters of the photosynthetic organs elements

Total_Transpiration_turgor#

(g H2O)

Tr#

mmol H20 m-2 s-1

Ts#

°C

Wmax#

m

age#

°Cd

amino_acids#

\(:math:\)\mu mol N``

static calculate_Total_Transpiration(Tr, green_area, delta_t)[source]#

Total organ transpiration

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

  • green_area (float) – Green area (m2)

  • delta_t (float) – time step of the simulation (s)

Returns:

Total transpiration (g H2O)

Return type:

float

calculate_aggregated_variables()[source]#

Calculate the integrative variables of the element.

static calculate_delta_organ_dimensions(delta_turgor_water_potential, organ_dimensions)[source]#

Delta of lamina dimensions according to turgor water potential, dimensions, and elasticity.

Parameters:
  • delta_turgor_water_potential (float) – delta of turgor water potential integrated over delta t (MPa)

  • organ_dimensions (dict) – dict of organ dimensions at time t. Keys = [‘length’, ‘thickness’, ‘width’] (m)

Returns:

Delta of organ specific-dimensions (m). Keys = [‘length’, ‘width’, ‘thickness’]

Return type:

dict

static calculate_delta_turgor_water_potential(volume, delta_water_content)[source]#

Delta of turgor water potential according to organ volume and elasticity. Extensibility (phi) is supposed to be 0 as this tissue is mature (growth completed).

Parameters:
  • volume (float) – organ volume at time t (m3).

  • delta_water_content (float) – delta water content integrated over delta t (g)

Returns:

Delta of turgor water potential (MPa)

Return type:

float

static calculate_delta_water_content(water_influx, Total_Transpiration_turgor)[source]#

Delta of water flow for the lamina.

Parameters:
  • water_influx (float) – Water influx from xylem integrated over delta_t (g)

  • Total_Transpiration_turgor (float) – Element transpiration (g H2O)

Returns:

Delta of water flow into the organ (g H2O)

Return type:

float

static calculate_organ_volume(organ_dimensions)[source]#

Photosynthetic element volume, assumed to be equal to a box dimensions. :param dict organ_dimensions: dict of organ dimensions at time t. Keys = [‘length’, ‘thickness’, ‘width’] (m)

Returns:

volume (m3)

Return type:

float

static calculate_osmotic_water_potential(sucrose, amino_acids, volume, temperature, fructan)[source]#

Osmotic water potential of the hiddenzone calculated according to metabolites

Parameters:
  • sucrose (float) – µmol C under the form of sucrose

  • amino_acids (float) – µmol N under the form of amino acids

  • volume (float) – (m3)

  • temperature (float) – air temperature (°C)

  • fructan (float) – µmol C under the form of fructan

Returns:

Osmotic water potential (MPa)

Return type:

float

static calculate_resistance(organ_dimensions)[source]#

Resistance of water flow between the lamina and xylem Relations were set proportional to the length and inversely proportional to the area of organ’s cross section. :param dict organ_dimensions: dict of organ dimensions at time t. Keys = [‘length’, ‘thickness’, ‘width’] (m)

Returns:

resistance (MPa s g-1)

Return type:

float

static calculate_total_water_influx(water_influx)[source]#

Water influx from xylem to organ

Parameters:

water_influx (float) – Water influx (g H2O)

Returns:

Total water influx (g H2O)

static calculate_volume(water_content)[source]#

Photosynthetic element volume, assumed to be proportional to water content.

Parameters:

water_content (float) – (g H2O)

Returns:

volume (m3)

Return type:

float

static calculate_water_flux(water_potential, xylem_water_potential, resistance, delta_t)[source]#

Water flow into the organ according to water potential gradient with the xylem.

Parameters:
  • water_potential (float) – water potential of the current organ (MPa)

  • xylem_water_potential (float) – water potential of the xylem (MPa)

  • resistance (float) – transport resistance between organ and xylem (MPa s g-1)

  • delta_t (float) – time step of the simulation (s)

Returns:

Water influx into the current organ integrated over delta_t (g H2O)

Return type:

float

static calculate_water_potential(turgor_water_potential, osmotic_water_potential)[source]#

Total water potential of the organ

Parameters:
  • turgor_water_potential (float) – MPa

  • osmotic_water_potential (float) – MPa

Returns:

Total water potential (MPa)

Return type:

float

cohorts#

TEMPORARY. Devrait être porté à l’échelle de la plante uniquement mais je ne vois pas comment faire mieux

Type:

list of cohort values - Hack to treat tillering cases

cohorts_replications#

dictionary of number of replications per cohort rank

delta_t#

the delta t of the simulation (in seconds)

fructan#

\(:math:\)\mu mol C``

green_area#

m2

is_growing#
label#

the label of the element

length#

m

mstruct#

g

property nb_replications#
osmotic_water_potential#

MPa

proteins#

\(:math:\)\mu mol N``

resistance#

resistance of water flux between two organs (MPa s g-1)

sucrose#

\(:math:\)\mu mol C``

temperature#

°C

thickness#

m

turgor_water_potential#

MPa

water_content#

g H2O

water_influx#

current flow of water from xylem to organ integrated over delta t (g H2O)

water_potential#

MPa

width#

m

class openalea.cnwgrass.hydraulics.model.Phytomer(index=None, lamina=None, internode=None, sheath=None, hiddenzone=None, cohorts=None, cohorts_replications=None)[source]#

Bases: object

The class Phytomer.

A phytomer must have at least:

Growth#

g H20

INIT_COMPARTMENTS = <openalea.cnwgrass.hydraulics.parameters.PhytomerInitCompartments object>#

the initial values of compartments and state parameters

PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.PhytomerParameters object>#

the internal parameters of the phytomers

Total_Transpiration_turgor#

g H20

calculate_aggregated_variables()[source]#

Calculate the integrative variables of the phytomer recursively.

cohorts#

TEMPORARY. Devrait être porté à l’échelle de la plante uniquement mais je ne vois pas comment faire mieux

Type:

list of cohort values - Hack to treat tillering cases

cohorts_replications#

dictionary of number of replications per cohort rank

hiddenzone#

the hidden zone

index#

the index of the phytomer

internode#

the internode

lamina#

the lamina

property nb_replications#
sheath#

the sheath

total_water_influx#

g H20

water_content#

g H2O

water_influx#

g H20

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

Bases: object

The class Plant defines the water flow at plant scale.

A plant must have at least one axis.

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

cohorts#

TEMPORARY

Type:

list of cohort values - Hack to treat tillering cases

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

Bases: object

The class Population.

A population must have at least one plant.

PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.PopulationParameters object>#

the internal parameters of the population

calculate_aggregated_variables()[source]#

Calculate the integrative variables of the population recursively.

class openalea.cnwgrass.hydraulics.model.Roots(label='roots')[source]#

Bases: Organ

The class Roots.

INIT_COMPARTMENTS = <openalea.cnwgrass.hydraulics.parameters.RootsInitCompartments object>#

the initial values of compartments and state parameters

PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.RootsParameters object>#

the internal parameters of the roots

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

Bases: PhotosyntheticOrgan

The class Sheath.

class openalea.cnwgrass.hydraulics.model.SheathElement(label=None, is_growing=None, temperature=0, age=None, green_area=0.0001, mstruct=0, Ts=12, Tr=0, sucrose=0, amino_acids=0, proteins=0, fructan=0, osmotic_water_potential=-0.8, water_potential=-0.11900250579120161, turgor_water_potential=0.6809974942087984, water_influx=0, Wmax=None, length=4e-05, thickness=0.0005, width=0.003, water_content=6.0000000000000015e-05, cohorts=None, cohorts_replications=None, index=None)[source]#

Bases: PhotosyntheticOrganElement

The class SheathElement.

INIT_COMPARTMENTS = <openalea.cnwgrass.hydraulics.parameters.SheathElementInitCompartments object>#

the initial values of compartments and state parameters

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

the internal parameters of the sheath

class openalea.cnwgrass.hydraulics.model.Soil(water_content, constant_water_content=True, hourly_rehydration=0)[source]#

Bases: object

The class Soil defines the soil water potential as function of the soil relative water content.

PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.SoilParameters object>#

the internal parameters of the soil

SRWC#

Soil Relative Water Content (%)

static calculate_SRWC(water_content)[source]#

Soil Relative Water Content

Parameters:

water_content (float) – soil water content (g)

Returns:

SRWC (dimensionless)

Return type:

%

calculate_water_content_derivative(soil_water_outputs, constant_water_content)[source]#

delta soil nitrates.

Parameters:
  • soil_water_outputs (float) – Sum of water used for plant transpiration of growth over delta_t (g)

  • constant_water_content (bool) – whether the water content is constant or not

Returns:

delta water_content (g)

Return type:

float

static calculate_water_potential(SRWC)[source]#

Total water potential of the xylem (Mpa) Equation from Chen et al. (2019), adapted for a deep loam-clay soil (leached soil on loessic silt), typical of Grignon (France).

Parameters:

SRWC (float) –

%

Returns:

Total water potential (MPa)

Return type:

float

water_content#

water content of the soil (g)

water_potential#

Water potential of the soil (MPa)

class openalea.cnwgrass.hydraulics.model.Xylem(label='xylem', water_potential=-0.11900250579120161)[source]#

Bases: Organ

The class Xylem defines the water exchanges in a xylem.

INIT_COMPARTMENTS = <openalea.cnwgrass.hydraulics.parameters.XylemInitCompartments object>#

the initial values of compartments and state parameters

PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.XylemParameters object>#

the internal parameters of the xylem

static calculate_xylem_water_potential(soil_water_potential, total_water_influx, Growth, delta_t)[source]#

Total water potential of the xylem

Parameters:
  • soil_water_potential (float) – MPa

  • total_water_influx (float) – g H2O

  • Growth (float) – g H2O

  • delta_t (float) – time step of the simulation (s)

Returns:

Total water potential (MPa)

Return type:

float

delta_t#

the delta t of the simulation (in seconds)

water_potential#

MPa

openalea.cnwgrass.hydraulics.parameters module#

hydraulics.parameters#

The module hydraulics.parameters defines the parameters of the model.

openalea.cnwgrass.hydraulics.parameters.AMINO_ACIDS_N_RATIO = 1.17#

Mean number of mol of N in 1 mol of the major amino acids of plants (Glu, Gln, Ser, Asp, Ala, Gly)

openalea.cnwgrass.hydraulics.parameters.AXIS_INIT_COMPARTMENTS = <openalea.cnwgrass.hydraulics.parameters.AxisInitCompartments object>#

The instance of class hydraulics.parameters.PhytomerInitCompartments for current process

openalea.cnwgrass.hydraulics.parameters.AXIS_PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.AxisParameters object>#

The instance of class hydraulics.parameters.AxisParameters for current process

class openalea.cnwgrass.hydraulics.parameters.AxisInitCompartments[source]#

Bases: object

Initial values for compartments of axis.

SAM_temperature#

initial temperature of shoot apical meristem (°C)

class openalea.cnwgrass.hydraulics.parameters.AxisParameters[source]#

Bases: object

Internal parameters of axes.

openalea.cnwgrass.hydraulics.parameters.CELSIUS_2_KELVIN = 273.15#

conversion factor from degree Celsius to Kelvin

openalea.cnwgrass.hydraulics.parameters.HIDDEN_ZONE_INIT_COMPARTMENTS = <openalea.cnwgrass.hydraulics.parameters.HiddenZoneInitCompartments object>#

The instance of class hydraulics.parameters.HiddenZoneInitCompartments for current process

openalea.cnwgrass.hydraulics.parameters.HIDDEN_ZONE_PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.HiddenZoneParameters object>#

The instance of class hydraulics.parameters.HiddenZoneParameters for current process

openalea.cnwgrass.hydraulics.parameters.HOUR_TO_SECOND_CONVERSION_FACTOR = 3600.0#

Number of seconds in 1 hour

class openalea.cnwgrass.hydraulics.parameters.HiddenZoneInitCompartments[source]#

Bases: object

Initial values for compartments of hidden zones.

SRWC#

%

Tr#

mmol H20 m-2 s-1

amino_acids#

\(:math:\)\mu mol N``

delta_teq#

time equivalent to a reference temperature i.e. temperature-compensated time (Parent, 2010)

Type:

s #

fructan#

\(:math:\)\mu mol C``

green_area#

m2

hiddenzone_age#

°Cd

lamina_Lmax#

m

leaf_L#

m

leaf_Wmax#

m

leaf_enclosed_mstruct#

g

leaf_is_growing#
leaf_pseudo_age#

°Cd

leaf_pseudostem_length#

m

length_hz_En#

m

mstruct#

g

osmotic_water_potential#

Mpa

proteins#

\(:math:\)\mu mol N``

sucrose#

\(:math:\)\mu mol C``

temperature#

°C

thickness#

m

turgor_water_potential#

MPa

water_influx#

g H2O

water_outflow#

g H2O

water_potential#

MPa

width#

m

class openalea.cnwgrass.hydraulics.parameters.HiddenZoneParameters[source]#

Bases: OrganParameters

Internal parameters of hidden growing zones.

GAMMA#

0.3 Mpa for soybean.

Type:

Critical value for the pressure component which must be exceeded for irreversible volume changes (MPa). Found from Coussement et al., 2018

OFFSET_LEAF#

Offset used for the final fitting of the beta function (m)

OFFSET_MASS_VOLUME#

Offset of the relation between leaf dry mass and its volume at the time of the previous leaf emergence (m3). Found from Williams 1960, Fig 11.

RATIO_MSTRUCT_DM#

Ratio mstruct/dry matter (dimensionless). From growth model.

SLOPE_MASS_VOLUME#

Slope of the relation between leaf dry mass and its volume at the time of the previous leaf emergence (m3 g-1). Found from Williams 1960, Fig 11.

Sa#

(mol m-3) Parameter of a sigmoidal function of equivalent solutes concentration used in osmotic water potential

Sb#

(-) Parameter of a sigmoidal function of equivalent solutes concentration used in osmotic water potential

Sc#

(-) Parameter of a sigmoidal function of equivalent solutes concentration used in osmotic water potential

Sd#

(mol m-3) Parameter of a sigmoidal function of equivalent solutes concentration used in osmotic water potential

TL_ratio#
WL_ratio#
epsilon#

thickness, z: length.

Type:

Dimension-specific elasticity in relation to reversible dimensional changes (MPa). x

Type:

width, y

leaf_Lmax_MAX#

Maximum leaf_Lmax (m) (Gauthier et al., 2021)

leaf_Wmax_Marion#

m

phi_initial#

Initial dimension-specific cell wall extensibility in relation to non-reversible dimensional changes (MPa-1 s-1)

tbase#

beginning of leaf elongation in automate growth (s at 12°c); fitted from adapted data from Fournier 2005

tend#

end of leaf elongation in automate growth (s at 12°c); fitted from adapted data from Fournier 2005

tmax#

time at which leaf elongation rate is maximal in automate growth (s at 12°c); fitted from adapted data from Fournier 2005

openalea.cnwgrass.hydraulics.parameters.INTERNODE_ELEMENT_INIT_COMPARTMENTS = <openalea.cnwgrass.hydraulics.parameters.InternodeElementInitCompartments object>#

The instance of class hydraulics.parameters.InternodeElementInitCompartments for current process

openalea.cnwgrass.hydraulics.parameters.INTERNODE_ELEMENT_PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.InternodeElementParameters object>#

The instance of class hydraulics.parameters.InternodeParameters for current process

class openalea.cnwgrass.hydraulics.parameters.InternodeElementInitCompartments[source]#

Bases: object

Initial values for compartments of internode elements.

thickness#

m

width#

m

class openalea.cnwgrass.hydraulics.parameters.InternodeElementParameters[source]#

Bases: OrganParameters

Internal parameters of internodes.

epsilon#

thickness, z: length.

Type:

Dimension-specific elasticity in relation to reversible dimensional changes (MPa). x

Type:

width, y

openalea.cnwgrass.hydraulics.parameters.LAMINA_ELEMENT_INIT_COMPARTMENTS = <openalea.cnwgrass.hydraulics.parameters.LaminaElementInitCompartments object>#

The instance of class hydraulics.parameters.LaminaElementInitCompartments for current process

openalea.cnwgrass.hydraulics.parameters.LAMINA_ELEMENT_PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.LaminaElementParameters object>#

The instance of class hydraulics.parameters.LaminaParameters for current process

class openalea.cnwgrass.hydraulics.parameters.LaminaElementInitCompartments[source]#

Bases: object

Initial values for compartments of lamina elements.

thickness#

m

width#

m

class openalea.cnwgrass.hydraulics.parameters.LaminaElementParameters[source]#

Bases: OrganParameters

Internal parameters of lamina.

epsilon#

thickness, z: length.

Type:

Dimension-specific elasticity in relation to reversible dimensional changes (MPa). x

Type:

width, y

openalea.cnwgrass.hydraulics.parameters.NB_C_SUCROSE = 12#

Number of C in 1 mol of sucrose

openalea.cnwgrass.hydraulics.parameters.OFFSET_MASS_VOLUME = 1.82312e-13#

Offset of the relation between leaf dry mass and its volume at the time of the previous leaf emergence (m3). Found from Williams 1960, Fig 11.

openalea.cnwgrass.hydraulics.parameters.ORGAN_PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.OrganParameters object>#

The instance of class hydraulics.parameters.PhytomerParameters for current process

class openalea.cnwgrass.hydraulics.parameters.OrganParameters[source]#

Bases: object

Internal parameters of organs.

openalea.cnwgrass.hydraulics.parameters.PHOTOSYNTHETIC_ORGAN_ELEMENT_INIT_COMPARTMENTS = <openalea.cnwgrass.hydraulics.parameters.PhotosyntheticOrganElementInitCompartments object>#

The instance of class hydraulics.parameters.LaminaInitCompartments for current process

openalea.cnwgrass.hydraulics.parameters.PHOTOSYNTHETIC_ORGAN_ELEMENT_PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.PhotosyntheticOrganElementParameters object>#

The instance of class cnmetabolism.parameters.PhotosyntheticOrganElementParameters for current process

openalea.cnwgrass.hydraulics.parameters.PHYTOMER_INIT_COMPARTMENTS = <openalea.cnwgrass.hydraulics.parameters.PhytomerInitCompartments object>#

The instance of class hydraulics.parameters.PhytomerInitCompartments for current process

openalea.cnwgrass.hydraulics.parameters.PHYTOMER_PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.PhytomerParameters object>#

The instance of class hydraulics.parameters.PhytomerParameters for current process

openalea.cnwgrass.hydraulics.parameters.PI = 3.141592653#

Pi (?)

openalea.cnwgrass.hydraulics.parameters.PLANT_PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.PlantParameters object>#

The instance of class hydraulics.parameters.PlantParameters for current process

openalea.cnwgrass.hydraulics.parameters.POPULATION_PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.PopulationParameters object>#

The instance of class hydraulics.parameters.PopulationParameters for current process

class openalea.cnwgrass.hydraulics.parameters.PhotosyntheticOrganElementInitCompartments[source]#

Bases: object

Initial values for compartments of photosynthetic organ elements.

SRWC#

%

Tr#

mmol H20 m-2 s-1

Ts#

°C

Wmax#

°Cd

age#

°Cd

amino_acids#

\(:math:\)\mu mol N``

fructan#

\(:math:\)\mu mol C``

green_area#

initial value of green_area (m2)

is_growing#
length#

m init

mstruct#

g

osmotic_water_potential#

MPa

proteins#

\(:math:\)\mu mol N``

sucrose#

\(:math:\)\mu mol C``

temperature#

°C

thickness#

m init

turgor_water_potential#

MPa

water_influx#

g H2O

water_outflow#

g H2O

water_potential#

MPa

width#

m init

class openalea.cnwgrass.hydraulics.parameters.PhotosyntheticOrganElementParameters[source]#

Bases: object

Internal parameters of Photosynthetic Organ Element.

Sa#

(mol m-3) Parameter of a sigmoidal function of equivalent solutes concentration used in osmotic water potential

Sb#

(-) Parameter of a sigmoidal function of equivalent solutes concentration used in osmotic water potential

Sc#

(-) Parameter of a sigmoidal function of equivalent solutes concentration used in osmotic water potential

Sd#

(mol m-3) Parameter of a sigmoidal function of equivalent solutes concentration used in osmotic water potential

epsilon#

thickness, z: length.

Type:

Dimension-specific elasticity in relation to reversible dimensional changes (MPa). x

Type:

width, y

class openalea.cnwgrass.hydraulics.parameters.PhytomerInitCompartments[source]#

Bases: object

Initial values for compartments of hidden zones.

Tr#

mmol H20 m-2 s-1

green_area#

m2

class openalea.cnwgrass.hydraulics.parameters.PhytomerParameters[source]#

Bases: object

Internal parameters of phytomers.

class openalea.cnwgrass.hydraulics.parameters.PlantParameters[source]#

Bases: object

Internal parameters of plants.

class openalea.cnwgrass.hydraulics.parameters.PopulationParameters[source]#

Bases: object

Internal parameters of populations.

openalea.cnwgrass.hydraulics.parameters.R = 8.31#

Perfect gas constant (J mol-1 K-1)

openalea.cnwgrass.hydraulics.parameters.RATIO_MSTRUCT_DM = 0.8#

Ratio mstruct/dry matter (dimensionless). From growth model.

openalea.cnwgrass.hydraulics.parameters.RHO_WATER = 1000000.0#

Water density (g m-3)

openalea.cnwgrass.hydraulics.parameters.ROOTS_INIT_COMPARTMENTS = <openalea.cnwgrass.hydraulics.parameters.RootsInitCompartments object>#

The instance of class cnmetabolism.parameters.RootsInitCompartments for current process

openalea.cnwgrass.hydraulics.parameters.ROOTS_PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.RootsParameters object>#

The instance of class cnmetabolism.parameters.XylemParameters for current process

class openalea.cnwgrass.hydraulics.parameters.RootsInitCompartments[source]#

Bases: object

Initial values for compartments of roots

class openalea.cnwgrass.hydraulics.parameters.RootsParameters[source]#

Bases: object

Internal parameters of roots.

openalea.cnwgrass.hydraulics.parameters.SHEATH_ELEMENT_INIT_COMPARTMENTS = <openalea.cnwgrass.hydraulics.parameters.SheathElementInitCompartments object>#

The instance of class hydraulics.parameters.SheathElementInitCompartments for current process

openalea.cnwgrass.hydraulics.parameters.SHEATH_ELEMENT_PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.SheathElementParameters object>#

The instance of class hydraulics.parameters.InternodeParameters for current process

openalea.cnwgrass.hydraulics.parameters.SLOPE_MASS_VOLUME = 3.23337e-06#

Slope of the relation between leaf dry mass and its volume at the time of the previous leaf emergence (m3 g-1). Found from Williams 1960, Fig 11.

openalea.cnwgrass.hydraulics.parameters.SOIL_PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.SoilParameters object>#

The instance of class cnmetabolism.parameters.SoilParameters for current process

openalea.cnwgrass.hydraulics.parameters.SUCROSE_MOLAR_MASS = 342#

g mol-1

class openalea.cnwgrass.hydraulics.parameters.SheathElementInitCompartments[source]#

Bases: object

Initial values for compartments of sheath elements.

thickness#

m

width#

m

class openalea.cnwgrass.hydraulics.parameters.SheathElementParameters[source]#

Bases: OrganParameters

Internal parameters of sheaths.

epsilon#

thickness, z: length.

Type:

Dimension-specific elasticity in relation to reversible dimensional changes (MPa). x

Type:

width, y

class openalea.cnwgrass.hydraulics.parameters.SoilParameters[source]#

Bases: object

Internal parameters of soil.

Soil_a#

Mpa - Parameter for soil water function (adapté pour sol limono-argileux profond, Grignon)

Soil_b#

% - Parameter for soil water function (adapté pour sol limono-argileux profond, Grignon)

openalea.cnwgrass.hydraulics.parameters.VANT_HOFF_AMINO_ACIDS = 1.25#

Van’t Hoff coefficient estimated for amino acids (dimensionless)

openalea.cnwgrass.hydraulics.parameters.VANT_HOFF_SUCROSE = 1#

Van’t Hoff coefficient of sucrose (dimensionless)

openalea.cnwgrass.hydraulics.parameters.VSTORAGE = 0.8#

Storage portion of the volume of the organ (-)

openalea.cnwgrass.hydraulics.parameters.WATER_MOLAR_MASS = 18#

g mol-1

openalea.cnwgrass.hydraulics.parameters.XYLEM_INIT_COMPARTMENTS = <openalea.cnwgrass.hydraulics.parameters.XylemInitCompartments object>#

The instance of class cnmetabolism.parameters.XylemInitCompartments for current process

openalea.cnwgrass.hydraulics.parameters.XYLEM_PARAMETERS = <openalea.cnwgrass.hydraulics.parameters.XylemParameters object>#

The instance of class cnmetabolism.parameters.XylemParameters for current process

class openalea.cnwgrass.hydraulics.parameters.XylemInitCompartments[source]#

Bases: object

Initial values for compartments of xylem.

SRWC#

%

soil_water_potential#

MPa

water_potential#

MPa

class openalea.cnwgrass.hydraulics.parameters.XylemParameters[source]#

Bases: object

Internal parameters of xylem.

R_soil#

1E-05

Type:

Flow resistance between soil and xylem (Mpa s g-1 m)

R_xylem_hz#

1

Type:

Flow resistance between xylem and shoot organs (Mpa s g-1 m)

R_xylem_organ#

0.25

Type:

Flow resistance between xylem and shoot organs (Mpa s g-1 m)

openalea.cnwgrass.hydraulics.tools module#

hydraulics.tools#

This module provides tools to help for the validation of the outputs:

  • set up of loggers,

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

All the possible indexes of Turgor_Growth outputs

openalea.cnwgrass.hydraulics.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 hydraulics.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 old logs. False otherwise.

openalea.cnwgrass.hydraulics.converter module#

hydraulics.converter#

The module hydraulics.converter defines functions to convert dataframes to/from Hydraulics inputs or outputs format.

openalea.cnwgrass.hydraulics.converter.AXES_VARIABLES = ['plant', 'axis', 'SAM_temperature', 'Total_Transpiration_turgor', 'Growth', 'water_influx', 'plant_water_content']#

the columns of the outputs dataframe at AXIS scale

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

the mapping of the name of each element, from Dataframe to Hydraulics

openalea.cnwgrass.hydraulics.converter.ELEMENTS_VARIABLES = ['plant', 'axis', 'metamer', 'organ', 'element', 'amino_acids', 'green_area', 'mstruct', 'proteins', 'sucrose', 'fructan', 'Ts', 'Tr', 'age', 'is_growing', 'Wmax', 'length', 'turgor_water_potential', 'water_content', 'width', 'thickness', 'osmotic_water_potential', 'resistance', 'water_potential', 'volume', 'epsilon_volume', 'organ_volume', 'WC_mstruct', 'water_influx', 'Total_Transpiration_turgor', 'total_water_influx']#

the columns of the outputs dataframe at ELEMENTS scale

openalea.cnwgrass.hydraulics.converter.HIDDENZONE_VARIABLES = ['plant', 'axis', 'metamer', 'leaf_pseudo_age', 'leaf_pseudostem_length', 'fructan', 'amino_acids', 'proteins', 'sucrose', 'mstruct', 'hiddenzone_age', 'leaf_enclosed_mstruct', 'leaf_Wmax', 'length_hz_En', 'lamina_Lmax', 'leaf_L', 'turgor_water_potential', 'water_content', 'width', 'thickness', 'osmotic_water_potential', 'resistance', 'water_potential', 'volume', 'length', 'phi_width', 'phi_thickness', 'phi_length', 'phi_volume', 'epsilon_volume', 'organ_volume', 'WC_mstruct', 'omega', 'leaf_Lmax', 'delta_hiddenzone_dimensions_plastic', 'delta_weq', 'delta_leaf_L', 'water_influx', 'water_outflow', 'Growth']#

the columns of the outputs dataframe at HIDDENZONE scale

openalea.cnwgrass.hydraulics.converter.ORGANS_VARIABLES = ['plant', 'axis', 'organ', 'age', 'amino_acids', 'proteins', 'sucrose', 'mstruct', 'Tr', 'green_area', 'SRWC', 'Tsoil', 'water_potential']#

the columns of the outputs dataframe at ORGANS scale

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

the columns of the outputs dataframe at PHYTOMER scale

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

the columns of the outputs dataframe at PLANT scale

openalea.cnwgrass.hydraulics.converter.SOILS_VARIABLES = ['plant', 'axis', 'water_content', 'SRWC', 'water_potential']#

the columns of the outputs dataframe at SOIL scale

openalea.cnwgrass.hydraulics.converter.from_dataframes(axes_inputs=None, hiddenzones_inputs=None, elements_inputs=None, organs_inputs=None, soils_inputs=None)[source]#

If elements_inputs and hiddenzones_inputs are not None, converts elements_inputs and hiddenzones_inputs to a population.

Parameters:
  • hiddenzones_inputs (pandas.DataFrame) – Hidden zone inputs, with one line per hidden zone.

  • elements_inputs (pandas.DataFrame) – Element inputs, with one line per element.

  • organs_inputs (pandas.DataFrame) – Organs (xylem and roots) inputs, with one line per organ.

  • soils_inputs (pandas.DataFrame) – Soils inputs, with one line by soil.

Returns:

If elements_inputs and hiddenzones_inputs are not None, returns a population and/or if soils_inputs is not None, return a dict of soils.

Return type:

(model.Population, dict)

openalea.cnwgrass.hydraulics.converter.hydraulics_CLASSES_TO_DATAFRAME_ORGANS_MAPPING = {<class 'openalea.cnwgrass.hydraulics.model.HiddenZone'>: 'hiddenzone', <class 'openalea.cnwgrass.hydraulics.model.Internode'>: 'internode', <class 'openalea.cnwgrass.hydraulics.model.Lamina'>: 'blade', <class 'openalea.cnwgrass.hydraulics.model.Organ'>: 'organs', <class 'openalea.cnwgrass.hydraulics.model.Roots'>: 'roots', <class 'openalea.cnwgrass.hydraulics.model.Sheath'>: 'sheath', <class 'openalea.cnwgrass.hydraulics.model.Xylem'>: 'xylem'}#

the mapping of the Hydraulics organs classes to organs names in MTG

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

Convert a Hydraulics population to Pandas dataframes 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 Hydraulics 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:
  • 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) * element scale: plant index, axis id, phytomer index, organs type, element type, state parameters, state variables, intermediate variables, fluxes and integrative variables of each element (see ELEMENTS_VARIABLES) * xylem scale: xylem index, state parameters, state variables, intermediate variables, fluxes and integrative variables of xylem (see XYLEM_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, pandas.DataFrame)

openalea.cnwgrass.hydraulics.postprocessing module#

hydraulics.postprocessing#

The module hydraulics.postprocessing defines post-processing to apply on Turgor-Wheat outputs, and provides a front-end to automatize the generation of graphs for validation of the outputs.

Please use front-ends postprocessing() and generate_graphs().

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

the indexes to locate the axes in the modelled system

openalea.cnwgrass.hydraulics.postprocessing.AXES_POSTPROCESSING_VARIABLES = []#

axes post-processing variables

openalea.cnwgrass.hydraulics.postprocessing.AXES_RUN_POSTPROCESSING_VARIABLES = {'Growth', 'SAM_temperature', 'Total_Transpiration_turgor', 'axis', 'plant', 'plant_water_content', 't', 'water_influx'}#

concatenation of AXES_T_INDEXES, AXES_RUN_VARIABLES and AXES_POSTPROCESSING_VARIABLES

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

concatenation of T_INDEX and AXES_INDEXES

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

the indexes to locate the elements in the modelled system

openalea.cnwgrass.hydraulics.postprocessing.ELEMENTS_POSTPROCESSING_VARIABLES = []#

elements post-processing variables

openalea.cnwgrass.hydraulics.postprocessing.ELEMENTS_RUN_POSTPROCESSING_VARIABLES = ['t', 'plant', 'axis', 'metamer', 'organ', 'element', 'amino_acids', 'green_area', 'mstruct', 'proteins', 'sucrose', 'fructan', 'Ts', 'Tr', 'age', 'is_growing', 'Wmax', 'length', 'turgor_water_potential', 'water_content', 'width', 'thickness', 'osmotic_water_potential', 'resistance', 'water_potential', 'volume', 'epsilon_volume', 'organ_volume', 'WC_mstruct', 'water_influx', 'Total_Transpiration_turgor', 'total_water_influx']#

concatenation of ELEMENTS_T_INDEXES, ELEMENTS_RUN_VARIABLES and ELEMENTS_POSTPROCESSING_VARIABLES

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

concatenation of T_INDEX and ELEMENTS_INDEXES

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

Bases: object

Post-processing to apply on Element outputs.

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

the indexes to locate the hidden zones in the modelled system

openalea.cnwgrass.hydraulics.postprocessing.HIDDENZONE_POSTPROCESSING_VARIABLES = ['conc_solutes_vol', 'conc_solutes_mass', 'LER']#

hidden zones post-processing variables

openalea.cnwgrass.hydraulics.postprocessing.HIDDENZONE_RUN_POSTPROCESSING_VARIABLES = ['t', 'plant', 'axis', 'metamer', 'leaf_pseudo_age', 'leaf_pseudostem_length', 'fructan', 'amino_acids', 'proteins', 'sucrose', 'mstruct', 'hiddenzone_age', 'leaf_enclosed_mstruct', 'leaf_Wmax', 'length_hz_En', 'lamina_Lmax', 'leaf_L', 'turgor_water_potential', 'water_content', 'width', 'thickness', 'osmotic_water_potential', 'resistance', 'water_potential', 'volume', 'length', 'phi_width', 'phi_thickness', 'phi_length', 'phi_volume', 'epsilon_volume', 'organ_volume', 'WC_mstruct', 'omega', 'leaf_Lmax', 'delta_hiddenzone_dimensions_plastic', 'delta_weq', 'delta_leaf_L', 'water_influx', 'water_outflow', 'Growth', 'conc_solutes_vol', 'conc_solutes_mass', 'LER']#

concatenation of HIDDENZONE_T_INDEXES, HIDDENZONE_RUN_VARIABLES and HIDDENZONE_POSTPROCESSING_VARIABLES

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

concatenation of T_INDEX and HIDDENZONE_INDEXES

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

Bases: object

Post-processing to apply on HiddenZone outputs.

static calculate_LER(leaf_L, init_leaf_L, delta_t)[source]#

Calculates Leaf elongation rate in phase II

Parameters:
  • leaf_L (float) – Leaf length at time t (m)

  • init_leaf_L (float) – Leaf length at time t-1 (m)

  • delta_t (float) – Delta time (h)

Returns:

Leaf elongation rate (mm h-1)

Return type:

float

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

Massic concentration of solutes used for osmotic water potential calculation

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

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

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

  • mstruct (float) – Structural mass (g)

Returns:

Solutes massic concentration (mol m-3)

Return type:

float

static calculate_conc_solutes_vol(sucrose, fructan, amino_acids, volume)[source]#

Volumic concentration of solutes used for osmotic water potential calculation

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

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

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

  • volume (float) – Volume (m3)

Returns:

Solutes volumic concentration (mol m-3)

Return type:

float

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

the indexes to locate the organs in the modelled system

openalea.cnwgrass.hydraulics.postprocessing.ORGANS_POSTPROCESSING_VARIABLES = []#

organs post-processing variables

openalea.cnwgrass.hydraulics.postprocessing.ORGANS_RUN_POSTPROCESSING_VARIABLES = {'SRWC', 'Tr', 'Tsoil', 'age', 'amino_acids', 'axis', 'green_area', 'mstruct', 'organ', 'plant', 'proteins', 'sucrose', 't', 'water_potential'}#

concatenation of ORGANS_T_INDEXES, ORGANS_RUN_VARIABLES and ORGANS_POSTPROCESSING_VARIABLES

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

concatenation of T_INDEX and ORGANS_INDEXES

class openalea.cnwgrass.hydraulics.postprocessing.Organ[source]#

Bases: object

Post-processing to apply on Organ outputs.

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

the indexes to locate the phytomers in the modelled system

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

phytomers post-processing variables

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

concatenation of PHYTOMERS_T_INDEXES, PHYTOMERS_RUN_VARIABLES and PHYTOMERS_POSTPROCESSING_VARIABLES

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

concatenation of T_INDEX and PHYTOMERS_INDEXES

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

the index to locate the plants in the modelled system

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

plants post-processing variables

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

concatenation of PLANTS_T_INDEXES, PLANTS_RUN_VARIABLES and PLANTS_POSTPROCESSING_VARIABLES

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

concatenation of T_INDEX and PLANTS_INDEXES

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

Bases: object

Post-processing to apply on Xylem outputs.

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

the indexes to locate the soils in the modelled system

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

soils post-processing variables

openalea.cnwgrass.hydraulics.postprocessing.SOILS_RUN_POSTPROCESSING_VARIABLES = ['t', 'plant', 'axis', 'water_content', 'SRWC', 'water_potential']#

concatenation of SOILS_T_INDEXES, SOILS_RUN_VARIABLES and SOILS_POSTPROCESSING_VARIABLES

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

concatenation of T_INDEX and SOILS_INDEXES

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

the time index

class openalea.cnwgrass.hydraulics.postprocessing.Xylem[source]#

Bases: object

Post-processing to apply on Xylem outputs.

openalea.cnwgrass.hydraulics.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 Hydraulics, and save them in directory graphs_dirpath.

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

For each post-processing output dataframe:

  • compute post-processing from Hydraulics outputs,

  • concatenate Hydraulics outputs and post-processing and place the results in a jointed dataframe,

  • reorder the columns of the dataframes according to HIDDENZONE_RUN_POSTPROCESSING_VARIABLES, ELEMENTS_RUN_POSTPROCESSING_VARIABLES, ORGAN_RUN_POSTPROCESSING_VARIABLES

  • and convert the indexes of plants and metamers to integers (if relevant).

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

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

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

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

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

  • organs_df (pandas.DataFrame) – Hydraulics outputs at xylem scale (see simulation.Simulation. ORGAN_RUN_VARIABLES)

  • soils_df (pandas.DataFrame) – Hydraulics outputs at soil scale (see simulation.Simulation.SOILS_RUN_VARIABLES)

  • delta_t (float) – Delta t between 2 outputs (in seconds).

Returns:

dataframes of post-processing for each scale: * hidden zone (see HIDDENZONE_RUN_POSTPROCESSING_VARIABLES) * element (see ELEMENTS_RUN_POSTPROCESSING_VARIABLES) * xylem (see XYLEM_RUN_POSTPROCESSING_VARIABLES) * and soil (see SOILS_RUN_POSTPROCESSING_VARIABLES)

:rtype tuple [pandas.DataFrame]