Sequential update of worksheet files

This worksheet exports other worksheets to .sage files in order to save time when executing every particular worksheet. It can also be used to reproduce all computational results with one click, just click on Cell -> Run All. This converts all other worksheets to .sage files and them loads them into the current worksheet, which executes all the code in each worksheet. This can take tens of minutes!


In [1]:
def fun_export_load_ipynb(list_wsnames, folder, load1 = True):
    '''
    Exports worksheet 'name' to .sage file in specified folder and then imports it 
    into current worksheet, executing all code and displaying its output. 
    If you only want to export but not load the files, set option load1 = False.
    '''
    for name in list_wsnames:
        fun_export_ipynb(name, folder)
        print 'created file ' + folder + name
        if load1:
            load(folder + name + '.sage')
            print 'imported file ' + folder + name
import json   # for reading notebook metadata
def fun_export_ipynb(worksheet, folder):
    '''
    Exports worksheet.ipynb to a .py or .sage depending on kernel.
    Example:
    fun_export_ipynb('Worksheet_setup', 'temp/')
    Need to import json before using this function. Unless option output=True is given,
    each line of text has a semicolon added in the .py file, preventing any output.
    '''
    str1 = 'jupyter nbconvert  --to=python \'' + worksheet+'.ipynb\''
    print str1
    print 'Exporting specified worksheet to .py file...'
    
    try:
        retcode = os.system(str1)
        if retcode < 0:
            print >>sys.stderr, "nbconvert was terminated by signal", -retcode
        else:
            print >>sys.stderr, "nbconvert returned", retcode
    except OSError as e:
        print >>sys.stderr, "Execution failed:", e
        print >>sys.stderr, "Trying ipython nbconvert instead..."
        str1 = 'ipython nbconvert  --to script \'' + worksheet+'.ipynb\''    # for new version of python
        try:      
            retcode = os.system(str1)
            if retcode < 0:
                print >>sys.stderr, "nbconvert was terminated by signal", -retcode
            else:
                print >>sys.stderr, "nbconvert returned", retcode
        except OSError as e:
            print >>sys.stderr, "Execution failed:", e              

    str1 = worksheet + '.py'
    
    print 'Checking if specified ipynb file was run with sage kernel...'
    with open(worksheet+'.ipynb') as data_file:    
        data = json.load(data_file)
    
    if data['metadata']['kernelspec']['name'][0:4] == 'sage':
        print 'Renaming .py file to .sage if notebook kernel was sage (to avoid exponent error)'
        str2 = folder + worksheet + '.sage'
        os.rename(str1, str2)

In [2]:
def fun_export_load_ipynb(list_wsnames, folder, load1 = True):
    '''
    Exports worksheet 'name' to .sage file in specified folder and then imports it 
    into current worksheet, executing all code and displaying its output. 
    If you only want to export but not load the files, set option load1 = False.
    '''
    for name in list_wsnames:
        fun_export_ipynb(name, folder)
        print 'created file ' + folder + name
        if load1:
            load(folder + name + '.sage')
            print 'imported file ' + folder + name

In [3]:
fun_export_load_ipynb(['Worksheet_setup'], 'temp/', load1 = True)


jupyter nbconvert  --to=python 'Worksheet_setup.ipynb'
Exporting specified worksheet to .py file...
nbconvert returned 0
Checking if specified ipynb file was run with sage kernel...
Renaming .py file to .sage if notebook kernel was sage (to avoid exponent error)
created file temp/Worksheet_setup
imported file temp/Worksheet_setup
/home/sschyman/Programs/sage-upgrade/local/lib/python2.7/site-packages/traitlets/traitlets.py:809: DeprecationWarning: A parent of InlineBackend._config_changed has adopted the new (traitlets 4.1) @observe(change) API
  clsname, change_or_name), DeprecationWarning)

Executing all worksheets in the correct order to reproduce figures saved in subfolder figures

Below, list_wsnames contains a list of worksheet names that need to be executed in the specified order to recreate all figures in the directory /figures. This will take a few minutes. If you only want to export the worksheets as .sage files to the temp folder, just change load1 = True to load1 = False.


In [4]:
list_wsnames = ['leaf_enbalance_eqs', 'E_PM_eqs', 'stomatal_cond_eqs', 'leaf_chamber_eqs', 'leaf_chamber_data', 'Tables_of_variables' ]
folder = 'temp/'
fun_export_load_ipynb(list_wsnames, folder, load)


