示例#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:]))
示例#2
0
def test_boundary_layer_conductance_increases_as_air_temperature_increases():
    gb = [
        exchange.boundary_layer_conductance(leaf_length=0.1,
                                            wind_speed=2.0,
                                            atm_pressure=101.3,
                                            air_temp=t,
                                            ideal_gas_cst=exchange.R)
        for t in range(-10, 46)
    ]
    assert all(x <= y for x, y in zip(gb, gb[1:]))
示例#3
0
def test_boundary_layer_conductance_increases_as_wind_speed_increases():
    gb = [
        exchange.boundary_layer_conductance(leaf_length=0.1,
                                            wind_speed=w,
                                            atm_pressure=101.3,
                                            air_temp=25.,
                                            ideal_gas_cst=exchange.R)
        for w in arange(0.0, 5.0, 0.5)
    ]
    assert all(x <= y for x, y in zip(gb, gb[1:]))
示例#4
0
def test_boundary_layer_conductance_decreases_as_leaf_length_increases():
    gb = [
        exchange.boundary_layer_conductance(l,
                                            wind_speed=2.0,
                                            atm_pressure=101.3,
                                            air_temp=25.,
                                            ideal_gas_cst=exchange.R)
        for l in arange(0.001, 0.25, 0.02)
    ]
    assert all(x >= y for x, y in zip(gb, gb[1:]))
示例#5
0
def test_boundary_layer_conductance_is_weakly_dependent_on_atmospheric_pressure(
):
    gb = [
        exchange.boundary_layer_conductance(leaf_length=0.1,
                                            wind_speed=2.,
                                            atm_pressure=p,
                                            air_temp=25.,
                                            ideal_gas_cst=exchange.R)
        for p in arange(90.3, 102.3)
    ]
    assert [
        testing.assert_almost_equal(x, y, decimal=3)
        for x, y in zip(gb, gb[1:])
    ]