Reference guide#
This manual details, for each module of openalea.farquharwheat,
the functions and objects included in openalea.farquharwheat,
describing what they are and what they do.
openalea.farquharwheat package#
farquharwheat#
The model Farquhar-Wheat
openalea.farquharwheat.model module#
- openalea.farquharwheat.model.calculate_photosynthesis(PAR, surfacic_nitrogen, NSC_Retroinhibition, surfacic_NSC, Ts, Ci)[source]#
Computes photosynthesis rate following Farquhar’s model with regulation by organ temperature and nitrogen content. In this version, most of the parameters are derived from Braune et al. (2009) on barley and Evers et al. (2010) for N dependencies.
- Parameters:
PAR (float) – PAR absorbed (µmol m-2 s-1)
surfacic_nitrogen (float) – surfacic nitrogen content(g m-2) including or not structural nitrogen depending on parameter.MODEL_VERSION
NSC_Retroinhibition (bool) – if True, Ag is inhibited by surfacic NSC (Non-Structural Carbohydrates).
surfacic_NSC (float) – surfacic content of NSC (Non-Structural Carbohydrates) (µmol C m-2).
Ts (float) – organ temperature (degree C)
Ci (float) – internal CO2 (µmol mol-1), Ci = 0.7*CO2air for the first iteration
- Returns:
Ag (µmol m-2 s-1), An (µmol m-2 s-1), Rd (µmol m-2 s-1)
- Return type:
- openalea.farquharwheat.model.calculate_surfacic_WSC(sucrose, starch, fructan, green_area)[source]#
Surfacic content of water soluble carbohydrates # TODO: rename by non structural carbohydrates because starch is not water-soluble.
- openalea.farquharwheat.model.calculate_surfacic_nitrogen(nitrates, amino_acids, proteins, Nstruct, green_area)[source]#
Surfacic content of nitrogen
- openalea.farquharwheat.model.calculate_surfacic_nonstructural_nitrogen(nitrates, amino_acids, proteins, green_area)[source]#
Surfacic content of non-structural nitrogen
- openalea.farquharwheat.model.calculate_surfacic_nonstructural_nitrogen_Farquhar(surfacic_photosynthetic_proteins)[source]#
Estimate of non structural SLN used in Farquhar
- openalea.farquharwheat.model.calculate_surfacic_photosynthetic_proteins(proteins, green_area)[source]#
Surfacic content of photosynthetic proteins
- openalea.farquharwheat.model.run(surfacic_nitrogen, NSC_Retroinhibition, surfacic_NSC, width, height, PAR, Ta, ambient_CO2, RH, Ur, organ_name, height_canopy)[source]#
Computes the photosynthesis of a photosynthetic element. The photosynthesis is computed by using the biochemical FCB model (Farquhar et al., 1980) coupled to the semiempirical BWB model of stomatal conductance (Ball, 1987).
- Parameters:
surfacic_nitrogen (float) – surfacic nitrogen content of organs (g m-2), could include total N or proteic N only depending on parameter.SurfacicProteins Properly speaking, photosynthesis should be related to proteins (RubisCO), but parameters of most Farquhar models are calibrated on total N measurements (DUMAS method). We use only non-structural nitrogen to overcome issues in the case of extrem scenarios (high SLN for thick leaves under low nitrogen conditions). If None, surfacic_nitrogen =
NA_0NSC_Retroinhibition (bool) – if True, Ag is inhibited by surfacic NSC (Non-Structural Carbohydrates).
surfacic_NSC (float) – surfacic content of NSC (Non-Structural Carbohydrates) (µmol C m-2).
width (float) – width of the organ (or diameter for stem organ) (m), characteristic dimension to be considered for heat transfer through forced convection (by wind).
height (float) – height of the organ from soil (m)
PAR (float) – absorbed PAR (µmol m-2 s-1)
Ta (float) – air temperature (°C)
ambient_CO2 (float) – air CO2 (µmol mol-1)
RH (float) – relative humidity (decimal fraction)
Ur (float) – wind at the reference height (zr) (m s-1), e.g. top of the canopy + 2m (in the case of wheat, Ur can be approximated as the wind speed at 2m from soil)
organ_name (str) – name of the organ to which belongs the element (used to distinguish lamina from cylindric organs)
height_canopy (float) – total canopy height (m)
- Returns:
Ag (µmol m-2 s-1), An (µmol m-2 s-1), Rd (µmol m-2 s-1), Tr (mmol m-2 s-1), Ts (°C) and gsw (mol m-2 s-1)
- Return type:
openalea.farquharwheat.simulation module#
- class openalea.farquharwheat.simulation.Simulation(update_parameters=None)[source]#
Bases:
objectThe Simulation class permits to initialize and run a simulation.
- inputs#
The inputs of Farquhar-Wheat.
- inputs is a dictionary of dictionaries:
{(plant_index, axis_label, metamer_index, organ_label, element_label): {element_input_name: element_input_value, …}, …}
See
Model.runfor more information about the inputs.
- outputs#
The outputs of Farquhar-Wheat.
- outputs is a dictionary of dictionaries:
{(plant_index, axis_label, metamer_index, organ_label, element_label): {element_output_name: element_output_value, …}, …}
See
Model.runfor more information about the outputs.
- exception openalea.farquharwheat.simulation.SimulationInputsError[source]#
Bases:
SimulationError
openalea.farquharwheat.converter module#
- openalea.farquharwheat.converter.AXIS_TOPOLOGY_COLUMNS = ['plant', 'axis']#
the columns which define the topology in the input/output elements dataframe
- openalea.farquharwheat.converter.ELEMENT_TOPOLOGY_COLUMNS = ['plant', 'axis', 'metamer', 'organ', 'element']#
the columns which define the topology in the input/output elements dataframe
- openalea.farquharwheat.converter.FARQUHARWHEAT_AXES_INPUTS = ['SAM_temperature', 'height_canopy']#
the inputs needed by FarquharWheat at axis scale
- openalea.farquharwheat.converter.FARQUHARWHEAT_ELEMENTS_INPUTS = ['width', 'height', 'PARa', 'nitrates', 'amino_acids', 'proteins', 'Nstruct', 'green_area', 'sucrose', 'starch', 'fructan', 'PARa_prim', 'area_prim']#
the inputs needed by FarquharWheat at element scale
- openalea.farquharwheat.converter.FARQUHARWHEAT_ELEMENTS_INPUTS_OUTPUTS = {'Ag', 'An', 'Nstruct', 'PARa', 'PARa_prim', 'Rd', 'Tr', 'Ts', 'amino_acids', 'area_prim', 'fructan', 'green_area', 'gs', 'height', 'nitrates', 'proteins', 'starch', 'sucrose', 'width'}#
the inputs and outputs of FarquharWheat.
- openalea.farquharwheat.converter.FARQUHARWHEAT_ELEMENTS_OUTPUTS = ['Ag', 'An', 'Rd', 'Tr', 'Ts', 'gs', 'width', 'height']#
the outputs computed by FarquharWheat
- openalea.farquharwheat.converter.from_dataframe(element_inputs, axes_inputs)[source]#
Convert inputs/outputs from Pandas dataframe to Farquhar-Wheat format.
- Parameters:
element_inputs (pandas.DataFrame) – Emerging and mature element inputs dataframe to convert, with one line by element.
axes_inputs (pandas.DataFrame) – axes inputs dataframe to convert, with one line per axis (Shoot Apical Meristem)
- Returns:
The inputs/outputs in a dictionary.
- Return type:
- seealso:: see
simulation.Simulation.inputsandsimulation.Simulation.outputs for the structure of Farquhar-Wheat inputs/outputs.
- openalea.farquharwheat.converter.to_dataframe(data_dict)[source]#
Convert inputs/outputs from Farquhar-Wheat format to Pandas dataframe.
- Parameters:
data_dict (dict) – The inputs/outputs in Farquhar-Wheat format.
- Returns:
one dataframe for element outputs
- Return type:
pandas.DataFrame
- seealso:: see
simulation.Simulation.inputsandsimulation.Simulation.outputs for the structure of Farquhar-Wheat inputs/outputs.
openalea.farquharwheat.parameters module#
farquharwheat.paramters#
The module farquharwheat.parameters defines the constant parameters.
- class openalea.farquharwheat.parameters.AxisDefaultProperties[source]#
Bases:
objectProperties by default for the axis. Used in FarquharWheat facade.
- openalea.farquharwheat.parameters.DELTA_CONVERGENCE = 0.01#
The relative delta for Ci and Ts convergence.
- class openalea.farquharwheat.parameters.ElementDefaultProperties[source]#
Bases:
objectProperties by default for the elements. Used in FarquharWheat facade.
- PARa_prim#
For calculations at primitive scale
- area_prim#
For calculations at primitive scale
- openalea.farquharwheat.parameters.KELVIN_DEGREE = 273.15#
Conversion factor from degree C to Kelvin
- openalea.farquharwheat.parameters.NSC_Retroinhibition = True#
If True, NSC (Non-Structural Carbohydrates) downregulate photosynthesis
- openalea.farquharwheat.parameters.Psurf_to_SLNnonstruct = 1.06#
Conversion factor from surfacic protein content to non-structural SLN (estimation from NEMA and Ljutovac simulations)
- openalea.farquharwheat.parameters.SurfacicProteins = True#
If True, surfacic proteins used to regulate photosynthesis ; if not total N
- openalea.farquharwheat.parameters.prim_scale = False#
If True, photosynthesis calculated at primitive scale, if not at organ scale