jupyter nbconvert  --to=python 'leaf_enbalance_eqs.ipynb'
Exporting specified worksheet to .py file...
nbconvert returned 0
Checking if specified ipynb file was run with sage kernel...
Renaming .py file to .sage if notebook kernel was sage (to avoid exponent error)
created file temp/leaf_enbalance_eqs
44100.0000000000kilogram*meter^2/(mole*second^2)
meter/second == meter/second
mole/meter^3 == mole/meter^3
mole/(meter^2*second) == mole/(meter^2*second)
mole/(meter^2*second) == mole/(meter^2*second)
mole/(meter^2*second) == mole/(meter^2*second)
mole/meter^3 == mole/meter^3
kilogram/(kelvin*second^3) == kilogram/(kelvin*second^3)
1 == 1
1 == 1
kilogram/meter^3 == kilogram/meter^3
kilogram/(meter*second^2) == kilogram/(meter*second^2)
kilogram/(meter*second^2) == kilogram/(meter*second^2)
(1.13400000000000e-7)*T_l^4 - 900.306522304087
C_wa            1.29441408346663
C_wl            1.91570361006325
D_va            0.0000248765000000000
E_l             185.424519010311
E_lmol          0.00420463761928142
H_l             325.157459266011
L_l             0.0300000000000000
Le              0.888469037042992
M_N2            0.0280000000000000
M_O2            0.0320000000000000
M_w             0.0180000000000000
Nu              26.1863624980041
P_a             101325         
P_wa            3212.56734153661
P_wl            4868.42309771766
Pr              0.710000000000000
R_ll            89.4180217236781
R_mol           8.31447200000000
R_s             600            
Re              1927.40122068744
Re_c            3000           
T_a             298.500000000000
T_l             305.650648423  
T_w             298.500000000000
a_s             1.00000000000000
a_sh            2              
alpha_a         0.0000221020000000000
c_pa            1010           
epsilon_l       1              
g               9.81000000000000
g_bw            0.0209367439791524
g_sw            0.0100000000000000
g_tw            0.00676759777734245
h_c             22.7362219510171
k_a             0.0260474000000000
lambda_E        2.45000000000000e6
nu_a            0.0000155650000000000
rho_a           1.16339248053449
sigm            5.67000000000000e-8
v_w             1              
jupyter nbconvert  --to=python 'leaf_enbalance_eqs.ipynb'
Exporting specified worksheet to .py file...
nbconvert returned 0
Checking if specified ipynb file was run with sage kernel...
Renaming .py file to .sage if notebook kernel was sage (to avoid exponent error)
imported file temp/leaf_enbalance_eqs
jupyter nbconvert  --to=python 'E_PM_eqs.ipynb'
Exporting specified worksheet to .py file...
nbconvert returned 0
Checking if specified ipynb file was run with sage kernel...
Renaming .py file to .sage if notebook kernel was sage (to avoid exponent error)
created file temp/E_PM_eqs
[
[P_wl == (Delta_eTa*P_wa*f_u + P_was*f_u*gamma_v - Delta_eTa*R_ll + Delta_eTa*R_s)/(Delta_eTa*f_u + f_u*gamma_v), E_w == -((P_wa - P_was)*f_u*gamma_v + Delta_eTa*R_ll - Delta_eTa*R_s)/(Delta_eTa + gamma_v), beta_B == -((P_wa - P_was)*f_u - R_ll + R_s)*gamma_v/((P_wa - P_was)*f_u*gamma_v + Delta_eTa*R_ll - Delta_eTa*R_s)]
]
kelvin == kelvin
kilogram/second^3 == kilogram/second^3
kilogram/second^3 == kilogram/second^3
kilogram/(meter*second^2) == kilogram/(meter*second^2)
kilogram/second^3 == kilogram/second^3
kilogram/second^3 == kilogram/second^3
kilogram/second^3 == kilogram/second^3
kilogram/second^3 == kilogram/second^3
kilogram/second^3 == kilogram/second^3
kilogram/(meter*second^2) == kilogram/(meter*second^2)
kelvin == kelvin
meter/second == meter/second
$ g $ $ v_{w} $ $ {P_{wa}} $ $ {a_{sh}} $ $ M_{O_{2}} $ $ T_{a} $ $ {R_{mol}} $ $ T_{w} $ $ R_{s} $ $ {c_{pa}} $ $ M_{N_{2}} $ $ \epsilon_{l} $ $ {\sigma} $ $ a_{s} $ $ P_{a} $ $ {N_{Pr}} $ $ {N_{Re_c}} $ $ M_{w} $ $ \lambda_{E} $ $ \epsilon $ $ {g_{sw}} $ $ L_{l} $ 
$ g $ $ v_{w} $ $ {P_{wa}} $ $ {a_{sh}} $ $ M_{O_{2}} $ $ T_{a} $ $ {R_{mol}} $ $ T_{w} $ $ R_{s} $ $ {c_{pa}} $ $ M_{N_{2}} $ $ \epsilon_{l} $ $ {\sigma} $ $ a_{s} $ $ P_{a} $ $ {N_{Pr}} $ $ {N_{Re_c}} $ $ M_{w} $ $ \lambda_{E} $ $ \epsilon $ $ {g_{sw}} $ $ L_{l} $ 
T_l = 305.650648423
E_l = 185.424519010311
H_l = 325.157459266011
R_ll = 89.4180217236781
Direct estimates: 
E_l == 201.520517691209
H_l == 398.479482308791
T_l == 307.263098002106
P_wl == 4888.37878666472
Using estimated T_l: 
5332.58270455183
E_l == 254.937149826832
H_l == 398.479482308791
0 == 110.468903558398
Using estimated T_l only to calculate R_ll: 
E_l == 164.417599968095
H_l == 325.113496473507
307.263098002106 == 305.649681621994
Using 1 iteration to get T_l: 
T_l(R_ll=0): 307.263098002106
R_ll(T_l) = 110.468903558398
T_l = 305.649681621994
E_l == 199.088662380171
H_l == 325.113496473508
185.424519010311 == 199.120796183645
185.424519010311 == 185.424519010311
T_l = 305.650648423
E_l = 185.424519010311
H_l = 325.157459266011
R_ll = 89.4180217236781
Direct estimates: 
E_l == 201.520517691209
H_l == 398.479482308791
T_l == 307.263098002106
Using estimated T_l: 
E_l == 236.648612148471
H_l == 398.479482308791
0 == 110.468903558398
Using estimated T_l only to calculate R_ll: 
E_l == 156.390826464557
H_l == 333.140269977045
307.263098002106 == 305.826201131718
Using 1 iteration to get T_l: 
T_l(R_ll=0): 307.479451379050
R_ll(T_l) = 113.318783813752
T_l = 305.783550529736
E_l == 189.502633426895
H_l == 331.200842871040
kilogram/second^3 == kilogram/second^3
kilogram/second^3 == kilogram/second^3
kilogram/second^3 == kilogram/second^3
E_{l} = -\frac{{\left({P_{wa}} - {P_{was}}\right)} c_{E} c_{H} + {\left({\Delta_{eTa}} {R_{ll}} - {\Delta_{eTa}} R_{s}\right)} c_{E}}{{\Delta_{eTa}} c_{E} + c_{H}}
kilogram/second^3 == kilogram/second^3
H_{l} = \frac{{\left({\left({P_{wa}} - {P_{was}}\right)} c_{E} - {R_{ll}} + R_{s}\right)} c_{H}}{{\Delta_{eTa}} c_{E} + c_{H}}
kelvin == kelvin
T_{l} = \frac{{\left({\Delta_{eTa}} T_{a} + {P_{wa}} - {P_{was}}\right)} c_{E} + T_{a} c_{H} - {R_{ll}} + R_{s}}{{\Delta_{eTa}} c_{E} + c_{H}}
0 == 0
0 == 0
0 == 0
[
[E_l == -(Delta_eTa*(R_ll - R_s)*c_E + (P_wa*c_E - P_was*c_E)*c_H)/(Delta_eTa*c_E + c_H), H_l == (P_wa*c_E - P_was*c_E - R_ll + R_s)*c_H/(Delta_eTa*c_E + c_H), P_wl == ((P_wa*c_E - R_ll + R_s)*Delta_eTa + P_was*c_H)/(Delta_eTa*c_E + c_H), T_l == (Delta_eTa*T_a*c_E + P_wa*c_E - P_was*c_E + T_a*c_H - R_ll + R_s)/(Delta_eTa*c_E + c_H)]
]
kilogram/second^3 == kilogram/second^3
E_{l} = -\frac{{\Delta_{eTa}} {\left({R_{ll}} - R_{s}\right)} c_{E} + {\left({P_{wa}} c_{E} - {P_{was}} c_{E}\right)} c_{H}}{{\Delta_{eTa}} c_{E} + c_{H}}
kilogram/second^3 == kilogram/second^3
H_{l} = \frac{{\left({P_{wa}} c_{E} - {P_{was}} c_{E} - {R_{ll}} + R_{s}\right)} c_{H}}{{\Delta_{eTa}} c_{E} + c_{H}}
kilogram/(meter*second^2) == kilogram/(meter*second^2)
{P_{wl}} = \frac{{\left({P_{wa}} c_{E} - {R_{ll}} + R_{s}\right)} {\Delta_{eTa}} + {P_{was}} c_{H}}{{\Delta_{eTa}} c_{E} + c_{H}}
kelvin == kelvin
T_{l} = \frac{{\Delta_{eTa}} T_{a} c_{E} + {P_{wa}} c_{E} - {P_{was}} c_{E} + T_{a} c_{H} - {R_{ll}} + R_{s}}{{\Delta_{eTa}} c_{E} + c_{H}}
0 == 0
0 == 0
0 == 0
[
[E_l == -(Delta_eTa*(R_ll - R_s)*c_E + (P_wa*c_E - P_was*c_E)*c_H)/(Delta_eTa*c_E + c_H), H_l == (P_wa*c_E - P_was*c_E - R_ll + R_s)*c_H/(Delta_eTa*c_E + c_H), P_wl == ((P_wa*c_E - R_ll + R_s)*Delta_eTa + P_was*c_H)/(Delta_eTa*c_E + c_H), T_l == (Delta_eTa*T_a*c_E + P_wa*c_E - P_was*c_E + T_a*c_H - R_ll + R_s)/(Delta_eTa*c_E + c_H)]
]
numerical solution: 
T_l = 308.321395271
E_l = 180.542235053941
H_l = 150.521099595469
R_ll = 68.9366653505872
g_bw = 0.0131620455576424
g_tw = 0.00291849206962754
Direct estimates: 
E_l = 198.222104889662
H_l = 201.777895110338
T_l == 310.133484539870
T_l == 310.133484539870
T_l == 309.093414355984
400 == 400.000000000000
Using T_l from eq_Tl_Delta: 
T_l = 310.133484539870
P_wl = 6256.38161942359
E_l = 216.096641092879
H_l = 201.777895110338
R_ll = 93.2413750164809
400 == 511.115911219698
Using T_l from eq_Tl_Delta only to calculate R_ll: 
T_l = 310.133484539870
R_ll = 93.2413750164809
E_l = 169.892070077829
H_l = 136.866554905691
400 == 400.000000000000
Using T_l from eq_Tl_Delta2: 
T_l = 309.093414355984
P_wl = 5906.50495424572
E_l = 198.222104889661
H_l = 172.358447812369
R_ll = 79.2391719599513
400 == 449.819724661981
Using T_l from eq_Tl_Delta2 only to calculate R_ll: 
T_l = 309.093414355984
R_ll = 79.2391719599513
E_l = 174.146435695707
H_l = 146.614392344342
400 == 400.000000000000
T_l = 305.650648423
E_l = 185.424519010311
H_l = 325.157459266011
R_ll = 89.4180217236781
Direct estimates: 
E_l == 201.520517691209
H_l == 398.479482308791
T_l == 307.263098002106
Using estimated T_l: 
E_l == 254.937149826832
H_l == 398.479482308791
0 == 110.468903558398
Using estimated T_l only to calculate R_ll: 
E_l == 164.417599968095
H_l == 325.113496473507
307.263098002106 == 305.649681621994
Using 1 iteration to get T_l: 
T_l(R_ll=0): 307.263098002106
R_ll(T_l) = 110.468903558398
T_l = 305.649681621994
E_l == 199.088662380171
H_l == 325.113496473508
kilogram/second^3 == kilogram/second^3
kilogram/second^3 == kilogram/second^3
kilogram/second^3 == kilogram/second^3
1.08204645272521
T_l = 308.321395271
E_l = 180.542235053941
H_l = 150.521099595469
R_ll = 68.9366653505872
g_bw = 0.0131620455576424
g_tw = 0.00291849206962754
Direct estimates: 
E_l = 198.222104889662
H_l = 201.777895110338
T_l == 310.133484539870
T_l == 310.133484539870
T_l == 309.093414355984
400 == 400.000000000000
Penman-stomata: 
E_l = 198.222104889662
H_l = 201.777895110338
T_l = 310.133484539870
400 == 400.000000000000
PM-equation: 
E_l = 241.448619283973
H_l = 158.551380716027
400 == 400.000000000000
MU-equation: 
E_l = 156.668183937778
H_l = 243.331816062222
400 == 400.000000000000
Corrected MU-equation: 
E_l = 195.741933442269
H_l = 204.258066557731
400 == 400.000000000000
4*T_l^3*a_sh*epsilon_l*sigm
[
Rll1 == -3*T1^4*a_sh*epsilon_l*sigm - T_w^4*a_sh*epsilon_l*sigm
]
kilogram/second^3 == kilogram/second^3
kilogram/second^3 == kilogram/second^3
kilogram/second^3 == kilogram/second^3
kilogram/second^3 == kilogram/second^3
kelvin == kelvin
T_l = 308.321395271
E_l = 180.542235053941
H_l = 150.521099595469
R_ll = 68.9366653505872
g_bw = 0.0131620455576424
g_tw = 0.00291849206962754
Direct estimates: 
E_l = 177.353891811830
H_l = 153.963492920038
T_l = 308.443094724766
R_ll = 68.6826152681320
308.443094724766 == 308.443094724766
308.443094724766 == 308.443094724766
308.443094724766 == 307.807922524752
400 == 400.000000000000
Using T_l from eq_Tl_Delta_Rlllin.rhs() only to calculate R_ll: 
T_l = 308.443094724766
R_ll = 70.5556017512511
E_l = 176.784812127415
H_l = 152.659586121334
400 == 400.000000000000
Penman-stomata: 
E_l = 198.222104889662
H_l = 201.777895110338
T_l = 310.133484539870
400 == 400.000000000000
PM-equation: 
E_l = 241.448619283973
H_l = 158.551380716027
400 == 400.000000000000
MU-equation: 
E_l = 156.668183937778
H_l = 243.331816062222
400 == 400.000000000000
Corrected MU-equation: 
E_l = 195.741933442269
H_l = 204.258066557731
400 == 400.000000000000
imported file temp/E_PM_eqs
jupyter nbconvert  --to=python 'stomatal_cond_eqs.ipynb'
Exporting specified worksheet to .py file...
nbconvert returned 0
Checking if specified ipynb file was run with sage kernel...
Renaming .py file to .sage if notebook kernel was sage (to avoid exponent error)
created file temp/stomatal_cond_eqs
mole/(meter*second) == mole/(meter*second)
mole/(meter^2*second) == mole/(meter^2*second)
meter^2 == meter^2
meter^2*second/mole == meter^2*second/mole
meter^2*second/mole == meter^2*second/mole
imported file temp/stomatal_cond_eqs
jupyter nbconvert  --to=python 'leaf_chamber_eqs.ipynb'
Exporting specified worksheet to .py file...
nbconvert returned 0
Checking if specified ipynb file was run with sage kernel...
Renaming .py file to .sage if notebook kernel was sage (to avoid exponent error)
created file temp/leaf_chamber_eqs
C_wa            0.647207041733317
C_wl            1.12479267904924
D_va            0.0000248765000000000
E_l             142.258640360008
E_lmol          0.00322581950929723
H_l             -112.722448184652
L_l             0.0300000000000000
Le              0.888469037042992
M_N2            0.0280000000000000
M_O2            0.0320000000000000
M_w             0.0180000000000000
Nu              26.1863624980041
P_a             101325         
P_wa            1606.28367076831
P_wl            2768.40610422238
Pr              0.710000000000000
R_ll            -29.5361921753575
R_mol           8.31447200000000
R_s             0.000000000000000
Re              1927.40122068744
Re_c            3000           
T_a             298.500000000000
T_l             296.021082253  
T_w             298.500000000000
a_s             1.00000000000000
a_sh            2              
alpha_a         0.0000221020000000000
c_pa            1010           
epsilon_l       1              
g               9.81000000000000
g_bw            0.0208112438130012
g_sw            0.0100000000000000
g_tw            0.00675443157676732
h_c             22.7362219510171
k_a             0.0260474000000000
lambda_E        2.45000000000000e6
nu_a            0.0000155650000000000
rho_a           1.17040820486688
sigm            5.67000000000000e-8
v_w             1              
Volume = 0.310000000000000 l
min flow rate for flushing = 1.55000000000000e-11 m3/s
min flow rate for flushing = 0.930000000000000 l/min
flow rate for 1 m/s direct wind = 0.00150000000000000 m3/s
flow rate for 1 m/s direct wind = 90.0000000000000 l/m
flow rate for 5 m/s direct wind = 0.00750000000000000 m3/s
flow rate for 5 m/s direct wind = 450.000000000000 l/m
Volume = 0.400000000000000 l
min flow rate for flushing = 2.00000000000000e-11 m3/s
min flow rate for flushing = 1.20000000000000 l/min
flow rate for 1 m/s direct wind = 0.00150000000000000 m3/s
flow rate for 1 m/s direct wind = 90.0000000000000 l/m
[
[R_d == S_s, R_lu == -S_a + S_s, R_ld == S_b, R_u == 0]
]
B_l == 0.0106559443973775
B_l == 0.00119137080184970
meter^3 == meter^3
mole/second == mole/second
mole/second == mole/second
mole/second == mole/second
mole/second == mole/second
meter^3/second == meter^3/second
kilogram/second^3 == kilogram/second^3
[
T_out == (F_in_mola*M_air*T_in*c_pa + F_in_molw*M_w*T_in*c_pv + H_l*L_A + Q_in)/(E_lmol*L_A*M_w*c_pv + F_in_mola*M_air*c_pa + F_in_molw*M_w*c_pv)
]
T_out == (F_in_v*M_w*P_w_in*T_in*c_pv + H_l*L_A*R_mol*T_in + Q_in*R_mol*T_in + (F_in_v*M_air*P_a - F_in_v*M_air*P_w_in)*T_in*c_pa)/(E_lmol*L_A*M_w*R_mol*T_in*c_pv + F_in_v*M_w*P_w_in*c_pv + (F_in_v*M_air*P_a - F_in_v*M_air*P_w_in)*c_pa)
[
F_out_v == (E_lmol*L_A*R_mol*T_in*T_out + F_in_v*P_a*T_out)/(P_a*T_in)
]
[
T_in == (F_in_v*M_w*P_w_in*T_out*c_pv + (F_in_v*M_air*P_a - F_in_v*M_air*P_w_in)*T_out*c_pa)/(F_in_v*M_w*P_w_in*c_pv - (E_lmol*M_w*R_mol*T_out*c_pv - H_l*R_mol)*L_A + Q_in*R_mol + (F_in_v*M_air*P_a - F_in_v*M_air*P_w_in)*c_pa)
]
[
Q_in == ((E_lmol*M_w*R_mol*T_in*T_out*c_pv - H_l*R_mol*T_in)*L_A - ((F_in_v*M_air*P_a - F_in_v*M_air*P_w_in)*T_in - (F_in_v*M_air*P_a - F_in_v*M_air*P_w_in)*T_out)*c_pa - (F_in_v*M_w*P_w_in*T_in - F_in_v*M_w*P_w_in*T_out)*c_pv)/(R_mol*T_in)
]
[
H_l == (E_lmol*L_A*M_w*R_mol*T_in*T_out*c_pv - Q_in*R_mol*T_in - ((F_in_v*M_air*P_a - F_in_v*M_air*P_w_in)*T_in - (F_in_v*M_air*P_a - F_in_v*M_air*P_w_in)*T_out)*c_pa - (F_in_v*M_w*P_w_in*T_in - F_in_v*M_w*P_w_in*T_out)*c_pv)/(L_A*R_mol*T_in)
]
[
H_l == -((F_in_mola*M_air*T_in - F_in_mola*M_air*T_out)*c_pa + (F_in_molw*M_w*T_in - F_out_molw*M_w*T_out)*c_pv + Q_in)/L_A
]
[19.1756620432331, 35.0631107274011, 62.0367042507648, 106.473009443655, 177.667645607840, 288.831780737493, 458.305321164456, 710.999051614674, 1080.07052944457, 1608.82992645281, 2352.86266113812, 3382.34604242497, 4784.52773726516, 6666.32514525647, 9156.99713166349]
mole/second == mole/second
mole/second == mole/second
meter^3/second == meter^3/second
mole/second == mole/second
meter^3/second == meter^3/second
1227.86016957787
0.000166666666666667
Volumentric flow at 0 oC: 0.000168711114309656 m3/s
Volumentric flow at 25 oC: 0.000184152365848157 m3/s
25oC/0oC: 1.09152480322167
Volumentric flow at 25 oC without added vapour: 0.000181920800536946 m3/s
kilogram/(meter*second^2) == kilogram/(meter*second^2)
mole/(meter^2*second) == mole/(meter^2*second)
1227.86016957787
0.000166666666666667
Volumentric flow at 0 oC: 0.000168711114309656 m3/s
Volumentric flow at 25 oC: 0.000184152365848157 m3/s
25oC/0oC: 1.09152480322167
Volumentric flow at 25 oC without added vapour: 0.000181920800536946 m3/s
0.821854415126695
jupyter nbconvert  --to=python 'leaf_chamber_eqs.ipynb'
Exporting specified worksheet to .py file...
nbconvert returned 0
Checking if specified ipynb file was run with sage kernel...
Renaming .py file to .sage if notebook kernel was sage (to avoid exponent error)
imported file temp/leaf_chamber_eqs
jupyter nbconvert  --to=python 'leaf_chamber_data.ipynb'
Exporting specified worksheet to .py file...
nbconvert returned 0
Checking if specified ipynb file was run with sage kernel...
Renaming .py file to .sage if notebook kernel was sage (to avoid exponent error)
created file temp/leaf_chamber_data
E_l             180.542235053941
H_l             150.521099595469
T_l             308.321395271  
kilogram/second^3 == kilogram/second^3
kilogram/second^3 == kilogram/second^3
h_c(Ball): 21.8153792127944
g_vmol(Ball): 0.110506932339455
g_vmol(SS): g_twmol == 0.117381005752392
T_l(Ball): 309.125596874492
T_l(SS): 308.321395271
T_a: 303
lc_time T_in1 T_in2 T_wall_in T_wall_out T_outside T_outside_PT T_chamber T_chamber1 T_leaf1 T_leaf2 T_leaf_in Wind T_dew Air_inflow Air_outflow nr_time T_leaf_IR V_leaf_IR Rn_above_leaf Rn_below_leaf Rn_beside_leaf RnV_above_leaf RnV_below_leaf RnV_beside_leaf sens_timefirst sens_timelast water_flow_avg water_flow_std water_flow_n pow_timefirst pow_timelast fan_power_avg fan_power_std fan_power_n Comment...................................................
TS K K K K K Deg C K K K K K m/s degC SLPM SLPM TS Deg C mV W/m^2 W/m^2 W/m^2 mV mV mV ul/min ul/min ul/min TS TS W W
2014-03-25 12:39:34 23.98 23.97 22.56 22.52 22.50 25.93 22.58 21.99 19.92 21.18 16.53 0.9999 -19.32 9.052 4.451 2014-03-25 12:39:35 19.36 -0.1045 16.74 -6.927 -26.00 -0.02004 0.007208 0.03366 2014-03-25 12:39:21 2014-03-25 12:39:28 -8.233 0.1577 100 2014-03-25 12:38:37 2014-03-25 12:39:35 0.06427 0.00001266 54 Black leaf, silver perforated alu (35.4-1), varying Tdew
2014-03-25 13:01:40 23.97 23.97 22.57 22.58 22.54 26.05 22.58 22.00 20.00 21.22 16.68 1.020 -14.97 8.490 4.180 2014-03-25 13:01:41 19.36 -0.1045 16.25 -6.859 -25.52 -0.01945 0.007137 0.03303 2014-03-25 13:01:22 2014-03-25 13:01:29 -7.859 0.3323 100 2014-03-25 13:00:39 2014-03-25 13:01:38 0.06428 0.00002267 55 varying Tdew
2014-03-25 14:07:31 23.91 23.91 22.58 22.59 22.59 26.10 22.57 22.04 20.10 21.26 16.88 1.021 -10.08 8.556 4.293 2014-03-25 14:07:31 19.53 -0.09854 15.18 -6.506 -24.44 -0.01817 0.006771 0.03163 2014-03-25 14:07:11 2014-03-25 14:07:18 -7.807 0.1403 100 2014-03-25 14:06:32 2014-03-25 14:07:31 0.06429 0.00001291 54 varying Tdew
2014-03-25 16:30:31 24.25 24.24 22.76 22.68 22.67 26.14 22.77 22.26 20.43 21.52 17.38 1.028 -5.017 7.524 3.821 2014-03-25 16:30:34 19.81 -0.08857 14.46 -6.187 -22.65 -0.01730 0.006439 0.02931 2014-03-25 16:30:18 2014-03-25 16:30:25 -7.440 0.07817 100 2014-03-25 16:29:33 2014-03-25 16:30:32 0.06417 0.00001307 54 varying Tdew
2014-03-25 16:48:46 24.28 24.23 22.73 22.73 22.72 26.02 22.75 22.25 20.57 21.61 17.81 1.019 0.08945 6.557 3.387 2014-03-25 16:48:48 19.92 -0.08459 13.34 -5.753 -20.79 -0.01596 0.005988 0.02690 2014-03-25 16:48:26 2014-03-25 16:48:33 -6.759 0.2183 100 2014-03-25 16:47:46 2014-03-25 16:48:45 0.06423 0.00002734 55 varying Tdew
2014-03-25 17:08:19 24.24 24.21 22.75 22.67 22.68 26.02 22.74 22.34 20.86 21.74 18.41 1.026 5.120 5.555 2.939 2014-03-25 17:08:22 20.11 -0.07734 11.71 -5.082 -18.50 -0.01401 0.005290 0.02393 2014-03-25 17:08:08 2014-03-25 17:08:15 -5.926 0.1492 100 2014-03-25 17:07:21 2014-03-25 17:08:20 0.06411 0.00001511 55 varying Tdew
2014-03-25 17:33:07 24.16 24.14 22.79 22.74 22.69 26.06 22.80 22.46 21.25 21.97 19.27 1.016 10.21 4.554 2.509 2014-03-25 17:33:08 20.48 -0.06401 9.708 -4.205 -15.42 -0.01162 0.004379 0.01994 2014-03-25 17:32:52 2014-03-25 17:32:59 -5.070 0.1435 100 2014-03-25 17:32:06 2014-03-25 17:33:05 0.06434 0.00002586 55 varying Tdew
2014-03-25 18:20:04 23.97 23.93 22.78 22.77 22.75 26.06 22.79 22.53 21.71 22.21 20.36 1.040 15.16 3.047 1.719 2014-03-25 18:20:06 20.90 -0.04869 6.990 -2.973 -10.52 -0.008364 0.003099 0.01360 2014-03-25 18:19:53 2014-03-25 18:20:00 -3.535 0.2791 100 2014-03-25 18:19:05 2014-03-25 18:20:04 0.06408 0.00002733 55 varying Tdew
R_s = (0.0, 0.0) joule/(R_s*meter^2*second)
P_wa = (218.598991722, 1694.78883295) pascal/P_wa
T_a = (295.72, 295.95) kelvin/T_a
v_w = (0.9999, 1.04) meter/(second*v_w)
g_sw = (0.035, 0.035) meter/(g_sw*second)
lc_time T_in1 T_in2 T_wall_in T_wall_out T_outside T_outside_PT T_chamber T_chamber1 T_leaf1 T_leaf2 T_leaf_in Wind T_dew Air_inflow Air_outflow nr_time T_leaf_IR V_leaf_IR Rn_above_leaf Rn_below_leaf Rn_beside_leaf RnV_above_leaf RnV_below_leaf RnV_beside_leaf sens_timefirst sens_timelast water_flow_avg water_flow_std water_flow_n pow_timefirst pow_timelast fan_power_avg fan_power_std fan_power_n Comment...................................................
TS K K K K K Deg C K K K K K m/s degC SLPM SLPM TS Deg C mV W/m^2 W/m^2 W/m^2 mV mV mV ul/min ul/min ul/min TS TS W W
2014-03-27 11:22:28 15.30 15.41 21.98 21.97 21.88 25.24 22.00 21.67 20.29 21.07 18.41 0.8333 10.21 6.827 3.491 2014-03-27 11:22:29 20.30 -0.07058 9.835 -3.912 -13.66 -0.01177 0.004074 0.01766 2014-03-27 11:22:19 2014-03-27 11:22:26 -4.825 0.1412 100 2014-03-27 11:21:28 2014-03-27 11:22:27 1.195 0.0003885 54 Black leaf, silver perforated alu (35.4-1), varying wind speed
2014-03-27 13:01:58 15.54 15.65 22.22 22.26 22.22 25.53 22.22 21.95 20.72 21.46 18.72 1.313 10.21 6.427 3.324 2014-03-27 13:02:01 20.41 -0.06664 10.02 -3.833 -16.85 -0.01199 0.003993 0.02180 2014-03-27 13:01:48 2014-03-27 13:01:55 -5.543 0.1600 100 2014-03-27 13:00:59 2014-03-27 13:01:58 1.181 0.0004875 54 varying wind speed
2014-03-27 14:04:25 15.68 15.80 22.41 22.40 22.37 25.69 22.43 22.17 21.05 21.76 18.95 1.796 10.21 6.251 3.274 2014-03-27 14:04:23 20.36 -0.06849 10.02 -3.781 -17.83 -0.01198 0.003939 0.02307 2014-03-27 14:04:10 2014-03-27 14:04:17 -6.124 0.1336 100 2014-03-27 14:03:24 2014-03-27 14:04:23 1.185 0.0003885 54 varying wind speed
2014-03-27 15:55:10 15.74 15.85 22.40 22.42 22.36 25.61 22.42 22.18 21.22 21.85 19.06 2.299 10.21 6.140 3.202 2014-03-27 15:55:11 19.58 -0.09654 9.917 -3.843 -17.14 -0.01187 0.004003 0.02218 2014-03-27 15:55:01 2014-03-27 15:55:08 -6.583 0.1710 100 2014-03-27 15:54:09 2014-03-27 15:55:08 1.169 0.0004755 55 varying wind speed
2014-03-27 17:01:01 15.90 16.02 22.43 22.48 22.40 25.81 22.45 22.22 21.42 21.96 19.24 2.995 10.21 5.851 3.136 2014-03-27 17:01:03 20.03 -0.08036 8.408 -3.625 -16.34 -0.01006 0.003776 0.02114 2014-03-27 17:00:38 2014-03-27 17:00:48 -7.255 0.1174 100 2014-03-27 17:00:04 2014-03-27 17:01:03 1.144 0.0000 54 varying wind speed
2014-03-27 19:00:22 15.88 15.99 22.40 22.38 22.21 25.57 22.46 22.24 21.53 22.03 19.38 3.831 10.20 5.750 3.057 2014-03-27 19:00:26 19.20 -0.1106 8.123 -3.345 -14.00 -0.009719 0.003485 0.01811 2014-03-27 19:00:07 2014-03-27 19:00:17 -8.006 0.1148 100 2014-03-27 18:59:24 2014-03-27 19:00:23 1.155 0.0004130 55 varying wind speed
2014-03-28 10:08:04 15.46 15.57 21.81 21.91 21.85 25.20 21.85 21.67 20.98 21.44 18.93 3.804 10.20 6.147 3.245 2014-03-28 10:08:10 19.58 -0.09655 8.239 -2.960 -12.37 -0.009857 0.003085 0.01600 2014-03-28 10:07:52 2014-03-28 10:08:02 -7.736 0.1666 100 2014-03-28 10:07:07 2014-03-28 10:08:06 1.159 0.0001872 55 New day
2014-03-28 11:29:49 15.71 15.83 22.23 22.21 22.15 25.57 22.24 22.08 21.38 21.84 19.29 4.335 10.20 5.858 3.204 2014-03-28 11:29:51 19.47 -0.1005 8.058 -3.227 -12.36 -0.009641 0.003363 0.01599 2014-03-28 11:29:27 2014-03-28 11:29:37 -7.984 0.08737 100 2014-03-28 11:28:49 2014-03-28 11:29:48 1.174 0.0004692 55 New day
2014-03-28 13:47:28 15.80 15.90 22.35 22.28 22.21 25.57 22.31 22.16 21.54 21.99 19.46 5.102 10.20 5.858 3.131 2014-03-28 13:47:29 19.50 -0.09967 6.985 -3.328 -12.71 -0.008357 0.003468 0.01643 2014-03-28 13:47:18 2014-03-28 13:47:27 -8.505 0.1932 100 2014-03-28 13:46:29 2014-03-28 13:47:28 1.186 0.0004914 54 Reduced head difference (transpiration seemed low)
2014-03-28 15:04:55 15.76 15.86 22.38 22.34 22.20 25.53 22.37 22.21 21.55 22.01 19.44 4.611 10.20 5.855 3.163 2014-03-28 15:04:56 19.39 -0.1037 7.228 -3.377 -12.89 -0.008648 0.003519 0.01667 2014-03-28 15:04:45 2014-03-28 15:04:55 -8.219 0.1147 100 2014-03-28 15:03:56 2014-03-28 15:04:55 1.182 0.0003857 55 Reduced head difference (transpiration seemed low)
2014-03-28 15:38:46 15.77 15.86 22.30 22.37 22.30 25.57 22.33 22.08 21.44 21.94 19.34 4.168 10.21 5.948 3.144 2014-03-28 15:38:49 19.42 -0.1023 7.755 -3.358 -12.98 -0.009278 0.003499 0.01679 2014-03-28 15:38:37 2014-03-28 15:38:47 -7.979 0.1037 100 2014-03-28 15:37:49 2014-03-28 15:38:47 1.168 0.001412 54 Varying Tdew
2014-03-31 12:42:52 16.15 16.28 23.06 23.06 22.93 26.30 23.10 22.89 22.13 22.64 19.90 3.325 10.20 5.259 2.863 2014-03-31 12:42:54 19.57 -0.09719 8.972 -3.413 -14.55 -0.01074 0.003556 0.01882 2014-03-31 13:42:34 2014-03-31 13:42:41 -7.484 0.09733 100 2014-03-31 13:41:52 2014-03-31 13:42:51 1.147 0.0001906 53 New daz
2014-03-31 14:49:10 16.20 16.33 23.25 23.34 23.21 26.63 23.28 23.04 22.17 22.75 19.91 2.637 10.18 5.346 2.915 2014-03-31 14:49:14 19.81 -0.08855 9.860 -3.661 -16.83 -0.01180 0.003814 0.02177 2014-03-31 15:48:56 2014-03-31 15:49:03 -7.032 0.1764 100 2014-03-31 15:48:12 2014-03-31 15:49:11 1.147 0.0000 53 Varying wind
2014-03-31 16:28:13 16.03 16.16 23.37 23.41 23.29 26.63 23.38 23.08 21.63 22.51 19.59 1.042 10.19 5.857 3.016 2014-03-31 16:28:15 19.31 -0.1065 10.95 -4.276 -14.55 -0.01310 0.004454 0.01881 2014-03-31 17:28:06 2014-03-31 17:28:13 -5.120 0.1585 100 2014-03-31 17:27:14 2014-03-31 17:28:13 1.147 0.0000 53 Varying wind
0.0420000000000000
R_s = (0.0, 0.0) joule/(R_s*meter^2*second)
P_wa = (1187.38813505, 1278.34796382) pascal/P_wa
T_a = (295.0, 296.53) kelvin/T_a
v_w = (0.8333, 5.102) meter/(second*v_w)
g_sw = (0.042, 0.042) meter/(g_sw*second)
18
['Date', 'Time', 'Inflow rate', 'Tdew humidifier', 'Incoming2 Temp_C(5)', 'Incoming3 Temp_C(6)', 'wall inside Temp_C(3) ', 'wall outside Temp_C(4)', 'chamber air Temp_C(1) ', 'Tl1', 'Tl2', 'TlIR', 'Tlin', 'Fan power', 'FlowMeter out', 'Wind speed', 'Sensirion', 'Comment']
['', '', 'l/min', 'oC', 'oC', 'oC', 'oC', 'oC', 'oC', 'oC', 'oC', 'oC', 'oC', 'W', 'l/min', 'm/s', 'ul/min', '']
R_s = (0.0, 0.0) joule/(R_s*meter^2*second)
P_wa = (168.502255462, 1143.55502295) pascal/P_wa
T_a = (296.05, 296.71) kelvin/T_a
v_w = (0.7, 0.7) meter/(second*v_w)
g_sw = (0.0065, 0.0065) meter/(g_sw*second)
R_s = (0.0, 700.0) joule/(R_s*meter^2*second)
P_wa = (1300.96492908905, 1300.96492908905) pascal/P_wa
T_a = (295, 295) kelvin/T_a
v_w = (1.0, 1.0) meter/(second*v_w)
g_sw = (0.045, 0.045) meter/(g_sw*second)
R_s = (350.0, 350.0) joule/(R_s*meter^2*second)
P_wa = (567.937364287074, 567.937364287074) pascal/P_wa
T_a = (282.0, 298.0) kelvin/T_a
v_w = (1.0, 1.0) meter/(second*v_w)
g_sw = (0.045, 0.045) meter/(g_sw*second)
imported file temp/leaf_chamber_data
jupyter nbconvert  --to=python 'Tables_of_variables.ipynb'
Exporting specified worksheet to .py file...
nbconvert returned 0
Checking if specified ipynb file was run with sage kernel...
Renaming .py file to .sage if notebook kernel was sage (to avoid exponent error)
created file temp/Tables_of_variables
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
imported file temp/Tables_of_variables

In [ ]: