예제 #1
0
##---Constant Parameter Arrays for Model---##

#I have commented out parameters that I am assuming are variable (for the time being)

s_c = np.linspace(0.019 - 0.0005, 0.019 + 0.0005,
                  2)  #specific leaf area (m2 C/g C)
ra = np.zeros(shape=2) + 20.7  #specific rubisco activity (umol CO2/g Rub s)
nm_c = ((s_c * (100.0**2)) * 0.077 + 20.25) / 1000.0  #leaf nitrogen (g N/ g C)
flnr = np.zeros(
    shape=2) + 0.65  #fraction of leaf nitrogen in rubisco (g N Rub/g N leaf)
frnr = np.zeros(
    shape=2
) + 6.25  #weight fraction of nitrogen in rubisco molecule (g Rub/g N Rub)
ea_str = pa_con_atmfrac(611 * np.exp(
    17.27 * t /
    (t + 273.3)))  #saturation vapor pressure of air (Pa-->umol h20.mol air)
rh = np.zeros(shape=2) + 0.55  #relative humidity (kPa/kPa)
ea = rh * ea_str  #vapor pressure deficit (umol h2O/mol air)
ca = np.zeros(shape=2) + 410  #ambient carbon dioxide (umol CO2/mol air)
tau25 = np.zeros(
    shape=2) + 2904.12  #specifity coefficient of tau at 25 C (unitless)
ko25 = np.zeros(
    shape=2
) + 296100  #Michaelis-Menten kinetic coefficient for oxygen at 25 C(umol/mol)
kc25 = np.zeros(
    shape=2
) + 296  #Michaelis-Menten kinetic coefficient for carbon dioxide at 25 C (umol/mol)
o = np.zeros(shape=2) + 210000  #concentration of ambient oxygen (umol/mol)
#lamb=np.zeros(shape=3)+0.0074 #marginal WUE (umol CO2/umol H2O)
b = np.zeros(
        for iii in range(len(na[0])):

            b_i = biotic_index[iii]

            #correct for microclimate abiotic conditions
            t_dm = t[0]

            #correct for volumetric moisture content
            vwc_dm = vwc[0]

            #------calculate vapor pressure-----#
            pa_v = 611 * np.exp(
                (17.27 * t_dm) /
                (t_dm + 237.3))  #saturation vapor pressure of air (Pa)
            ea_str = pa_con_atmfrac(
                pa_v, 3528
            )  #saturation vapor pressure of air (Pa-->umol h20/mol air)
            ea = rh * ea_str  #vapor pressure (umol h2O/mol air)

            #correct for leaf temperatures using leaf height

            t_diff = 18 - 0.4 * ht[0][iii]

            tl = t_dm + t_diff

            #---------------Photosynthesis Function---------------#

            #alter this line of code for when implementing different photosynthesis functions
            wue, nue, A, E, cs, ci, gsw, gs, gbw, gb, gm, cc, dd = photo(
                tk_25, ekc, eko, etau, ev, ej, toptv, toptj, na[0][iii], qeff,
                PAR, tl, ea, chl[0][iii], ij, kc25, ko25, o, ca, rh, m, a,
##---Constant Parameter Arrays for Model---##

#I have commented out parameters that I am assuming are variable (for the time being)

s_c = np.linspace(0.019 - 0.0005, 0.019 + 0.0005,
                  2)  #specific leaf area (m2 C/g C)
ra = np.zeros(shape=2) + 20.7  #specific rubisco activity (umol CO2/g Rub s)
nm_c = ((s_c * (100.0**2)) * 0.077 + 20.25) / 1000.0  #leaf nitrogen (g N/ g C)
flnr = np.zeros(
    shape=2) + 0.65  #fraction of leaf nitrogen in rubisco (g N Rub/g N leaf)
frnr = np.zeros(
    shape=2
) + 6.25  #weight fraction of nitrogen in rubisco molecule (g Rub/g N Rub)
ea_str = pa_con_atmfrac(611 * np.exp(
    17.27 * t /
    (t + 273.3)))  #saturation vapor pressure of air (Pa-->umol h20.mol air)
rh = np.zeros(shape=2) + 0.55  #relative humidity (kPa/kPa)
ea = rh * ea_str  #vapor pressure deficit (umol h2O/mol air)
ca = np.zeros(shape=2) + 410  #ambient carbon dioxide (umol CO2/mol air)
tau25 = np.zeros(
    shape=2) + 2904.12  #specifity coefficient of tau at 25 C (unitless)
ko25 = np.zeros(
    shape=2
) + 296100  #Michaelis-Menten kinetic coefficient for oxygen at 25 C(umol/mol)
kc25 = np.zeros(
    shape=2
) + 296  #Michaelis-Menten kinetic coefficient for carbon dioxide at 25 C (umol/mol)
o = np.zeros(shape=2) + 210000  #concentration of ambient oxygen (umol/mol)
#lamb=np.zeros(shape=3)+0.0074 #marginal WUE (umol CO2/umol H2O)
b = np.zeros(