{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Importable variables and equations\n", "This jupyter notebook can be found at:\n", "[https://github.com/environmentalscience/essm/blob/master/docs/examples/importable_variables_equations.ipynb](https://github.com/environmentalscience/essm/blob/master/docs/examples/importable_variables_equations.ipynb)\n", "\n", "Below, we will import some generic python packages that are used in this notebook:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'0.4.2.dev5'" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Checking for essm version installed\n", "import pkg_resources\n", "pkg_resources.get_distribution(\"essm\").version" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from IPython.core.display import display, HTML\n", "display(HTML(\"\"))" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "from IPython.display import display\n", "from sympy import init_printing, latex\n", "init_printing() \n", "from sympy.printing import StrPrinter\n", "StrPrinter._print_Quantity = lambda self, expr: str(expr.abbrev) # displays short units (m instead of meter)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "import scipy as sc\n", "# Import various functions from sympy\n", "from sympy import Derivative, Eq, exp, log, solve, Symbol" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "from essm.variables.utils import generate_metadata_table, ListTable" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## General physics variables and equations\n", "### Variables\n", "Pre-defined thermodynamics variables can be imported from `essm.variables.physics.thermodynamics`:" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
SymbolNameDescriptionDefinitionDefault valueUnits
$\\alpha_a$alpha_aThermal diffusivity of dry air.-m$^{2}$ s$^{-1}$
$\\lambda_E$lambda_ELatent heat of evaporation.2450000.0J kg$^{-1}$
$\\nu_a$nu_aKinematic viscosity of dry air.-m$^{2}$ s$^{-1}$
$\\rho_a$rho_aDensity of dry air.-kg m$^{-3}$
$\\sigma$sigmStefan-Boltzmann constant.5.67e-08J s$^{-1}$ m$^{-2}$ K$^{-4}$
$c_{pa,mol}$c_pamolMolar specific heat of dry air.\n", "\n", " https://en.wikipedia.org/wiki/Heat_capacity#Specific_heat_capacity\n", " 29.19J K$^{-1}$ mol$^{-1}$
$c_{pa}$c_paSpecific heat of dry air.1010.0J K$^{-1}$ kg$^{-1}$
$c_{pv}$c_pvSpecific heat of water vapour at 300 K.\n", "\n", " http://www.engineeringtoolbox.com/water-vapor-d_979.html\n", " 1864J K$^{-1}$ kg$^{-1}$
$C_{wa}$C_waConcentration of water in air.-mol m$^{-3}$
$D_{va}$D_vaBinary diffusion coefficient of water vapour in air.-m$^{2}$ s$^{-1}$
$g$gGravitational acceleration.9.81m s$^{-2}$
$h_c$h_cAverage 1-sided convective heat transfer coefficient.-J K$^{-1}$ s$^{-1}$ m$^{-2}$
$k_a$k_aThermal conductivity of dry air.-J K$^{-1}$ m$^{-1}$ s$^{-1}$
$M_w$M_wMolar mass of water.0.018kg mol$^{-1}$
$M_{air}$M_airMolar mass of air.\n", "\n", " http://www.engineeringtoolbox.com/molecular-mass-air-d_679.html\n", " 0.02897kg mol$^{-1}$
$M_{N_2}$M_N2Molar mass of nitrogen.0.028kg mol$^{-1}$
$M_{O_2}$M_O2Molar mass of oxygen.0.032kg mol$^{-1}$
$N_{Gr_L}$GrGrashof number.-1
$N_{Le}$LeLewis number.-1
$N_{Nu_L}$NuAverage Nusselt number over given length.-1
$N_{Pr}$PrPrandtl number (0.71 for air).-1
$N_{Re_c}$Re_cCritical Reynolds number for the onset of turbulence.-1
$N_{Re_L}$ReAverage Reynolds number over given length.-1
$P_a$P_aAir pressure.-Pa
$P_{N2}$P_N2Partial pressure of nitrogen.-Pa
$P_{O2}$P_O2Partial pressure of oxygen.-Pa
$P_{was}$P_wasSaturation water vapour pressure at air temperature.-Pa
$P_{wa}$P_waWater vapour pressure in the atmosphere.-Pa
$R_d$R_dDownwelling global radiation.-W m$^{-2}$
$R_s$R_sSolar shortwave flux per area.-J s$^{-1}$ m$^{-2}$
$R_u$R_uUpwelling global radiation.-W m$^{-2}$
$R_{mol}$R_molMolar gas constant.8.314472J K$^{-1}$ mol$^{-1}$
$T_0$T0Freezing point in Kelvin.273.15K
$T_a$T_aAir temperature.-K
$v_w$v_wWind velocity.-m s$^{-1}$
$x_{N2}$x_N2Mole fraction of nitrogen in dry air.0.791
$x_{O2}$x_O2Mole fraction of oxygen in dry air.0.211
" ], "text/plain": [ "[('Symbol', 'Name', 'Description', 'Definition', 'Default value', 'Units'),\n", " ('$\\\\alpha_a$',\n", " 'alpha_a',\n", " 'Thermal diffusivity of dry air.',\n", " '',\n", " '-',\n", " 'm$^{2}$ s$^{-1}$'),\n", " ('$\\\\lambda_E$',\n", " 'lambda_E',\n", " 'Latent heat of evaporation.',\n", " '',\n", " '2450000.0',\n", " 'J kg$^{-1}$'),\n", " ('$\\\\nu_a$',\n", " 'nu_a',\n", " 'Kinematic viscosity of dry air.',\n", " '',\n", " '-',\n", " 'm$^{2}$ s$^{-1}$'),\n", " ('$\\\\rho_a$', 'rho_a', 'Density of dry air.', '', '-', 'kg m$^{-3}$'),\n", " ('$\\\\sigma$',\n", " 'sigm',\n", " 'Stefan-Boltzmann constant.',\n", " '',\n", " '5.67e-08',\n", " 'J s$^{-1}$ m$^{-2}$ K$^{-4}$'),\n", " ('$c_{pa,mol}$',\n", " 'c_pamol',\n", " 'Molar specific heat of dry air.\\n\\n https://en.wikipedia.org/wiki/Heat_capacity#Specific_heat_capacity\\n ',\n", " '',\n", " '29.19',\n", " 'J K$^{-1}$ mol$^{-1}$'),\n", " ('$c_{pa}$',\n", " 'c_pa',\n", " 'Specific heat of dry air.',\n", " '',\n", " '1010.0',\n", " 'J K$^{-1}$ kg$^{-1}$'),\n", " ('$c_{pv}$',\n", " 'c_pv',\n", " 'Specific heat of water vapour at 300 K.\\n\\n http://www.engineeringtoolbox.com/water-vapor-d_979.html\\n ',\n", " '',\n", " '1864',\n", " 'J K$^{-1}$ kg$^{-1}$'),\n", " ('$C_{wa}$',\n", " 'C_wa',\n", " 'Concentration of water in air.',\n", " '',\n", " '-',\n", " 'mol m$^{-3}$'),\n", " ('$D_{va}$',\n", " 'D_va',\n", " 'Binary diffusion coefficient of water vapour in air.',\n", " '',\n", " '-',\n", " 'm$^{2}$ s$^{-1}$'),\n", " ('$g$', 'g', 'Gravitational acceleration.', '', '9.81', 'm s$^{-2}$'),\n", " ('$h_c$',\n", " 'h_c',\n", " 'Average 1-sided convective heat transfer coefficient.',\n", " '',\n", " '-',\n", " 'J K$^{-1}$ s$^{-1}$ m$^{-2}$'),\n", " ('$k_a$',\n", " 'k_a',\n", " 'Thermal conductivity of dry air.',\n", " '',\n", " '-',\n", " 'J K$^{-1}$ m$^{-1}$ s$^{-1}$'),\n", " ('$M_w$', 'M_w', 'Molar mass of water.', '', '0.018', 'kg mol$^{-1}$'),\n", " ('$M_{air}$',\n", " 'M_air',\n", " 'Molar mass of air.\\n\\n http://www.engineeringtoolbox.com/molecular-mass-air-d_679.html\\n ',\n", " '',\n", " '0.02897',\n", " 'kg mol$^{-1}$'),\n", " ('$M_{N_2}$',\n", " 'M_N2',\n", " 'Molar mass of nitrogen.',\n", " '',\n", " '0.028',\n", " 'kg mol$^{-1}$'),\n", " ('$M_{O_2}$', 'M_O2', 'Molar mass of oxygen.', '', '0.032', 'kg mol$^{-1}$'),\n", " ('$N_{Gr_L}$', 'Gr', 'Grashof number.', '', '-', '1'),\n", " ('$N_{Le}$', 'Le', 'Lewis number.', '', '-', '1'),\n", " ('$N_{Nu_L}$',\n", " 'Nu',\n", " 'Average Nusselt number over given length.',\n", " '',\n", " '-',\n", " '1'),\n", " ('$N_{Pr}$', 'Pr', 'Prandtl number (0.71 for air).', '', '-', '1'),\n", " ('$N_{Re_c}$',\n", " 'Re_c',\n", " 'Critical Reynolds number for the onset of turbulence.',\n", " '',\n", " '-',\n", " '1'),\n", " ('$N_{Re_L}$',\n", " 'Re',\n", " 'Average Reynolds number over given length.',\n", " '',\n", " '-',\n", " '1'),\n", " ('$P_a$', 'P_a', 'Air pressure.', '', '-', 'Pa'),\n", " ('$P_{N2}$', 'P_N2', 'Partial pressure of nitrogen.', '', '-', 'Pa'),\n", " ('$P_{O2}$', 'P_O2', 'Partial pressure of oxygen.', '', '-', 'Pa'),\n", " ('$P_{was}$',\n", " 'P_was',\n", " 'Saturation water vapour pressure at air temperature.',\n", " '',\n", " '-',\n", " 'Pa'),\n", " ('$P_{wa}$',\n", " 'P_wa',\n", " 'Water vapour pressure in the atmosphere.',\n", " '',\n", " '-',\n", " 'Pa'),\n", " ('$R_d$', 'R_d', 'Downwelling global radiation.', '', '-', 'W m$^{-2}$'),\n", " ('$R_s$',\n", " 'R_s',\n", " 'Solar shortwave flux per area.',\n", " '',\n", " '-',\n", " 'J s$^{-1}$ m$^{-2}$'),\n", " ('$R_u$', 'R_u', 'Upwelling global radiation.', '', '-', 'W m$^{-2}$'),\n", " ('$R_{mol}$',\n", " 'R_mol',\n", " 'Molar gas constant.',\n", " '',\n", " '8.314472',\n", " 'J K$^{-1}$ mol$^{-1}$'),\n", " ('$T_0$', 'T0', 'Freezing point in Kelvin.', '', '273.15', 'K'),\n", " ('$T_a$', 'T_a', 'Air temperature.', '', '-', 'K'),\n", " ('$v_w$', 'v_w', 'Wind velocity.', '', '-', 'm s$^{-1}$'),\n", " ('$x_{N2}$',\n", " 'x_N2',\n", " 'Mole fraction of nitrogen in dry air.',\n", " '',\n", " '0.79',\n", " '1'),\n", " ('$x_{O2}$', 'x_O2', 'Mole fraction of oxygen in dry air.', '', '0.21', '1')]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import essm.variables.physics.thermodynamics as physics_vars\n", "vars = ['physics_vars.' + name for name in physics_vars.__all__]\n", "generate_metadata_table([eval(name) for name in vars])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Each of the above can also be imported one-by-one, using its Name, e.g.:\n", "\n", "`from essm.variables.physics.thermodynamics import R_mol`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Equations\n", "General equations based on the above variables can be imported from `essm.equations.physics.thermodynamics`:" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
eq_LeLe as function of alpha_a and D_va.\n", "\n", " (Eq. B3 in :cite:`schymanski_leaf-scale_2017`)\n", " $N_{Le} = \\frac{\\alpha_a}{D_{va}}$
eq_CwaC_wa as a function of P_wa and T_a.\n", "\n", " (Eq. B9 in :cite:`schymanski_leaf-scale_2017`)\n", " $C_{wa} = \\frac{P_{wa}}{R_{mol} T_a}$
eq_Nu_forced_allNu as function of Re and Re_c under forced conditions.\n", "\n", " (Eqs. B13--B15 in :cite:`schymanski_leaf-scale_2017`)\n", " $N_{Nu_L} = - \\frac{\\sqrt[3]{N_{Pr}} \\left(- 37 N_{Re_L}^{\\frac{4}{5}} + 37 \\left(N_{Re_L} + N_{Re_c} - \\frac{\\left|{N_{Re_L} - N_{Re_c}}\\right|}{2}\\right)^{\\frac{4}{5}} - 664 \\sqrt{N_{Re_L} + N_{Re_c} - \\frac{\\left|{N_{Re_L} - N_{Re_c}}\\right|}{2}}\\right)}{1000}$
eq_DvaD_va as a function of air temperature.\n", "\n", " (Table A.3 in :cite:`monteith_principles_2007`)\n", " $D_{va} = T_a p_1 - p_2$
eq_alphaaalpha_a as a function of air temperature.\n", "\n", " (Table A.3 in :cite:`monteith_principles_2007`)\n", " $\\alpha_a = T_a p_1 - p_2$
eq_kak_a as a function of air temperature.\n", "\n", " (Table A.3 in :cite:`monteith_principles_2007`)\n", " $k_a = T_a p_1 + p_2$
eq_nuanu_a as a function of air temperature.\n", "\n", " (Table A.3 in :cite:`monteith_principles_2007`)\n", " $\\nu_a = T_a p_1 - p_2$
eq_rhoa_Pwa_Tarho_a as a function of P_wa and T_a.\n", "\n", " (Eq. B20 in :cite:`schymanski_leaf-scale_2017`)\n", " $\\rho_a = \\frac{M_{N_2} P_{N2} + M_{O_2} P_{O2} + M_w P_{wa}}{R_{mol} T_a}$
eq_PaCalculate air pressure.\n", "\n", " From partial pressures of N2, O2 and H2O, following Dalton's law of\n", " partial pressures.\n", " $P_a = P_{N2} + P_{O2} + P_{wa}$
eq_PN2_PO2Calculate P_N2 as a function of P_O2.\n", "\n", " It follows Dalton's law of partial pressures.\n", " $P_{N2} = \\frac{P_{O2} x_{N2}}{x_{O2}}$
eq_PO2Calculate P_O2 as a function of P_a, P_N2 and P_wa.$P_{O2} = \\frac{P_a x_{O2} - P_{wa} x_{O2}}{x_{N2} + x_{O2}}$
eq_PN2Calculate P_N2 as a function of P_a, P_O2 and P_wa.$P_{N2} = \\frac{P_a x_{N2} - P_{wa} x_{N2}}{x_{N2} + x_{O2}}$
eq_rhoaCalculate rho_a from T_a, P_a and P_wa.$\\rho_a = \\frac{x_{N2} \\left(M_{N_2} P_a - P_{wa} \\left(M_{N_2} - M_w\\right)\\right) + x_{O2} \\left(M_{O_2} P_a - P_{wa} \\left(M_{O_2} - M_w\\right)\\right)}{R_{mol} T_a x_{N2} + R_{mol} T_a x_{O2}}$
" ], "text/plain": [ "[('eq_Le',\n", " 'Le as function of alpha_a and D_va.\\n\\n (Eq. B3 in :cite:`schymanski_leaf-scale_2017`)\\n ',\n", " '$N_{Le} = \\\\frac{\\\\alpha_a}{D_{va}}$'),\n", " ('eq_Cwa',\n", " 'C_wa as a function of P_wa and T_a.\\n\\n (Eq. B9 in :cite:`schymanski_leaf-scale_2017`)\\n ',\n", " '$C_{wa} = \\\\frac{P_{wa}}{R_{mol} T_a}$'),\n", " ('eq_Nu_forced_all',\n", " 'Nu as function of Re and Re_c under forced conditions.\\n\\n (Eqs. B13--B15 in :cite:`schymanski_leaf-scale_2017`)\\n ',\n", " '$N_{Nu_L} = - \\\\frac{\\\\sqrt[3]{N_{Pr}} \\\\left(- 37 N_{Re_L}^{\\\\frac{4}{5}} + 37 \\\\left(N_{Re_L} + N_{Re_c} - \\\\frac{\\\\left|{N_{Re_L} - N_{Re_c}}\\\\right|}{2}\\\\right)^{\\\\frac{4}{5}} - 664 \\\\sqrt{N_{Re_L} + N_{Re_c} - \\\\frac{\\\\left|{N_{Re_L} - N_{Re_c}}\\\\right|}{2}}\\\\right)}{1000}$'),\n", " ('eq_Dva',\n", " 'D_va as a function of air temperature.\\n\\n (Table A.3 in :cite:`monteith_principles_2007`)\\n ',\n", " '$D_{va} = T_a p_1 - p_2$'),\n", " ('eq_alphaa',\n", " 'alpha_a as a function of air temperature.\\n\\n (Table A.3 in :cite:`monteith_principles_2007`)\\n ',\n", " '$\\\\alpha_a = T_a p_1 - p_2$'),\n", " ('eq_ka',\n", " 'k_a as a function of air temperature.\\n\\n (Table A.3 in :cite:`monteith_principles_2007`)\\n ',\n", " '$k_a = T_a p_1 + p_2$'),\n", " ('eq_nua',\n", " 'nu_a as a function of air temperature.\\n\\n (Table A.3 in :cite:`monteith_principles_2007`)\\n ',\n", " '$\\\\nu_a = T_a p_1 - p_2$'),\n", " ('eq_rhoa_Pwa_Ta',\n", " 'rho_a as a function of P_wa and T_a.\\n\\n (Eq. B20 in :cite:`schymanski_leaf-scale_2017`)\\n ',\n", " '$\\\\rho_a = \\\\frac{M_{N_2} P_{N2} + M_{O_2} P_{O2} + M_w P_{wa}}{R_{mol} T_a}$'),\n", " ('eq_Pa',\n", " \"Calculate air pressure.\\n\\n From partial pressures of N2, O2 and H2O, following Dalton's law of\\n partial pressures.\\n \",\n", " '$P_a = P_{N2} + P_{O2} + P_{wa}$'),\n", " ('eq_PN2_PO2',\n", " \"Calculate P_N2 as a function of P_O2.\\n\\n It follows Dalton's law of partial pressures.\\n \",\n", " '$P_{N2} = \\\\frac{P_{O2} x_{N2}}{x_{O2}}$'),\n", " ('eq_PO2',\n", " 'Calculate P_O2 as a function of P_a, P_N2 and P_wa.',\n", " '$P_{O2} = \\\\frac{P_a x_{O2} - P_{wa} x_{O2}}{x_{N2} + x_{O2}}$'),\n", " ('eq_PN2',\n", " 'Calculate P_N2 as a function of P_a, P_O2 and P_wa.',\n", " '$P_{N2} = \\\\frac{P_a x_{N2} - P_{wa} x_{N2}}{x_{N2} + x_{O2}}$'),\n", " ('eq_rhoa',\n", " 'Calculate rho_a from T_a, P_a and P_wa.',\n", " '$\\\\rho_a = \\\\frac{x_{N2} \\\\left(M_{N_2} P_a - P_{wa} \\\\left(M_{N_2} - M_w\\\\right)\\\\right) + x_{O2} \\\\left(M_{O_2} P_a - P_{wa} \\\\left(M_{O_2} - M_w\\\\right)\\\\right)}{R_{mol} T_a x_{N2} + R_{mol} T_a x_{O2}}$')]" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import essm.equations.physics.thermodynamics as physics_eqs\n", "modstr = 'physics_eqs.'\n", "eqs = [name for name in physics_eqs.__all__]\n", "table = ListTable()\n", "#table.append(('Name', 'Description', 'Equation'))\n", "for name in eqs:\n", " table.append((name, eval(modstr+name).__doc__, latex('$'+latex(eval(modstr+name))+'$')))\n", "table" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Variables and equations related to plant leaves\n", "These refer to the model by Schymanski & Or (2017)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Variables for leaf energy and water balance\n", "Variables related to the model by can be imported from `essm.variables.leaf.energy_water`:" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/stan/Programs/essm/essm/variables/_core.py:89: UserWarning: \"essm.variables.physics.thermodynamics:Gr\" will be overridden by \"essm.variables.leaf.energy_water:\"\n", " instance[expr] = instance\n", "/home/stan/Programs/essm/essm/variables/_core.py:89: UserWarning: \"essm.variables.physics.thermodynamics:h_c\" will be overridden by \"essm.variables.leaf.energy_water:\"\n", " instance[expr] = instance\n" ] }, { "data": { "text/html": [ "
SymbolNameDescriptionDefinitionDefault valueUnits
$\\alpha_l$alpha_lLeaf albedo, fraction of shortwave radiation reflected by the leaf.-1
$\\epsilon_l$epsilon_lLongwave emmissivity of the leaf surface.1.01
$\\rho_{al}$rho_alDensity of air at the leaf surface.-kg m$^{-3}$
$a_s$a_sFraction of one-sided leaf area covered by stomata.\n", "\n", " (1 if stomata are on one side only, 2 if they are on both sides).\n", " -1
$a_{sh}$a_shFraction of projected area exchanging sensible heat with the air.2.01
$C_{wl}$C_wlConcentration of water in the leaf air space.-mol m$^{-3}$
$E_l$E_lLatent heat flux from leaf.-J s$^{-1}$ m$^{-2}$
$E_{l,mol}$E_lmolTranspiration rate in molar units.-mol s$^{-1}$ m$^{-2}$
$g_{bw,mol}$g_bwmolBoundary layer conductance to water vapour.-mol s$^{-1}$ m$^{-2}$
$g_{bw}$g_bwBoundary layer conductance to water vapour.-m s$^{-1}$
$g_{sw,mol}$g_swmolStomatal conductance to water vapour.-mol s$^{-1}$ m$^{-2}$
$g_{sw}$g_swStomatal conductance to water vapour.-m s$^{-1}$
$g_{tw,mol}$g_twmolTotal leaf layer conductance to water vapour.-mol s$^{-1}$ m$^{-2}$
$g_{tw}$g_twTotal leaf conductance to water vapour.-m s$^{-1}$
$h_c$h_cAverage 1-sided convective heat transfer coefficient.-J K$^{-1}$ s$^{-1}$ m$^{-2}$
$H_l$H_lSensible heat flux from leaf.-J s$^{-1}$ m$^{-2}$
$L_A$L_ALeaf area.-m$^{2}$
$L_l$L_lLeaf width as characteristic length scale for convection.-m
$N_{Gr_L}$GrGrashof number.-1
$P_{wl}$P_wlWater vapour pressure inside the leaf.-Pa
$r_{bw}$r_bwBoundary layer resistance to water vapour, inverse of $g_{bw}$.-s m$^{-1}$
$R_{la}$R_laLongwave radiation absorbed by leaf.-W m$^{-2}$
$R_{ld}$R_ldDownwards emitted/reflected global radiation from leaf.-W m$^{-2}$
$R_{ll}$R_llLongwave radiation away from leaf.-W m$^{-2}$
$R_{lu}$R_luUpwards emitted/reflected global radiation from leaf.-W m$^{-2}$
$r_{sw}$r_swStomatal resistance to water vapour, inverse of $g_{sw}$.-s m$^{-1}$
$r_{tw}$r_twTotal leaf resistance to water vapour, $r_{bv} + r_{sv}$.-s m$^{-1}$
$T_l$T_lLeaf temperature.-K
$T_w$T_wRadiative temperature of objects surrounding the leaf.-K
" ], "text/plain": [ "[('Symbol', 'Name', 'Description', 'Definition', 'Default value', 'Units'),\n", " ('$\\\\alpha_l$',\n", " 'alpha_l',\n", " 'Leaf albedo, fraction of shortwave radiation reflected by the leaf.',\n", " '',\n", " '-',\n", " '1'),\n", " ('$\\\\epsilon_l$',\n", " 'epsilon_l',\n", " 'Longwave emmissivity of the leaf surface.',\n", " '',\n", " '1.0',\n", " '1'),\n", " ('$\\\\rho_{al}$',\n", " 'rho_al',\n", " 'Density of air at the leaf surface.',\n", " '',\n", " '-',\n", " 'kg m$^{-3}$'),\n", " ('$a_s$',\n", " 'a_s',\n", " 'Fraction of one-sided leaf area covered by stomata.\\n\\n (1 if stomata are on one side only, 2 if they are on both sides).\\n ',\n", " '',\n", " '-',\n", " '1'),\n", " ('$a_{sh}$',\n", " 'a_sh',\n", " 'Fraction of projected area exchanging sensible heat with the air.',\n", " '',\n", " '2.0',\n", " '1'),\n", " ('$C_{wl}$',\n", " 'C_wl',\n", " 'Concentration of water in the leaf air space.',\n", " '',\n", " '-',\n", " 'mol m$^{-3}$'),\n", " ('$E_l$',\n", " 'E_l',\n", " 'Latent heat flux from leaf.',\n", " '',\n", " '-',\n", " 'J s$^{-1}$ m$^{-2}$'),\n", " ('$E_{l,mol}$',\n", " 'E_lmol',\n", " 'Transpiration rate in molar units.',\n", " '',\n", " '-',\n", " 'mol s$^{-1}$ m$^{-2}$'),\n", " ('$g_{bw,mol}$',\n", " 'g_bwmol',\n", " 'Boundary layer conductance to water vapour.',\n", " '',\n", " '-',\n", " 'mol s$^{-1}$ m$^{-2}$'),\n", " ('$g_{bw}$',\n", " 'g_bw',\n", " 'Boundary layer conductance to water vapour.',\n", " '',\n", " '-',\n", " 'm s$^{-1}$'),\n", " ('$g_{sw,mol}$',\n", " 'g_swmol',\n", " 'Stomatal conductance to water vapour.',\n", " '',\n", " '-',\n", " 'mol s$^{-1}$ m$^{-2}$'),\n", " ('$g_{sw}$',\n", " 'g_sw',\n", " 'Stomatal conductance to water vapour.',\n", " '',\n", " '-',\n", " 'm s$^{-1}$'),\n", " ('$g_{tw,mol}$',\n", " 'g_twmol',\n", " 'Total leaf layer conductance to water vapour.',\n", " '',\n", " '-',\n", " 'mol s$^{-1}$ m$^{-2}$'),\n", " ('$g_{tw}$',\n", " 'g_tw',\n", " 'Total leaf conductance to water vapour.',\n", " '',\n", " '-',\n", " 'm s$^{-1}$'),\n", " ('$h_c$',\n", " 'h_c',\n", " 'Average 1-sided convective heat transfer coefficient.',\n", " '',\n", " '-',\n", " 'J K$^{-1}$ s$^{-1}$ m$^{-2}$'),\n", " ('$H_l$',\n", " 'H_l',\n", " 'Sensible heat flux from leaf.',\n", " '',\n", " '-',\n", " 'J s$^{-1}$ m$^{-2}$'),\n", " ('$L_A$', 'L_A', 'Leaf area.', '', '-', 'm$^{2}$'),\n", " ('$L_l$',\n", " 'L_l',\n", " 'Leaf width as characteristic length scale for convection.',\n", " '',\n", " '-',\n", " 'm'),\n", " ('$N_{Gr_L}$', 'Gr', 'Grashof number.', '', '-', '1'),\n", " ('$P_{wl}$', 'P_wl', 'Water vapour pressure inside the leaf.', '', '-', 'Pa'),\n", " ('$r_{bw}$',\n", " 'r_bw',\n", " 'Boundary layer resistance to water vapour, inverse of $g_{bw}$.',\n", " '',\n", " '-',\n", " 's m$^{-1}$'),\n", " ('$R_{la}$',\n", " 'R_la',\n", " 'Longwave radiation absorbed by leaf.',\n", " '',\n", " '-',\n", " 'W m$^{-2}$'),\n", " ('$R_{ld}$',\n", " 'R_ld',\n", " 'Downwards emitted/reflected global radiation from leaf.',\n", " '',\n", " '-',\n", " 'W m$^{-2}$'),\n", " ('$R_{ll}$',\n", " 'R_ll',\n", " 'Longwave radiation away from leaf.',\n", " '',\n", " '-',\n", " 'W m$^{-2}$'),\n", " ('$R_{lu}$',\n", " 'R_lu',\n", " 'Upwards emitted/reflected global radiation from leaf.',\n", " '',\n", " '-',\n", " 'W m$^{-2}$'),\n", " ('$r_{sw}$',\n", " 'r_sw',\n", " 'Stomatal resistance to water vapour, inverse of $g_{sw}$.',\n", " '',\n", " '-',\n", " 's m$^{-1}$'),\n", " ('$r_{tw}$',\n", " 'r_tw',\n", " 'Total leaf resistance to water vapour, $r_{bv} + r_{sv}$.',\n", " '',\n", " '-',\n", " 's m$^{-1}$'),\n", " ('$T_l$', 'T_l', 'Leaf temperature.', '', '-', 'K'),\n", " ('$T_w$',\n", " 'T_w',\n", " 'Radiative temperature of objects surrounding the leaf.',\n", " '',\n", " '-',\n", " 'K')]" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import essm.variables.leaf.energy_water as leaf_energy\n", "vars = ['leaf_energy.' + name for name in leaf_energy.__all__]\n", "generate_metadata_table([eval(name) for name in vars])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Equations for leaf energy and water balance\n", "General equations based on the above variables can be imported from `essm.equations.physics.thermodynamics`:" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
eq_Rs_enbalCalculate R_s from energy balance.\n", "\n", " (Eq. 1 in :cite:`schymanski_leaf-scale_2017`)\n", " $R_s = E_l + H_l + R_{ll}$
eq_RllR_ll as function of T_l and T_w.\n", "\n", " (Eq. 2 in :cite:`schymanski_leaf-scale_2017`)\n", " $R_{ll} = a_{sh} \\epsilon_l \\sigma \\left(T_l^{4} - T_w^{4}\\right)$
eq_HlH_l as function of T_l.\n", "\n", " (Eq. 3 in :cite:`schymanski_leaf-scale_2017`)\n", " $H_l = a_{sh} h_c \\left(- T_a + T_l\\right)$
eq_ElE_l as function of E_lmol.\n", "\n", " (Eq. 4 in :cite:`schymanski_leaf-scale_2017`)\n", " $E_l = E_{l,mol} M_w \\lambda_E$
eq_ElmolE_lmol as functino of g_tw and C_wl.\n", "\n", " (Eq. 5 in :cite:`schymanski_leaf-scale_2017`)\n", " $E_{l,mol} = g_{tw} \\left(- C_{wa} + C_{wl}\\right)$
eq_gtwg_tw from g_sw and g_bw.\n", "\n", " (Eq. 6 in :cite:`schymanski_leaf-scale_2017`)\n", " $g_{tw} = \\frac{1}{\\frac{1}{g_{sw}} + \\frac{1}{g_{bw}}}$
eq_gbw_hcg_bw as function of h_c.\n", "\n", " (Eq. B2 in :cite:`schymanski_leaf-scale_2017`)\n", " $g_{bw} = \\frac{a_s h_c}{N_{Le}^{\\frac{2}{3}} c_{pa} \\rho_a}$
eq_CwlC_wl as function of P_wl and T_l.\n", "\n", " (Eq. B4 in :cite:`schymanski_leaf-scale_2017`)\n", " $C_{wl} = \\frac{P_{wl}}{R_{mol} T_l}$
eq_PwlClausius-Clapeyron P_wl as function of T_l.\n", "\n", " (Eq. B3 in :cite:`hartmann_global_1994`)\n", " $P_{wl} = p_1 e^{- \\frac{M_w \\lambda_E \\left(- \\frac{1}{p_2} + \\frac{1}{T_l}\\right)}{R_{mol}}}$
eq_Elmol_convE_lmol as function of g_twmol and P_wl.\n", "\n", " (Eq. B6 in :cite:`schymanski_leaf-scale_2017`)\n", " $E_{l,mol} = \\frac{g_{tw,mol} \\left(- P_{wa} + P_{wl}\\right)}{P_a}$
eq_gtwmol_gtwg_twmol as a function of g_tw.\n", "\n", " It uses eq_Elmol, eq_Cwl and eq_Elmol_conv.\n", " $g_{tw,mol} = \\frac{g_{tw} \\left(P_a P_{wa} T_l - P_a P_{wl} T_a\\right)}{R_{mol} T_a T_l \\left(P_{wa} - P_{wl}\\right)}$
eq_gtwmol_gtw_isog_twmol as a function of g_tw at isothermal conditions.$g_{tw,mol} = \\frac{P_a g_{tw}}{R_{mol} T_a}$
eq_hch_c as a function of Nu and L_l.\n", "\n", " (Eq. B10 in :cite:`schymanski_leaf-scale_2017`)\n", " $h_c = \\frac{N_{Nu_L} k_a}{L_l}$
eq_ReRe as a function of v_w and L_l.\n", "\n", " (Eq. B11 in :cite:`schymanski_leaf-scale_2017`)\n", " $N_{Re_L} = \\frac{L_l v_w}{\\nu_a}$
eq_GrGr as function of air density within and outside of leaf.\n", "\n", " (Eq. B12 in :cite:`schymanski_leaf-scale_2017`)\n", " $N_{Gr_L} = \\frac{L_l^{3} g \\left(\\rho_a - \\rho_{al}\\right)}{\\nu_a^{2} \\rho_{al}}$
" ], "text/plain": [ "[('eq_Rs_enbal',\n", " 'Calculate R_s from energy balance.\\n\\n (Eq. 1 in :cite:`schymanski_leaf-scale_2017`)\\n ',\n", " '$R_s = E_l + H_l + R_{ll}$'),\n", " ('eq_Rll',\n", " 'R_ll as function of T_l and T_w.\\n\\n (Eq. 2 in :cite:`schymanski_leaf-scale_2017`)\\n ',\n", " '$R_{ll} = a_{sh} \\\\epsilon_l \\\\sigma \\\\left(T_l^{4} - T_w^{4}\\\\right)$'),\n", " ('eq_Hl',\n", " 'H_l as function of T_l.\\n\\n (Eq. 3 in :cite:`schymanski_leaf-scale_2017`)\\n ',\n", " '$H_l = a_{sh} h_c \\\\left(- T_a + T_l\\\\right)$'),\n", " ('eq_El',\n", " 'E_l as function of E_lmol.\\n\\n (Eq. 4 in :cite:`schymanski_leaf-scale_2017`)\\n ',\n", " '$E_l = E_{l,mol} M_w \\\\lambda_E$'),\n", " ('eq_Elmol',\n", " 'E_lmol as functino of g_tw and C_wl.\\n\\n (Eq. 5 in :cite:`schymanski_leaf-scale_2017`)\\n ',\n", " '$E_{l,mol} = g_{tw} \\\\left(- C_{wa} + C_{wl}\\\\right)$'),\n", " ('eq_gtw',\n", " 'g_tw from g_sw and g_bw.\\n\\n (Eq. 6 in :cite:`schymanski_leaf-scale_2017`)\\n ',\n", " '$g_{tw} = \\\\frac{1}{\\\\frac{1}{g_{sw}} + \\\\frac{1}{g_{bw}}}$'),\n", " ('eq_gbw_hc',\n", " 'g_bw as function of h_c.\\n\\n (Eq. B2 in :cite:`schymanski_leaf-scale_2017`)\\n ',\n", " '$g_{bw} = \\\\frac{a_s h_c}{N_{Le}^{\\\\frac{2}{3}} c_{pa} \\\\rho_a}$'),\n", " ('eq_Cwl',\n", " 'C_wl as function of P_wl and T_l.\\n\\n (Eq. B4 in :cite:`schymanski_leaf-scale_2017`)\\n ',\n", " '$C_{wl} = \\\\frac{P_{wl}}{R_{mol} T_l}$'),\n", " ('eq_Pwl',\n", " 'Clausius-Clapeyron P_wl as function of T_l.\\n\\n (Eq. B3 in :cite:`hartmann_global_1994`)\\n ',\n", " '$P_{wl} = p_1 e^{- \\\\frac{M_w \\\\lambda_E \\\\left(- \\\\frac{1}{p_2} + \\\\frac{1}{T_l}\\\\right)}{R_{mol}}}$'),\n", " ('eq_Elmol_conv',\n", " 'E_lmol as function of g_twmol and P_wl.\\n\\n (Eq. B6 in :cite:`schymanski_leaf-scale_2017`)\\n ',\n", " '$E_{l,mol} = \\\\frac{g_{tw,mol} \\\\left(- P_{wa} + P_{wl}\\\\right)}{P_a}$'),\n", " ('eq_gtwmol_gtw',\n", " 'g_twmol as a function of g_tw.\\n\\n It uses eq_Elmol, eq_Cwl and eq_Elmol_conv.\\n ',\n", " '$g_{tw,mol} = \\\\frac{g_{tw} \\\\left(P_a P_{wa} T_l - P_a P_{wl} T_a\\\\right)}{R_{mol} T_a T_l \\\\left(P_{wa} - P_{wl}\\\\right)}$'),\n", " ('eq_gtwmol_gtw_iso',\n", " 'g_twmol as a function of g_tw at isothermal conditions.',\n", " '$g_{tw,mol} = \\\\frac{P_a g_{tw}}{R_{mol} T_a}$'),\n", " ('eq_hc',\n", " 'h_c as a function of Nu and L_l.\\n\\n (Eq. B10 in :cite:`schymanski_leaf-scale_2017`)\\n ',\n", " '$h_c = \\\\frac{N_{Nu_L} k_a}{L_l}$'),\n", " ('eq_Re',\n", " 'Re as a function of v_w and L_l.\\n\\n (Eq. B11 in :cite:`schymanski_leaf-scale_2017`)\\n ',\n", " '$N_{Re_L} = \\\\frac{L_l v_w}{\\\\nu_a}$'),\n", " ('eq_Gr',\n", " 'Gr as function of air density within and outside of leaf.\\n\\n (Eq. B12 in :cite:`schymanski_leaf-scale_2017`)\\n ',\n", " '$N_{Gr_L} = \\\\frac{L_l^{3} g \\\\left(\\\\rho_a - \\\\rho_{al}\\\\right)}{\\\\nu_a^{2} \\\\rho_{al}}$')]" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import essm.equations.leaf.energy_water as leaf_energy\n", "modstr = 'leaf_energy.'\n", "eqs = [name for name in leaf_energy.__all__]\n", "table = ListTable()\n", "#table.append(('Name', 'Description', 'Equation'))\n", "for name in eqs:\n", " table.append((name, eval(modstr+name).__doc__, latex('$'+latex(eval(modstr+name))+'$')))\n", "table" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Variables for leaf radiative balance\n", "Variables related to the model by can be imported from `essm.variables.leaf.radiation`:" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/stan/Programs/essm/essm/variables/_core.py:89: UserWarning: \"essm.variables.leaf.energy_water:alpha_l\" will be overridden by \"essm.variables.leaf.radiation:\"\n", " instance[expr] = instance\n", "/home/stan/Programs/essm/essm/variables/_core.py:89: UserWarning: \"essm.variables.physics.thermodynamics:R_d\" will be overridden by \"essm.variables.leaf.radiation:\"\n", " instance[expr] = instance\n", "/home/stan/Programs/essm/essm/variables/_core.py:89: UserWarning: \"essm.variables.leaf.energy_water:R_la\" will be overridden by \"essm.variables.leaf.radiation:\"\n", " instance[expr] = instance\n", "/home/stan/Programs/essm/essm/variables/_core.py:89: UserWarning: \"essm.variables.leaf.energy_water:R_ld\" will be overridden by \"essm.variables.leaf.radiation:\"\n", " instance[expr] = instance\n", "/home/stan/Programs/essm/essm/variables/_core.py:89: UserWarning: \"essm.variables.leaf.energy_water:R_lu\" will be overridden by \"essm.variables.leaf.radiation:\"\n", " instance[expr] = instance\n", "/home/stan/Programs/essm/essm/variables/_core.py:89: UserWarning: \"essm.variables.physics.thermodynamics:R_u\" will be overridden by \"essm.variables.leaf.radiation:\"\n", " instance[expr] = instance\n" ] }, { "data": { "text/html": [ "
SymbolNameDescriptionDefinitionDefault valueUnits
$alpha_l$alpha_lLeaf albedo, fraction of shortwave radiation reflected by the leaf.-1
$R_d$R_dDownwelling global radiation.-J s$^{-1}$ m$^{-2}$
$R_u$R_uUpwelling global radiation.-J s$^{-1}$ m$^{-2}$
$R_{la}$R_laLongwave radiation absorbed by leaf.-J s$^{-1}$ m$^{-2}$
$R_{ld}$R_ldDownwards emitted/reflected global radiation from leaf.-J s$^{-1}$ m$^{-2}$
$R_{lu}$R_luUpwards emitted/reflected global radiation from leaf.-J s$^{-1}$ m$^{-2}$
$S_a$S_aRadiation sensor above leaf reading.-J s$^{-1}$ m$^{-2}$
$S_b$S_bRadiation sensor below leaf reading.-J s$^{-1}$ m$^{-2}$
$S_s$S_sRadiation sensor beside leaf reading.-J s$^{-1}$ m$^{-2}$
" ], "text/plain": [ "[('Symbol', 'Name', 'Description', 'Definition', 'Default value', 'Units'),\n", " ('$alpha_l$',\n", " 'alpha_l',\n", " 'Leaf albedo, fraction of shortwave radiation reflected by the leaf.',\n", " '',\n", " '-',\n", " '1'),\n", " ('$R_d$',\n", " 'R_d',\n", " 'Downwelling global radiation.',\n", " '',\n", " '-',\n", " 'J s$^{-1}$ m$^{-2}$'),\n", " ('$R_u$',\n", " 'R_u',\n", " 'Upwelling global radiation.',\n", " '',\n", " '-',\n", " 'J s$^{-1}$ m$^{-2}$'),\n", " ('$R_{la}$',\n", " 'R_la',\n", " 'Longwave radiation absorbed by leaf.',\n", " '',\n", " '-',\n", " 'J s$^{-1}$ m$^{-2}$'),\n", " ('$R_{ld}$',\n", " 'R_ld',\n", " 'Downwards emitted/reflected global radiation from leaf.',\n", " '',\n", " '-',\n", " 'J s$^{-1}$ m$^{-2}$'),\n", " ('$R_{lu}$',\n", " 'R_lu',\n", " 'Upwards emitted/reflected global radiation from leaf.',\n", " '',\n", " '-',\n", " 'J s$^{-1}$ m$^{-2}$'),\n", " ('$S_a$',\n", " 'S_a',\n", " 'Radiation sensor above leaf reading.',\n", " '',\n", " '-',\n", " 'J s$^{-1}$ m$^{-2}$'),\n", " ('$S_b$',\n", " 'S_b',\n", " 'Radiation sensor below leaf reading.',\n", " '',\n", " '-',\n", " 'J s$^{-1}$ m$^{-2}$'),\n", " ('$S_s$',\n", " 'S_s',\n", " 'Radiation sensor beside leaf reading.',\n", " '',\n", " '-',\n", " 'J s$^{-1}$ m$^{-2}$')]" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import essm.variables.leaf.radiation as leaf_radiation\n", "vars = ['leaf_radiation.' + name for name in leaf_radiation.__all__]\n", "generate_metadata_table([eval(name) for name in vars])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Variables for leaf chamber model\n", "These refer to the model by Schymanski & Or (2017) and ongoing work." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Leaf chamber insulation\n", "Variables related to the model by can be imported from `essm.variables.chamber.insulation`:" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
SymbolNameDescriptionDefinitionDefault valueUnits
$A_i$A_iConducting area of insulation material.-m$^{2}$
$c_{pi}$c_piHeat capacity of insulation material.-J K$^{-1}$ kg$^{-1}$
$dT_i$dT_iTemperature increment of insulation material.-K
$L_i$L_iThickness of insulation material.-m
$lambda_i$lambda_iHeat conductivity of insulation material.-J K$^{-1}$ m$^{-1}$ s$^{-1}$
$Q_i$Q_iHeat conduction through insulation material.-J s$^{-1}$
$rho_i$rho_iDensity of insulation material.-kg m$^{-3}$
" ], "text/plain": [ "[('Symbol', 'Name', 'Description', 'Definition', 'Default value', 'Units'),\n", " ('$A_i$',\n", " 'A_i',\n", " 'Conducting area of insulation material.',\n", " '',\n", " '-',\n", " 'm$^{2}$'),\n", " ('$c_{pi}$',\n", " 'c_pi',\n", " 'Heat capacity of insulation material.',\n", " '',\n", " '-',\n", " 'J K$^{-1}$ kg$^{-1}$'),\n", " ('$dT_i$',\n", " 'dT_i',\n", " 'Temperature increment of insulation material.',\n", " '',\n", " '-',\n", " 'K'),\n", " ('$L_i$', 'L_i', 'Thickness of insulation material.', '', '-', 'm'),\n", " ('$lambda_i$',\n", " 'lambda_i',\n", " 'Heat conductivity of insulation material.',\n", " '',\n", " '-',\n", " 'J K$^{-1}$ m$^{-1}$ s$^{-1}$'),\n", " ('$Q_i$',\n", " 'Q_i',\n", " 'Heat conduction through insulation material.',\n", " '',\n", " '-',\n", " 'J s$^{-1}$'),\n", " ('$rho_i$',\n", " 'rho_i',\n", " 'Density of insulation material.',\n", " '',\n", " '-',\n", " 'kg m$^{-3}$')]" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import essm.variables.chamber.insulation as chamber_ins\n", "vars = ['chamber_ins.' + name for name in chamber_ins.__all__]\n", "generate_metadata_table([eval(name) for name in vars])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Leaf chamber mass balance\n", "Variables related to the model by can be imported from `essm.variables.chamber.mass`:" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/stan/Programs/essm/essm/variables/_core.py:89: UserWarning: \"essm.variables.leaf.energy_water:L_A\" will be overridden by \"essm.variables.chamber.mass:\"\n", " instance[expr] = instance\n" ] }, { "data": { "text/html": [ "
SymbolNameDescriptionDefinitionDefault valueUnits
$F_{in,mol,a}$F_in_molaMolar flow rate of dry air into chamber.-mol s$^{-1}$
$F_{in,mol,w}$F_in_molwMolar flow rate of water vapour into chamber.-mol s$^{-1}$
$F_{in,v}$F_in_vVolumetric flow rate into chamber.-m$^{3}$ s$^{-1}$
$F_{out,mol,a}$F_out_molaMolar flow rate of dry air out of chamber.-mol s$^{-1}$
$F_{out,mol,w}$F_out_molwMolar flow rate of water vapour out of chamber.-mol s$^{-1}$
$F_{out,v}$F_out_vVolumetric flow rate out of chamber.-m$^{3}$ s$^{-1}$
$H_c$H_cChamber height.-m
$L_A$L_ALeaf area.-m$^{2}$
$L_c$L_cChamber length.-m
$n_c$n_cmolar mass of gas in chamber.-mol
$P_{w,in}$P_w_inVapour pressure of incoming air.-Pa
$P_{w,out}$P_w_outVapour pressure of outgoing air.-Pa
$R_{H,in}$R_H_inRelative humidity of incoming air.-1
$T_d$T_dDew point temperature of incoming air.-K
$T_{in}$T_inTemperature of incoming air.-K
$T_{out}$T_outTemperature of outgoing air (= chamber T_a).-K
$T_{room}$T_roomLab air temperature.-K
$V_c$V_cChamber volume.-m$^{3}$
$W_c$W_cChamber width.-m
" ], "text/plain": [ "[('Symbol', 'Name', 'Description', 'Definition', 'Default value', 'Units'),\n", " ('$F_{in,mol,a}$',\n", " 'F_in_mola',\n", " 'Molar flow rate of dry air into chamber.',\n", " '',\n", " '-',\n", " 'mol s$^{-1}$'),\n", " ('$F_{in,mol,w}$',\n", " 'F_in_molw',\n", " 'Molar flow rate of water vapour into chamber.',\n", " '',\n", " '-',\n", " 'mol s$^{-1}$'),\n", " ('$F_{in,v}$',\n", " 'F_in_v',\n", " 'Volumetric flow rate into chamber.',\n", " '',\n", " '-',\n", " 'm$^{3}$ s$^{-1}$'),\n", " ('$F_{out,mol,a}$',\n", " 'F_out_mola',\n", " 'Molar flow rate of dry air out of chamber.',\n", " '',\n", " '-',\n", " 'mol s$^{-1}$'),\n", " ('$F_{out,mol,w}$',\n", " 'F_out_molw',\n", " 'Molar flow rate of water vapour out of chamber.',\n", " '',\n", " '-',\n", " 'mol s$^{-1}$'),\n", " ('$F_{out,v}$',\n", " 'F_out_v',\n", " 'Volumetric flow rate out of chamber.',\n", " '',\n", " '-',\n", " 'm$^{3}$ s$^{-1}$'),\n", " ('$H_c$', 'H_c', 'Chamber height.', '', '-', 'm'),\n", " ('$L_A$', 'L_A', 'Leaf area.', '', '-', 'm$^{2}$'),\n", " ('$L_c$', 'L_c', 'Chamber length.', '', '-', 'm'),\n", " ('$n_c$', 'n_c', 'molar mass of gas in chamber.', '', '-', 'mol'),\n", " ('$P_{w,in}$', 'P_w_in', 'Vapour pressure of incoming air.', '', '-', 'Pa'),\n", " ('$P_{w,out}$', 'P_w_out', 'Vapour pressure of outgoing air.', '', '-', 'Pa'),\n", " ('$R_{H,in}$', 'R_H_in', 'Relative humidity of incoming air.', '', '-', '1'),\n", " ('$T_d$', 'T_d', 'Dew point temperature of incoming air.', '', '-', 'K'),\n", " ('$T_{in}$', 'T_in', 'Temperature of incoming air.', '', '-', 'K'),\n", " ('$T_{out}$',\n", " 'T_out',\n", " 'Temperature of outgoing air (= chamber T_a).',\n", " '',\n", " '-',\n", " 'K'),\n", " ('$T_{room}$', 'T_room', 'Lab air temperature.', '', '-', 'K'),\n", " ('$V_c$', 'V_c', 'Chamber volume.', '', '-', 'm$^{3}$'),\n", " ('$W_c$', 'W_c', 'Chamber width.', '', '-', 'm')]" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import essm.variables.chamber.mass as chamber_mass\n", "vars = ['chamber_mass.' + name for name in chamber_mass.__all__]\n", "generate_metadata_table([eval(name) for name in vars])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Bibliography\n", "See https://essm.readthedocs.io/en/latest/api.html#bibliography" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" }, "nav_menu": {}, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": { "height": "calc(100% - 180px)", "left": "10px", "top": "150px", "width": "253.991px" }, "toc_section_display": "block", "toc_window_display": true }, "toc_position": { "height": "991px", "left": "0px", "right": "888.92px", "top": "105px", "width": "212px" } }, "nbformat": 4, "nbformat_minor": 4 }