Reference guide#

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

openalea.senescwheat package#

senescwheat#

The model Senesc-Wheat

openalea.senescwheat.model module#

class openalea.senescwheat.model.SenescenceModel[source]#

Bases: object

classmethod calculate_N_content_total(proteins, amino_acids, nitrates, Nstruct, max_mstruct, Nresidual)[source]#

N content in the whole element (both green and senesced tissues).

Parameters:
  • proteins (float) – protein concentration (µmol N proteins g-1 mstruct)

  • amino_acids (float) – amino acids concentration (µmol N amino acids g-1 mstruct)

  • nitrates (float) – nitrates concentration (µmol N nitrates g-1 mstruct)

  • Nstruct (float) – structural N mass (g). Should be constant during leaf life.

  • max_mstruct (float) – structural mass maximal of the element i.e. structural mass of the whole element before senescence (g)

  • Nresidual (float) – residual mass of N in the senescent tissu (g)

Returns:

N_content_total (between 0 and 1)

Return type:

float

classmethod calculate_delta_mstruct_root(rate_mstruct_death, rate_Nstruct_death, delta_teq)[source]#

delta of structural mass due to senescence of roots

Parameters:
  • rate_mstruct_death (float) – relative delta of root structural mass over delta_t (g s-1)

  • rate_Nstruct_death (float) – relative delta of root N structural mass over delta_t (g s-1)

  • delta_teq (float) – Temperature-consensated time = time duration at a reference temperature (s)

Returns:

delta_mstruct (g), delta_Nstruct (g)

Return type:

tuple [float, float]

classmethod calculate_delta_mstruct_shoot(relative_delta_green_area, prev_mstruct, prev_Nstruct)[source]#

delta of structural mass due to senescence of photosynthetic elements

Parameters:
  • relative_delta_green_area (float) – relative variation of a photosynthetic element green area (dimensionless)

  • prev_mstruct (float) – previous value of an organ structural mass (g)

  • prev_Nstruct (float) – previous value of an organ structural N (g)

Returns:

delta_mstruct (g), delta_Nstruct (g)

Return type:

tuple [float, float]

classmethod calculate_forced_relative_delta_green_area(green_area_df, group_id, prev_green_area)[source]#

relative green_area variation due to senescence

Parameters:
  • green_area_df (pandas.DataFrame) – a pandas DataFrame containing the green area values for each photosynthetic element at each time

  • group_id (tuple) – the group id to be used to select data in the DataFrame

  • prev_green_area (float) – previous value of an organ green area (m-2)

Returns:

new_green_area (m-2), relative_delta_green_area (dimensionless)

Return type:

tuple [float, float]

classmethod calculate_if_element_is_over(green_area, is_growing, mstruct)[source]#

Define is an element is fully senescent

Parameters:
  • green_area (float) – Green area of the element (m2)

  • is_growing (bool) – flag is the element is still growing

  • mstruct (float) – Strucural mass of the element (g)

Returns:

is_over which indicates if the element is fully senescent

Return type:

bool

classmethod calculate_relative_delta_green_area(organ_name, prev_green_area, proteins, max_proteins, delta_t, update_max_protein)[source]#

relative green_area variation due to senescence

Parameters:
  • organ_name (str) – name of the organ to which belongs the element (used to distinguish lamina from stem organs)

  • prev_green_area (float) – previous value of an organ green area (m-2)

  • proteins (float) – protein concentration (µmol N proteins g-1 mstruct)

  • max_proteins (float) – maximal protein concentrations experienced by the organ (µmol N proteins g-1 mstruct)

  • delta_t (float) – value of the timestep (s)

  • update_max_protein (bool) – whether to update the max proteins or not.

Returns:

new_green_area (m-2), relative_delta_green_area (dimensionless)

Return type:

tuple [float, float]

classmethod calculate_relative_delta_mstruct_roots(rate_mstruct_death, root_mstruct, delta_teq)[source]#

Relative delta of root structural dry matter (g) over delta_t

Parameters:
  • rate_mstruct_death (float) – Rate of mstruct loss by root senescence (g mstruct s-1)

  • root_mstruct (float) – actual mstruct of roots (g)

  • delta_teq (float) – Temperature-consensated time = time duration at a reference temperature (s)

Returns:

relative_delta_mstruct (dimensionless)

Return type:

float

classmethod calculate_relative_delta_senesced_length(organ_name, prev_senesced_length, length, proteins, max_proteins, delta_t, update_max_protein)[source]#

relative senesced length variation

Parameters:
  • organ_name (str) – name of the organ to which belongs the element (used to distinguish lamina from stem organs)

  • prev_senesced_length (float) – previous senesced length of an organ (m-2)

  • length (float) – organ length (m)

  • proteins (float) – protein concentration (µmol N proteins g-1 mstruct)

  • max_proteins (float) – maximal protein concentrations experienced by the organ (µmol N proteins g-1 mstruct)

  • delta_t (float) – value of the timestep (s)

  • update_max_protein (bool) – whether to update the max proteins or not.

