Reference guide#
This manual details, for each module of openalea.cnwgrass.gasexchange,
the functions and objects included in openalea.cnwgrass.gasexchange,
describing what they are and what they do.
openalea.cnwgrass.gasexchange package#
gasexchange#
The model Gas-Exchange
openalea.cnwgrass.gasexchange.model module#
- openalea.cnwgrass.gasexchange.model.calculate_Ci(ambient_CO2, An, gsw)[source]#
Calculates the internal CO2 concentration (Ci)
- openalea.cnwgrass.gasexchange.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.cnwgrass.gasexchange.model.calculate_surfacic_WSC(sucrose, starch, fructan, green_area)[source]#
Surfacic content of water soluble carbohydrates # TODO: rename because starch is not water-soluble.
- openalea.cnwgrass.gasexchange.model.calculate_surfacic_nitrogen(nitrates, amino_acids, proteins, Nstruct, green_area)[source]#
Surfacic content of nitrogen
- openalea.cnwgrass.gasexchange.model.calculate_surfacic_nonstructural_nitrogen(nitrates, amino_acids, proteins, green_area)[source]#
Surfacic content of non-structural nitrogen
- openalea.cnwgrass.gasexchange.model.calculate_surfacic_nonstructural_nitrogen_Farquhar(surfacic_photosynthetic_proteins)[source]#
Estimate of non structural SLN used in Farquhar
- openalea.cnwgrass.gasexchange.model.calculate_surfacic_photosynthetic_proteins(proteins, green_area)[source]#
Surfacic content of photosynthetic proteins
- openalea.cnwgrass.gasexchange.model.organ_temperature(w, z, Zh, Ur, PAR, gsw, Ta, Ts, RH, organ_name)[source]#
Energy balance for the estimation of organ temperature
- Parameters:
w (float) – organ characteristic dimension (m) to be considered for heat transfer through forced convection (by wind). For a leaf: its width (more related to wind direction than length), for cylindric stem elements: diameter.
z (float) – organ height from soil (m)
Zh (float) – canopy height (m)
Ur (float) – wind speed (m s-1) at the reference height (zr), e.g. top of the canopy + 2m (in the case of wheat, Ur can be approximated as the wind speed at 2m from soil)
PAR (float) – absorbed PAR (µmol m-2 s-1)
gsw (float) – stomatal conductance to water vapour (mol m-2 s-1)
Ta (float) – air temperature (degree C)
Ts (float) – organ temperature (degree C). Ts = Ta at the first iteration of the numeric resolution
RH (float) – Relative humidity (decimal fraction)
organ_name (str) – name of the organ to which belongs the element (used to distinguish lamina from cylindric organs)
- Returns:
Ts (organ temperature, degree C), Tr (organ transpiration rate, mm s-1)
- Return type:
- openalea.cnwgrass.gasexchange.model.stomatal_conductance_BWB(Ag, An, surfacic_nitrogen, ambient_CO2, RH)[source]#
Ball, Woodrow, and Berry model of stomatal conductance (1987)
- Parameters:
Ag (float) – gross assimilation rate (µmol m-2 s-1)
An (float) – net assimilation rate (µmol m-2 s-1)
surfacic_nitrogen (float) – surfacic nitrogen content(g m-2) including or not structural nitrogen depending on parameter.MODEL_VERSION
ambient_CO2 (float) – Air CO2 (µmol mol-1)
RH (float) – Relative humidity (decimal fraction)
- Returns:
gsw (mol m-2 s-1)
- Return type:
- openalea.cnwgrass.gasexchange.model.stomatal_conductance_Leuning(Ag, An, Ta, ambient_CO2, RH)[source]#
Leuning model of stomatal conductance to water (1995)
- openalea.cnwgrass.gasexchange.model.stomatal_conductance_Tuzet(Ag, An, Ta, ambient_CO2, water_potential)[source]#
Tuzet model of stomatal conductance to water (2003)
- Parameters:
- Returns:
gsw (mol m-2 s-1)
- Return type:
openalea.cnwgrass.gasexchange.simulation module#
- class openalea.cnwgrass.gasexchange.simulation.Simulation(update_parameters=None, stomatal_model_name='BWB', hydraulics=False)[source]#
Bases:
objectThe Simulation class permits to initialize and run a simulation.
- axes_inputs#
the inputs needed by Gas-Exchange at axis scale
- elements_inputs#
the inputs needed by Gas-Exchange at element scale
- elements_outputs#
the outputs computed by Gas-Exchange
- inputs#
inputs is a dictionary of dictionaries: {(plant_index, axis_label, metamer_index, organ_label, element_label): {element_input_name: element_input_value, …}, …}
- outputs#
outputs is a dictionary of dictionaries: {(plant_index, axis_label, metamer_index, organ_label, element_label): {element_output_name: element_output_value, …}, …}
- exception openalea.cnwgrass.gasexchange.simulation.SimulationInputsError[source]#
Bases:
SimulationError
openalea.cnwgrass.gasexchange.converter module#
- openalea.cnwgrass.gasexchange.converter.AXIS_TOPOLOGY_COLUMNS = ['plant', 'axis']#
the columns which define the topology in the input/output elements dataframe
- openalea.cnwgrass.gasexchange.converter.ELEMENT_TOPOLOGY_COLUMNS = ['plant', 'axis', 'metamer', 'organ', 'element']#
the columns which define the topology in the input/output elements dataframe
- openalea.cnwgrass.gasexchange.converter.from_dataframe(element_inputs, axes_inputs)[source]#
Convert inputs/outputs from Pandas dataframe to Gas-Exchange 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:
- see also:: see
simulation.Simulation.inputsandsimulation.Simulation.outputs for the structure of Gas-Exchange inputs/outputs.
- openalea.cnwgrass.gasexchange.converter.to_dataframe(data_dict, element_outputs)[source]#
Convert inputs/outputs from Gas-Exchange format to Pandas dataframe.
- Parameters:
- Returns:
one dataframe for element outputs
- Return type:
pandas.DataFrame
- see also:: see
simulation.Simulation.inputsandsimulation.Simulation.outputs for the structure of Gas-Exchange inputs/outputs.
openalea.cnwgrass.gasexchange.parameters module#
gasexchange.parameters#
The module gasexchange.parameters defines the constant parameters.
- openalea.cnwgrass.gasexchange.parameters.DELTA_CONVERGENCE = 0.01#
The relative delta for Ci and Ts convergence.
- class openalea.cnwgrass.gasexchange.parameters.ElementDefaultProperties[source]#
Bases:
objectProperties by default for the elements. Used in Gas-Exchange facade.
- PARa_prim#
For calculations at primitive scale
- area_prim#
For calculations at primitive scale
- openalea.cnwgrass.gasexchange.parameters.KELVIN_DEGREE = 273.15#
Conversion factor from degree C to Kelvin
- openalea.cnwgrass.gasexchange.parameters.NSC_Retroinhibition = True#
If True, NSC (Non-Structural Carbohydrates) downregulate photosynthesis
- openalea.cnwgrass.gasexchange.parameters.Psurf_to_SLNnonstruct = 1.06#
Conversion factor from surfacic protein content to non-structural SLN (estimation from NEMA and Ljutovac simulations)
- openalea.cnwgrass.gasexchange.parameters.SurfacicProteins = True#
If True, surfacic proteins used to regulate photosynthesis ; if not total N
- openalea.cnwgrass.gasexchange.parameters.prim_scale = False#
If True, photosynthesis calculated at primitive scale, if not at organ scale