Esempio n. 1
0
def test_transpiration_rate_incrases_as_vapor_pressure_deficit_increases(
        leaf_local_weather=setup_leaf_local_weather()):
    air_temp = 25.
    leaf_temp = 25.
    atmospheric_pressure = leaf_local_weather['Pa']
    gb = exchange.boundary_layer_conductance(
        leaf_length=0.1,
        wind_speed=leaf_local_weather['u'],
        atm_pressure=leaf_local_weather['Pa'],
        air_temp=air_temp,
        ideal_gas_cst=exchange.R)
    es = utilities.saturated_air_vapor_pressure(leaf_temp)

    gs = exchange.an_gs_ci(photo_params=exchange.par_photo_default(),
                           meteo_leaf=leaf_local_weather,
                           psi=0.0,
                           leaf_temperature=34.,
                           model='misson',
                           g0=0.019,
                           rbt=2. / 3.,
                           ca=400.,
                           m0=5.278,
                           psi0=-0.1,
                           d0_leuning=30.,
                           steepness_tuzet=1.85)[-1]

    transpiration = [
        exchange.transpiration_rate(leaf_temp, ea, gs, gb,
                                    atmospheric_pressure)
        for ea in linspace(es, 0, 10)
    ]
    assert all(x <= y for x, y in zip(transpiration, transpiration[1:]))
Esempio n. 2
0
def transpiration_rate(leaf_temperature, ea, gs, gb, atm_pressure=101.3):
    """Computes transpiration rate per unit leaf surface area.

    Args:
        leaf_temperature (float): [°C] leaf temperature
        ea (float): [kPa] air vapor pressure
        gs (float): [mol m-2 s-1] stomatal conductance to water vapor
        gb (float): [mol m-2 s-1] boundary layer conductance to water vapor
        atm_pressure (float): [kPa] atmospheric pressure

    Returns:
        (float): [mol m-2leaf s-1] transpiration rate

    Warnings:
        gb is calculated for both sides of a flat leaf.

    """

    gv = 1. / ((2. / gb) + (1. / gs))
    es_l = utils.saturated_air_vapor_pressure(leaf_temperature)
    transpiration = gv * ((es_l - ea) / atm_pressure)

    return transpiration
Esempio n. 3
0
def gas_exchange_rates(g,
                       photo_params,
                       photo_n_params,
                       gs_params,
                       meteo,
                       E_type2,
                       leaf_lbl_prefix='L',
                       rbt=2. / 3.):
    """Computes gas exchange fluxes at the leaf scale analytically.

    Args:
        g: a multiscale tree graph object
        photo_params (dict): values at 25 °C of Farquhar's model (cf. :func:`par_photo_default`)
        photo_n_params (dict): the (slope, intercept) values of the linear relationship between photosynthetic capacity
            parameters (Vcmax, Jmax, TPU, Rd) and surface-based leaf Nitrogen content
        gs_params (dict): parameters of the stomatal conductance model (model, g0, m0, psi0, D0, n)
        meteo (pandas.DataFrame): meteorological data
        E_type2 (str): one of 'Ei' (intercepted irradiance) or 'Eabs' (absorbed irradiance)
        leaf_lbl_prefix (str): prefix of the label of the leaves
        rbt (float): [m2 s ubar umol-1] the combined turbulance and boundary layer resistance to CO2 transport

    References:
        Evers et al. 2010.
            Simulation of wheat growth and development based on organ-level photosynthesis and assimilate allocation.
            Journal of Experimental Botany 61, 2203 – 2216.

    Notes:
        This function adds to each leaf the following properties:
            An (float): [umol m-2 s-1] the net CO2 assimilation
            Ci (float): [umol mol] intercellular CO2 concentration
            gs (float): [mol m-2 s-1] stomatal conductance to water vapor
            gb (float): [mol m-2 s-1] boundary layer conductance to water vapor
            E (float): [mol m-2leaf s-1] transpiration per unit leaf surface area

    """

    model, g0max, m0, psi0, D0, n = [
        gs_params[ikey] for ikey in ('model', 'g0', 'm0', 'psi0', 'D0', 'n')
    ]

    meteo_leaf = deepcopy(meteo)
    meteo_leaf = meteo_leaf.iloc[0]

    for vid in g:
        if vid > 0:
            node = g.node(vid)
            if node.label.startswith(leaf_lbl_prefix):
                t_air = meteo_leaf.Tac
                hs = meteo_leaf.hs
                u = meteo_leaf.u
                c_a = meteo_leaf.Ca
                atm_press = meteo_leaf.Pa

                node.u = u  # TODO replace the meso-wind speed (u) by a micro-wind speed at the level of each leaf

                psi = node.properties()['psi_head']
                t_leaf = node.properties()['Tlc']
                ppfd_leaf = node.properties()[E_type2]

                meteo_leaf['PPFD'] = ppfd_leaf
                meteo_leaf['Rg'] = ppfd_leaf / (0.48 * 4.6)

                leaf_par_photo = deepcopy(photo_params)
                leaf_par_photo['Vcm25'] = photo_n_params['Vcm25_N'][
                    0] * node.Na + photo_n_params['Vcm25_N'][1]
                leaf_par_photo['Jm25'] = photo_n_params['Jm25_N'][
                    0] * node.Na + photo_n_params['Jm25_N'][1]
                leaf_par_photo['TPU25'] = photo_n_params['TPU25_N'][
                    0] * node.Na + photo_n_params['TPU25_N'][1]
                leaf_par_photo['Rd'] = photo_n_params['Rd_N'][
                    0] * node.Na + photo_n_params['Rd_N'][1]
                dhd_max = leaf_par_photo['dHd']
                dhd = dHd_sensibility(psi,
                                      t_leaf,
                                      dhd_max=dhd_max,
                                      dhd_inhib_beg=195.,
                                      dHd_inhib_max=180.,
                                      psi_inhib_beg=-.75,
                                      psi_inhib_max=-2.,
                                      temp_inhib_beg=32,
                                      temp_inhib_max=33)

                leaf_par_photo['dHd'] = dhd
                node.par_photo = leaf_par_photo

                g0 = g0max  # *g0_sensibility(psi, psi_crit=-1, n=4)

                a_n, c_c, c_i, gs = an_gs_ci(node.par_photo, meteo_leaf, psi,
                                             t_leaf, model, g0, rbt, c_a, m0,
                                             psi0, D0, n)

                gb = boundary_layer_conductance(node.Length, u, atm_press,
                                                t_air, R)

                # Transpiration
                es_a = utils.saturated_air_vapor_pressure(t_air)
                ea = es_a * hs / 100.
                e = transpiration_rate(t_leaf, ea, gs, gb, atm_press)

                node.An = a_n
                node.Ci = c_i
                node.gs = gs
                node.gb = gb
                node.E = max(0., e)

    return