Returns:

new_senesced_length (m), relative_delta_senesced_length (dimensionless), max_proteins (µmol N proteins g-1 mstruct)

Return type:

tuple [float, float, float]

classmethod calculate_remobilisation(metabolite, relative_delta_structure)[source]#

Metabolite remobilisation due to senescence over DELTA_T (µmol).

Parameters:
  • metabolite (float) – amount of any metabolite to be remobilised (µmol)

  • relative_delta_structure (float) – could be relative variation of a photosynthetic element green area or relative variation of mstruct

Returns:

metabolite remobilisation (µmol)

Return type:

float

classmethod calculate_remobilisation_proteins(organ, element_index, proteins, relative_delta_green_area, ratio_N_mstruct_max, full_remob)[source]#

Protein remobilisation due to senescence over DELTA_T. Part is remobilised as amino_acids (µmol N), the rest is increasing Nresidual (g).

Parameters:
  • organ (str) – name of the organ

  • element_index (int) – phytomer rank

  • proteins (float) – amount of proteins (µmol N)

  • relative_delta_green_area (float) – relative variation of a photosynthetic element green area

  • ratio_N_mstruct_max (float) – N content in the whole element (both green and senesced tissues).

  • full_remob (bool) – whether all proteins should be remobilised

Returns:

Quantity of proteins remobilised either in amino acids, either in residual N (µmol), Quantity of proteins converted into amino_acids (µmol N), Increment of Nresidual (g)

Return type:

tuple [float, float, float]

classmethod calculate_roots_senescence(mstruct, Nstruct, postflowering_stages)[source]#

Root senescence :param float mstruct: structural mass (g) :param float Nstruct: structural N (g) :param bool postflowering_stages: if True the model will calculate root growth with the parameters calibrated for post flowering stages

Returns:

Rate of mstruct loss by root senescence (g mstruct s-1), rate of Nstruct loss by root senescence (g Nstruct s-1)

Return type:

tuple [float, float]

openalea.senescwheat.simulation module#

class openalea.senescwheat.simulation.Simulation(delta_t=1, update_parameters=None)[source]#

Bases: object

The Simulation class permits to initialize and run a simulation.

delta_t#

the delta t of the simulation (in seconds)

initialize(inputs)[source]#

Initialize inputs from inputs.

Parameters:

inputs (dict) – The inputs by roots and element. inputs must be a dictionary with the same structure as inputs.

inputs#

The inputs of Senesc-Wheat.

inputs is a dictionary of dictionaries:
{‘roots’: {(plant_index, axis_label): {roots_input_name: roots_input_value, …}, …},

‘elements’: {(plant_index, axis_label, metamer_index, organ_label, element_label): {element_input_name: element_input_value, …}, …}}

outputs#

The outputs of Senesc-Wheat.

outputs is a dictionary of dictionaries:
{‘roots’: {(plant_index, axis_label): {roots_output_name: roots_output_value, …}, …},

‘elements’: {(plant_index, axis_label, metamer_index, organ_label, element_label): {element_output_name: element_output_value, …}, …}}

run(forced_max_protein_elements=None, opt_full_remob=False, postflowering_stages=False)[source]#

Compute Senesc-Wheat outputs from inputs, and update outputs.

Parameters:
  • forced_max_protein_elements (set) – The elements ids with fixed max proteins.

  • postflowering_stages (bool) – True to run a simulation with postflo parameter

  • opt_full_remob (bool) – whether all proteins should be remobilised

openalea.senescwheat.converter module#

openalea.senescwheat.converter.AXES_TOPOLOGY_COLUMNS = ['plant', 'axis']#

the columns which define the topology of a roots in the input/output dataframe

openalea.senescwheat.converter.ELEMENTS_TOPOLOGY_COLUMNS = ['plant', 'axis', 'metamer', 'organ', 'element']#

the columns which define the topology of an element in the input/output dataframe

openalea.senescwheat.converter.ROOTS_TOPOLOGY_COLUMNS = ['plant', 'axis']#

the columns which define the topology of a roots in the input/output dataframe

openalea.senescwheat.converter.SENESCWHEAT_AXES_INPUTS = ['delta_teq', 'delta_teq_roots', 'sum_TT']#

the inputs needed by SenescWheat at axis scale

openalea.senescwheat.converter.SENESCWHEAT_AXES_INPUTS_OUTPUTS = ['delta_teq', 'delta_teq_roots', 'sum_TT']#

the inputs and outputs of SenescWheat at axis scale

