Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132923 views
License: OTHER
Kernel: SageMath 7.3

Table of symbolic variables used in other worksheets

Below, we import variables and their definitions and units from other worksheets and display them in a sorted table. We also generate latex code for inclusion in manuscript.

%%capture storage # The above redirects all output of the below commands to the variable 'storage' instead of displaying it. # It can be viewed by typing: 'storage()' # Setting up worksheet and importing equations for explicit leaf energy balance load('temp/Worksheet_setup.sage')
# List all .ipynb files list_files = os.listdir('.') for fname in list_files: if fname[-5:] == 'ipynb': print fname
Tables_of_variables.ipynb Worksheet_update.ipynb Worksheet_setup.ipynb stomatal_cond_eqs.ipynb leaf_chamber_eqs.ipynb leaf_chamber_data.ipynb leaf_enbalance_eqs.ipynb E_PM_eqs.ipynb
# From leaf_enbalance_eqs, E_PM_eqs and stomatal_cond_eqs load_session('temp/leaf_enbalance_eqs.sobj') dict_vars1 = dict_vars.copy() load_session('temp/stomatal_cond_eqs.sobj') dict_vars1.update(dict_vars) load_session('temp/E_PM_eqs.sobj') dict_vars1.update(dict_vars) dict_vars = dict_vars1.copy() fun_loadvars(vardict=dict_vars) # re-loading variable definitions udict = {} for key1 in dict_vars.keys(): udict[key1] = dict_vars[key1]['units'] # exporting units information from dict_vars to udict, which will be used below.
# Creating dictionary to substitute names of units with shorter forms var('m s J Pa K kg mol') subsdict = {meter: m, second: s, joule: J, pascal: Pa, kelvin: K, kilogram: kg, mole: mol} var('N_Re_L N_Re_c N_Le N_Nu_L N_Gr_L N_Sh_L') dict_varnew = {Re: N_Re_L, Re_c: N_Re_c, Le: N_Le, Nu: N_Nu_L, Gr: N_Gr_L, Sh: N_Sh_L} dict_varold = {v: k for k, v in dict_varnew.iteritems()} variables = sorted([str(variable.subs(dict_varnew)) for variable in udict.keys()],key=str.lower) tableheader = [('Variable', 'Description (value)', 'Units')] tabledata = [('Variable', 'Description (value)', 'Units')] for variable1 in variables: variable2 = eval(variable1).subs(dict_varold) variable = str(variable2) tabledata.append((eval(variable),docdict[eval(variable)],fun_units_formatted(variable))) table(tabledata, header_row=True)
latex(table(tabledata))
\begin{tabular}{lll} Variable & Description (value) & Units \\ $A_{p}$ & Cross-sectional pore area & m$^{2}$ \\ $a_{s}$ & Fraction of one-sided leaf area covered by stomata (1 if stomata are on one side only, 2 if they are on both sides) & 1 \\ ${a_{sh}}$ & Fraction of projected area exchanging sensible heat with the air (2) & 1 \\ $\alpha_{a}$ & Thermal diffusivity of dry air & m$^{2}$ s$^{-1}$ \\ $B_{l}$ & Boundary layer thickness & m \\ ${\beta_B}$ & Bowen ratio (sensible/latent heat flux) & 1 \\ $c_{E}$ & Latent heat transfer coefficient & J Pa$^{-1}$ m$^{-2}$ s$^{-1}$ \\ $c_{H}$ & Sensible heat transfer coefficient & J K$^{-1}$ m$^{-2}$ s$^{-1}$ \\ ${c_{pa}}$ & Specific heat of dry air (1010) & J K$^{-1}$ kg$^{-1}$ \\ ${C_{wa}}$ & Concentration of water in the free air & mol m$^{-3}$ \\ ${C_{wl}}$ & Concentration of water in the leaf air space & mol m$^{-3}$ \\ $d_{p}$ & Pore depth & m \\ ${D_{va}}$ & Binary diffusion coefficient of water vapour in air & m$^{2}$ s$^{-1}$ \\ ${\Delta_{eTa}}$ & Slope of saturation vapour pressure at air temperature & Pa K$^{-1}$ \\ $E_{l}$ & Latent heat flux from leaf & J m$^{-2}$ s$^{-1}$ \\ ${E_{l,mol}}$ & Transpiration rate in molar units & mol m$^{-2}$ s$^{-1}$ \\ $E_{w}$ & Latent heat flux from a wet surface & J m$^{-2}$ s$^{-1}$ \\ $\epsilon$ & Water to air molecular weight ratio (0.622) & 1 \\ $\epsilon_{l}$ & Longwave emmissivity of the leaf surface (1.0) & 1 \\ $F_{p}$ & Fractional pore area (pore area per unit leaf area) & 1 \\ $f_{u}$ & Wind function in Penman approach, f(u) adapted to energetic units & J Pa$^{-1}$ m$^{-2}$ s$^{-1}$ \\ $g$ & Gravitational acceleration (9.81) & m s$^{-2}$ \\ ${g_{bw}}$ & Boundary layer conductance to water vapour & m s$^{-1}$ \\ ${g_{bw,mol}}$ & Boundary layer conductance to water vapour & mol m$^{-2}$ s$^{-1}$ \\ $g_{\mathit{sp}}$ & Diffusive conductance of a stomatal pore & mol m$^{-2}$ s$^{-1}$ \\ ${g_{sw}}$ & Stomatal conductance to water vapour & m s$^{-1}$ \\ ${g_{sw,mol}}$ & Stomatal conductance to water vapour & mol m$^{-2}$ s$^{-1}$ \\ ${g_{tw}}$ & Total leaf conductance to water vapour & m s$^{-1}$ \\ ${g_{tw,mol}}$ & Total leaf layer conductance to water vapour & mol m$^{-2}$ s$^{-1}$ \\ $\gamma_{v}$ & Psychrometric constant & Pa K$^{-1}$ \\ $h_{c}$ & Average 1-sided convective transfer coefficient & J K$^{-1}$ m$^{-2}$ s$^{-1}$ \\ $H_{l}$ & Sensible heat flux from leaf & J m$^{-2}$ s$^{-1}$ \\ $k_{a}$ & Thermal conductivity of dry air & J K$^{-1}$ m$^{-1}$ s$^{-1}$ \\ ${k_{dv}}$ & Ratio $D_{va}/V_m$ & mol m$^{-1}$ s$^{-1}$ \\ $L_{l}$ & Characteristic length scale for convection (size of leaf) & m \\ $l_{p}$ & Pore length & m \\ $\lambda_{E}$ & Latent heat of evaporation (2.45e6) & J kg$^{-1}$ \\ $M_{N_{2}}$ & Molar mass of nitrogen (0.028) & kg mol$^{-1}$ \\ $M_{O_{2}}$ & Molar mass of oxygen (0.032) & kg mol$^{-1}$ \\ $M_{w}$ & Molar mass of water (0.018) & kg mol$^{-1}$ \\ ${N_{Gr_L}}$ & Grashof number & 1 \\ ${N_{Le}}$ & Lewis number & 1 \\ $n_{\mathit{MU}}$ & n=2 for hypostomatous, n=1 for amphistomatous leaves & 1 \\ ${N_{Nu_L}}$ & Nusselt number & 1 \\ $n_{p}$ & Pore density & m$^{-2}$ \\ ${N_{Re_c}}$ & Critical Reynolds number for the onset of turbulence & 1 \\ ${N_{Re_L}}$ & Reynolds number & 1 \\ ${N_{Sh_L}}$ & Sherwood number & 1 \\ $\nu_{a}$ & Kinematic viscosity of dry air & m$^{2}$ s$^{-1}$ \\ $P_{a}$ & Air pressure & Pa \\ ${P_{N2}}$ & Partial pressure of nitrogen in the atmosphere & Pa \\ ${P_{O2}}$ & Partial pressure of oxygen in the atmosphere & Pa \\ ${P_{wa}}$ & Vapour pressure in the atmosphere & Pa \\ ${P_{was}}$ & Saturation vapour pressure at air temperature & Pa \\ ${P_{wl}}$ & Vapour pressure inside the leaf & Pa \\ ${N_{Pr}}$ & Prandtl number (0.71) & 1 \\ $r_{a}$ & One-sided boundary layer resistance to heat transfer ($r_H$ in \citet[][P. 231]{monteith_principles_2013}) & s m$^{-1}$ \\ ${r_{bw}}$ & Boundary layer resistance to water vapour, inverse of $g_{bw}$ & s m$^{-1}$ \\ ${r_{bw,mol}}$ & Leaf BL resistance in molar units & s m$^{2}$ mol$^{-1}$ \\ $r_{\mathit{end}}$ & End correction, representing resistance between evaporating sites and pores & s m$^{2}$ mol$^{-1}$ \\ ${R_{ll}}$ & Longwave radiation away from leaf & J m$^{-2}$ s$^{-1}$ \\ ${R_{mol}}$ & Molar gas constant (8.314472) & J K$^{-1}$ mol$^{-1}$ \\ $r_{p}$ & Pore radius (for ellipsoidal pores, half the pore width) & m \\ $R_{s}$ & Solar shortwave flux & J m$^{-2}$ s$^{-1}$ \\ $r_{s}$ & Stomatal resistance to water vapour \citep[][P. 231]{monteith_principles_2013} & s m$^{-1}$ \\ $r_{\mathit{sp}}$ & Diffusive resistance of a stomatal pore & s m$^{2}$ mol$^{-1}$ \\ ${r_{sw}}$ & Stomatal resistance to water vapour, inverse of $g_{sw}$ & s m$^{-1}$ \\ ${r_{tw}}$ & Total leaf resistance to water vapour, $r_{bv} + r_{sv}$ & s m$^{-1}$ \\ ${r_{v}}$ & Leaf BL resistance to water vapour, \citep[][Eq. 13.16]{monteith_principles_2013} & s m$^{-1}$ \\ $r_{\mathit{vs}}$ & Diffusive resistance of a stomatal vapour shell & s m$^{2}$ mol$^{-1}$ \\ $\rho_{a}$ & Density of dry air & kg m$^{-3}$ \\ $\rho_{\mathit{al}}$ & Density of air at the leaf surface & kg m$^{-3}$ \\ $S$ & Factor representing stomatal resistance in \citet{penman_physical_1952} & 1 \\ $s_{p}$ & Spacing between stomata & m \\ ${\sigma}$ & Stefan-Boltzmann constant (5.67e-8) & J K$^{-4}$ m$^{-2}$ s$^{-1}$ \\ $T_{a}$ & Air temperature & K \\ $T_{l}$ & Leaf temperature & K \\ $T_{w}$ & Radiative temperature of objects surrounding the leaf & K \\ $V_{m}$ & Molar volume of air & m$^{3}$ mol$^{-1}$ \\ $v_{w}$ & Wind velocity & m s$^{-1}$ \\ \end{tabular}