def calc_mean_func(pct_claym, pct_sandm): s_sat, theta, epsi, taug, tauw, film, psi, chb = calc_Kaff_soil( pct_claym, pct_sandm) factw = s_sat**(1. / df) Kaff_o2g_full, Kaff_o2g, k2, k1_o2, k1_o2_full, kappa_tops = calc_Kaff_O2( s_sat, theta, epsi, taug, tauw, film, DZ, Ncello, BT, alphaV, factw) Kaff_o2g_full = Kaff_o2g_full * o2scal k1_o2_full = k1_o2_full / o2scal Ncell = Ncello k1_s, Kaff_s, Kaff_s_0 = calc_Kaff_SC(s_sat, theta, epsi, taug, tauw, film, DZ, Ncell, alphaV) #damm model k2 = k2 * k2f Vmax = BT * k2 dammf = damm_flx(O2, S, factw, Kaff_s * 1.e0, Kaff_o2g, kappa_tops, Vmax) damfmax = np.max(dammf) dammf = dammf / damfmax #su model suf = su_flx(O2, S, factw, BT, k2 * 1.e0, k1_o2, k1_s, kappa_tops) sufmax = np.max(suf) suf = suf / sufmax #supeca model ms = 0.0 Km_s = 2.0 supf = supmic_flx(O2, S, factw, BT, ms, Km_s, Kaff_o2g, Kaff_s, kappa_tops, k2) supfmax = np.max(supf) supf = supf / supfmax return dammf, suf, supf
ms = [0.0, 50., 100., 200.] supfmax0 = 0. while k < kt: s_sat, theta, epsi, taug, tauw, film, psi, chb = calc_Kaff_soil( pct_clay, pct_sand) factw = s_sat**(1. / df) Kaff_o2g_full, Kaff_o2g, k2, k1_o2, k1_o2_full, kappa_tops = calc_Kaff_O2( s_sat, theta, epsi, taug, tauw, film, DZ, Ncello[0], BT, alphaV, factw) Ncell = 10 k1_s, Kaff_s, Kaff_s_0 = calc_Kaff_SC(s_sat, theta, epsi, taug, tauw, film, DZ, Ncell, alphaV) #supeca model k2 = k2 * k2f Km_s = 2.0 supf = supmic_flx(O2, S[2], factw, BT, ms[k], Km_s, Kaff_o2g, Kaff_s, kappa_tops, k2) supfmax = np.max(supf) if k == 0: supfmax0 = supfmax supf = supf / supfmax0 supflsMs.append(supf) Kaff_o2g = Kaff_o2g * 10. supf = supmic_flx(O2, S[2], factw, BT, ms[k], Km_s, Kaff_o2g, Kaff_s, kappa_tops, k2) supfmax = np.max(supf) supf = supf / supfmax0 supflsMsO.append(supf) k = k + 1 import matplotlib import matplotlib.pyplot as plt
Ncell=10 k1_s,Kaff_s,Kaff_s_0=calc_Kaff_SC(s_sat, theta, epsi, taug, tauw, film, DZ, Ncell, alphaV) #damm model k2=k2*k2f Vmax=BT*k2 dammf=damm_flx(O2,S,factw,Kaff_s*1.e0,Kaff_o2g,kappa_tops,Vmax) damfmax=np.max(dammf) dammf=dammf/damfmax #su model suf=su_flx(O2,S, factw,BT, k2*1.e0, k1_o2, k1_s,kappa_tops) sufmax=np.max(suf) suf=suf/sufmax #supeca model ms=0.0 Km_s=2.0 supf=supmic_flx(O2,S,factw, BT, ms, Km_s, Kaff_o2g, Kaff_s, kappa_tops, k2) supfmax=np.max(supf) supf=supf/supfmax dammfls.append(dammf) sufls.append(suf) supfls.append(supf) k=k+1 plt_to_file=True import matplotlib import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages if plt_to_file: pdf=PdfPages('figure/Figure6.pdf') fig=plt.figure()