openalea.senescwheat.converter.SENESCWHEAT_AXES_OUTPUTS = []#

the outputs computed by SenescWheat at axis scale

openalea.senescwheat.converter.SENESCWHEAT_ELEMENTS_INPUTS = ['green_area', 'senesced_length_element', 'length', 'proteins', 'mstruct', 'senesced_mstruct', 'max_proteins', 'Nstruct', 'nitrates', 'amino_acids', 'starch', 'fructan', 'cytokinins', 'sucrose', 'is_growing', 'max_mstruct', 'Nresidual', 'age']#

the inputs needed by SenescWheat at element scale

openalea.senescwheat.converter.SENESCWHEAT_ELEMENTS_INPUTS_OUTPUTS = ['N_content_total', 'Nresidual', 'Nstruct', 'age', 'amino_acids', 'cytokinins', 'fructan', 'green_area', 'is_growing', 'is_over', 'length', 'max_mstruct', 'max_proteins', 'mstruct', 'nitrates', 'proteins', 'senesced_length_element', 'senesced_mstruct', 'starch', 'sucrose']#

the inputs and outputs of SenescWheat at elements scale

openalea.senescwheat.converter.SENESCWHEAT_ELEMENTS_OUTPUTS = ['senesced_length_element', 'green_area', 'mstruct', 'senesced_mstruct', 'Nstruct', 'starch', 'sucrose', 'fructan', 'proteins', 'amino_acids', 'cytokinins', 'nitrates', 'N_content_total', 'Nresidual', 'is_over']#

the outputs computed by SenescWheat at elements scale

openalea.senescwheat.converter.SENESCWHEAT_ROOTS_INPUTS = ['sucrose', 'amino_acids', 'mstruct', 'senesced_mstruct', 'Nstruct', 'cytokinins']#

the inputs needed by SenescWheat at roots scale

openalea.senescwheat.converter.SENESCWHEAT_ROOTS_INPUTS_OUTPUTS = ['Nstruct', 'amino_acids', 'cytokinins', 'mstruct', 'rate_mstruct_death', 'senesced_mstruct', 'sucrose']#

the inputs and outputs of SenescWheat at roots scale

openalea.senescwheat.converter.SENESCWHEAT_ROOTS_OUTPUTS = ['rate_mstruct_death', 'mstruct', 'senesced_mstruct', 'Nstruct', 'cytokinins']#

the outputs computed by SenescWheat at roots scale

openalea.senescwheat.converter.from_dataframes(roots_inputs, axes_inputs, elements_inputs)[source]#

Convert inputs/outputs from Pandas dataframes to Senesc-Wheat format.

Parameters:
  • roots_inputs (pandas.DataFrame) – Roots inputs dataframe to convert, with one line by roots.

  • axes_inputs (pandas.DataFrame) – axes inputs dataframe to convert, with one line by axis.

  • elements_inputs (pandas.DataFrame) – Elements inputs dataframe to convert, with one line by element.

Returns:

The inputs/outputs in a dictionary.

Return type:

dict [str, dict]

seealso:: see simulation.Simulation.inputs and simulation.Simulation.outputs

for the structure of Senesc-Wheat inputs/outputs.

openalea.senescwheat.converter.to_dataframes(data_dict)[source]#

Convert inputs/outputs from Senesc-Wheat format to Pandas dataframe.

Parameters:

data_dict (dict) – The inputs/outputs in Senesc-Wheat format.

Returns:

One dataframe for roots inputs/outputs, one dataframe for axes inputs/outputs, one dataframe for elements inputs/outputs.

Return type:

(pandas.DataFrame, pandas.DataFrame, pandas.DataFrame)

seealso:: see simulation.Simulation.inputs and simulation.Simulation.outputs

for the structure of Senesc-Wheat inputs/outputs.

openalea.senescwheat.parameters module#

senescwheat.parameters#

Parameters used in the model of senescence.

openalea.senescwheat.parameters.AGE_EFFECT_SENESCENCE = 450#

Age-induced senescence (degree-day since leaf emergence calculated from elong-wheat as equivalent at 12°C)

openalea.senescwheat.parameters.DEFAULT_RATIO_N_MSTRUCT = 0.005#

default N content in total organ mass (senesced + green) if phytomer rank not found above

openalea.senescwheat.parameters.MIN_GREEN_AREA = 5e-09#

Minimal green area of an element (m2). Below this area, set green_area to 0.0.

openalea.senescwheat.parameters.N_MOLAR_MASS = 14#

Molar mass of nitrogen (g mol-1)

openalea.senescwheat.parameters.SENESCENCE_ROOTS_POSTFLOWERING = 1.575e-07#

Rate of root turnover at 12°C (s-1). Value at 20°C coming from Johnson and Thornley (1985), see also Asseng et al. (1997).