Beispiel #1
0
def fVPD(VPD):
    """fVPD Function of leaf stomata respond to air humidity.
    CLRTAP (2017) chap 3, pg 22"""
    temp = ((1 - rs.static_param("fmin")) * (rs.static_param("VPDmin") - VPD) /
            (rs.static_param("VPDmin") - rs.static_param("VPDmax")) +
            rs.static_param("fmin"))
    temp = rs.apply_max(temp)
    temp = rs.apply_min(temp)
    return temp
Beispiel #2
0
def gstol(fphen, fleaf_light, fVPD, ftemp):
    """Based od Jarvis 1976 - The interpretation of the variations in leaf water potential and stomatal conductance found in canopies in the field.
    and improved by Emberson 2000, Simpson et al. 2012, CLRTAP 2017 (chap 3, pg 17)
    gstol and gmax [mmol O3 m-2 PLA s-1]"""
    temp = rs.static_param("gmax") * fphen * fleaf_light * (
        ftemp * fVPD).apply(rs.apply_max)  #  max(fmin, ftemp * fVDP)
    return temp
Beispiel #3
0
# Light condition
fleaf_light = data["R (Wh/m^2)"].apply(gsto.fleaf_light)

# Water condition, Vapour pressure deficit
VPD = gsto.VPD(data["_RH%"], gsto.SVP(
    data["Ts_C (C)"]))  #### APLIKUJ NAJPRV RH_per, potom Teplotu
fVPD = VPD.apply(gsto.fVPD)
#vfVPDF = np.vectorize(gsto.fVPD)
#fVPD = vfVPDF(VPD)
#fVPD = pd.Series(fVPD)

ftemp = data["Ts_C (C)"].apply(gsto.ftemp)

# External conductance
gext = 1 / rs.static_param("rext")

# Stomatal conductance
gstol = gsto.gstol(fphen_y, fleaf_light, fVPD, ftemp)

# Friction velocity u* for futher calculations
vu_starF = np.vectorize(rs.u_star)  # vectorised function u*
vu_star = vu_starF(data["uh_zR (m/s)"])
vu_star = pd.Series(vu_star)

# In-canopy resistance
Rinc = rs.Rinc(rs.SAI(rs.LAI()), vu_star)
#Rinc = rs.Rinc(LAI.SAI,vu_star(data["uh_zR (m/s)"]))

# Stomatal resistance
vrstolF = np.vectorize(rs.rstol)  #  vectorised stomatal resistance
Beispiel #4
0
def ftemp(T_C):
    """ ftemp Function of leaf stomata respond to air temperature [°C]
    CLRTAP (2017) chap 3, pg 21
    T_C denotes air temperature [°C]"""
    bt = (rs.static_param("Tmax") - rs.static_param("Topt")) / (
        rs.static_param("Topt") - rs.static_param("Tmin"))
    if (T_C > rs.static_param("Tmin")) and (T_C < rs.static_param("Tmax")):
        temp = ((T_C - rs.static_param("Tmin")) /
                (rs.static_param("Topt") - rs.static_param("Tmin"))) * (
                    (rs.static_param("Tmax") - T_C) /
                    (rs.static_param("Tmax") - rs.static_param("Topt")))**bt
        temp = rs.apply_max(temp)
        return temp
    else:
        return rs.static_param("fmin")
Beispiel #5
0
def fleaf_light(R):
    """ fleaf_light is a function which describes leaf stomata respond to light
      From CLRTAP (2017), chap 3, pg 20"""
    # PPFD = R/0.486263
    return (1 - math.e**(-rs.static_param("light_a") * (R / 0.486263)))
Beispiel #6
0
def fphen(day):
    """ fphen is a phenology function. Method based on a fixed time interval. 
    From CLRTAP (2017), chap 3, pg 19-20"""
    if day >= rs.static_param("Astart_FD") and day < rs.static_param(
            "Astart_FD") + rs.static_param("fphen_1FD"):
        temp = (1 - rs.static_param("fphen_a")) * (
            (day - rs.static_param("Astart_FD")) /
            rs.static_param("fphen_1FD")) + rs.static_param("fphen_a")
    elif day >= (
            rs.static_param("Astart_FD") + rs.static_param("fphen_1FD")
    ) and day <= rs.static_param("Aend_FD") + rs.static_param("fphen_4FD"):
        temp = 1
    elif day > rs.static_param("Aend_FD") + rs.static_param(
            "fphen_4FD") and day <= rs.static_param("Aend_FD"):
        temp = (1 - rs.static_param("fphen_e")) * (
            (rs.static_param("Aend_FD") - day) /
            rs.static_param("fphen_4FD")) + rs.static_param("fphen_e")
    else:
        temp = 0
    return temp