Closed serbinsh closed 3 years ago
Also when running via Rscript I get the following
Not sure if the plotting issues are a result of not finishing? But I suspect the intent is not looped line plotting?
Also working through leaf system models
10-4-25-253:leaf sserbin$ pwd
/Users/sserbin/Data/GitHub/MAAT/src/system_models/leaf
open -na Rstudio unit_testing.R
$oi
[1] 21.27825
$ca
[1] 30.3975
$cb
[1] 30.3975
$ci
[1] 23.65628
$cc
[1] 23.65628
$leaf_temp
[1] 25
$leafN_area
[1] 2
$fwdw_ratio
[1] 5
$J
[1] 112.1699
$Acg
[1] 17.4139
$Ajg
[1] 21.99895
$Apg
[1] 40.57308
$A
[1] 13.97193
$rd
[1] 1.05
$lim
[1] 2
$A_ana_rbzero
[1] 0
$A_ana_rbg0zero
[1] 0
$aguess
[1] 0 0 0 0
$faguess
[1] 0 0 0 0
$aguess_flag
[1] 0
$iter
[1] 0
$estimprec
[1] 0
$assim
[1] 0 0
$fA_ana_final
[1] 0 0
$A_noR
[1] 0
$transition
[1] 0
$d13c
[1] 0
oi ca cb ci cc leaf_temp leafN_area fwdw_ratio J Acg
21.278250 30.397500 30.397500 23.656279 23.656279 25.000000 2.000000 5.000000 112.169861 17.413897
Ajg Apg A rd lim A_ana_rbzero A_ana_rbg0zero aguess1 aguess2 aguess3
21.998954 40.573080 13.971927 1.050000 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000
aguess4 faguess1 faguess2 faguess3 faguess4 aguess_flag iter estimprec assim1 assim2
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
fA_ana_final1 fA_ana_final2 A_noR transition d13c vcmax vcmaxlt jmax jmaxlt tpu
0.000000 0.000000 0.000000 0.000000 0.000000 70.000000 70.000000 120.441091 120.441091 11.666667
tpult rd Kc Ko Km gstar tau gamma rb rs
11.666667 1.050000 40.490000 27.840000 71.436708 3.249404 0.000000 4.386756 0.000000 2.976087
ri alpha cica_chi
0.000000 0.385000 0.000000
> leaf_object$.test(verbose=F, cverbose=T )
[1]
[1] Configure: leaf , pars .
[1] df passed to configure:
leaf.diag leaf.d13c leaf.deltaA_prop leaf.solver_min leaf.solver_max leaf.a
0.000000e+00 0.000000e+00 1.500000e-01 -2.983400e-03 5.183644e+01 8.000000e-01
leaf.f leaf.ko_kc_ratio leaf.theta_j leaf.theta_col_cj leaf.theta_col_cjp leaf.avn_25
2.300000e-01 2.100000e-01 9.000000e-01 9.500000e-01 9.800000e-01 1.000000e+01
leaf.bvn_25 leaf.ajv_25 leaf.bjv_25 leaf.a_jvt_25 leaf.b_jvt_25 leaf.e_ajv_25
3.000000e+01 2.900000e+01 1.630000e+00 2.590000e+00 -3.500000e-02 1.010000e+00
leaf.e_bjv_25 leaf.atv_25 leaf.btv_25 leaf.flnr leaf.fnr leaf.Rsa
8.900000e-01 0.000000e+00 1.666667e-01 9.000000e-02 7.160000e+00 6.000000e+01
leaf.Apg_alpha leaf.g0 leaf.g1_medlyn leaf.g1_leuning leaf.d0 leaf.g1_ball
0.000000e+00 1.000000e-02 6.000000e+00 1.000000e+01 1.000000e+00 6.000000e+00
leaf.g_a1_yin leaf.g_b1_yin leaf.rs leaf.cica_chi leaf.rb leaf.can_ttc
8.500000e-01 1.400000e-01 6.666667e+00 7.000000e-01 1.000000e-01 1.000000e-02
leaf.leaf_width leaf.ri leaf.co2_diff leaf.hco_co2_ratio leaf.hco_co2_diff_ratio leaf.d13c_a
1.000000e-01 6.666667e+00 1.700000e-09 0.000000e+00 5.600000e-01 4.400000e+00
leaf.d13c_b leaf.d13c_b_prime leaf.d13c_am leaf.d13c_f leaf.a_rdv_25 leaf.b_rdv_25
2.700000e+01 3.000000e+01 1.800000e+00 1.200000e+01 0.000000e+00 1.500000e-02
leaf.a_rdn_25 leaf.b_rdn_25 leaf.rl_rd_ratio leaf.rl_rd_lloyd_a leaf.rl_rd_lloyd_b leaf.a_rdv_25_t
5.000000e-01 1.500000e-01 1.000000e+00 5.000000e-01 5.000000e-02 1.500000e-02
leaf.b_rdv_25_t leaf.reftemp.rd leaf.reftemp.vcmax leaf.reftemp.jmax leaf.reftemp.tpu leaf.reftemp.Kc
-5.000000e-04 2.500000e+01 2.500000e+01 2.500000e+01 2.500000e+01 2.500000e+01
leaf.reftemp.Ko leaf.reftemp.gstar leaf.reftemp.tau leaf.atref.rd leaf.atref.vcmax leaf.atref.jmax
2.500000e+01 2.500000e+01 2.500000e+01 2.000000e+00 5.000000e+01 1.000000e+02
leaf.atref.tpu leaf.atref.Kc leaf.atref.Ko leaf.atref.gstar leaf.atref.tau leaf.atref.vomax
5.000000e+00 4.049000e+01 2.784000e+01 4.325000e+00 2.600000e+03 0.000000e+00
leaf.Ha.rd leaf.Ha.vcmax leaf.Ha.jmax leaf.Ha.tpu leaf.Ha.Kc leaf.Ha.Ko
6.983000e+04 6.983000e+04 1.002800e+05 6.983000e+04 7.943000e+04 3.638000e+04
leaf.Ha.gstar leaf.Ha.tau leaf.Ha.vomax leaf.Hd.rd leaf.Hd.vcmax leaf.Hd.jmax
3.783000e+04 -4.157200e+04 6.011000e+04 2.000000e+05 2.000000e+05 2.000000e+05
leaf.Hd.tpu leaf.Topt.rd leaf.Topt.vcmax leaf.Topt.jmax leaf.Topt.tpu leaf.deltaS.rd
2.000000e+05 2.756000e+01 2.756000e+01 1.989000e+01 2.756000e+01 0.000000e+00
leaf.deltaS.vcmax leaf.deltaS.jmax leaf.deltaS.tpu leaf.a_deltaS_t.rd leaf.a_deltaS_t.vcmax leaf.a_deltaS_t.jmax
0.000000e+00 0.000000e+00 0.000000e+00 4.900000e+02 6.680000e+02 6.600000e+02
leaf.a_deltaS_t.tpu leaf.b_deltaS_t.rd leaf.b_deltaS_t.vcmax leaf.b_deltaS_t.jmax leaf.b_deltaS_t.tpu leaf.q10.rd
4.850000e+02 0.000000e+00 -1.070000e+00 -7.500000e-01 0.000000e+00 2.000000e+00
leaf.q10.vcmax leaf.q10.jmax leaf.q10.tpu leaf.q10.Kc leaf.q10.Ko leaf.q10.tau
2.000000e+00 2.000000e+00 2.000000e+00 2.000000e+00 2.000000e+00 5.700000e-01
leaf.a_q10_t.rd leaf.b_q10_t.rd leaf.tupp_cox.vcmax leaf.tupp_cox.rd leaf.tlow_cox.vcmax leaf.tlow_cox.rd
3.220000e+00 -4.600000e-02 3.600000e+01 4.500000e+01 0.000000e+00 5.000000e+00
leaf.exp_cox.vcmax leaf.exp_cox.rd leaf.gstar_bf_a leaf.gstar_bf_b leaf.gstar_bf_c leaf.R
3.000000e-01 4.000000e-01 1.200000e-02 1.680000e+00 4.270000e+01 8.314460e+00
[1] listnames:
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17]
[1,] leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf
[2,] diag d13c deltaA_prop solver_min solver_max a f ko_kc_ratio theta_j theta_col_cj theta_col_cjp avn_25 bvn_25 ajv_25 bjv_25 a_jvt_25 b_jvt_25
[3,]
[,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36]
[1,] leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf
[2,] e_ajv_25 e_bjv_25 atv_25 btv_25 flnr fnr Rsa Apg_alpha g0 g1_medlyn g1_leuning d0 g1_ball g_a1_yin g_b1_yin rs cica_chi rb can_ttc
[3,]
[,37] [,38] [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [,49] [,50] [,51]
[1,] leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf
[2,] leaf_width ri co2_diff hco_co2_ratio hco_co2_diff_ratio d13c_a d13c_b d13c_b_prime d13c_am d13c_f a_rdv_25 b_rdv_25 a_rdn_25 b_rdn_25 rl_rd_ratio
[3,]
[,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [,60] [,61] [,62] [,63] [,64] [,65] [,66] [,67] [,68] [,69]
[1,] leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf
[2,] rl_rd_lloyd_a rl_rd_lloyd_b a_rdv_25_t b_rdv_25_t reftemp reftemp reftemp reftemp reftemp reftemp reftemp reftemp atref atref atref atref atref atref
[3,] rd vcmax jmax tpu Kc Ko gstar tau rd vcmax jmax tpu Kc Ko
[,70] [,71] [,72] [,73] [,74] [,75] [,76] [,77] [,78] [,79] [,80] [,81] [,82] [,83] [,84] [,85] [,86] [,87] [,88] [,89] [,90] [,91] [,92] [,93]
[1,] leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf
[2,] atref atref atref Ha Ha Ha Ha Ha Ha Ha Ha Ha Hd Hd Hd Hd Topt Topt Topt Topt deltaS deltaS deltaS deltaS
[3,] gstar tau vomax rd vcmax jmax tpu Kc Ko gstar tau vomax rd vcmax jmax tpu rd vcmax jmax tpu rd vcmax jmax tpu
[,94] [,95] [,96] [,97] [,98] [,99] [,100] [,101] [,102] [,103] [,104] [,105] [,106] [,107] [,108] [,109] [,110]
[1,] leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf
[2,] a_deltaS_t a_deltaS_t a_deltaS_t a_deltaS_t b_deltaS_t b_deltaS_t b_deltaS_t b_deltaS_t q10 q10 q10 q10 q10 q10 q10 a_q10_t b_q10_t
[3,] rd vcmax jmax tpu rd vcmax jmax tpu rd vcmax jmax tpu Kc Ko tau rd rd
[,111] [,112] [,113] [,114] [,115] [,116] [,117] [,118] [,119] [,120]
[1,] leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf
[2,] tupp_cox tupp_cox tlow_cox tlow_cox exp_cox exp_cox gstar_bf_a gstar_bf_b gstar_bf_c R
[3,] vcmax rd vcmax rd vcmax rd
[1] subscripts for this model object: leaf
[1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
[39] 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
[77] 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
[115] 116 117 118 119 120
[1] subscripts for variables that are lists:
[1] 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
[39] 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
[1] subscripts for variables that are not lists:
[1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
[39] 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 117 118 119 120
[1] subscripts in: leaf pars for variables that are not lists:
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
[52] 52 53 54 69 70 71 72
[1] d13c deltaA_prop solver_min solver_max a f ko_kc_ratio theta_j
[9] theta_col_cj theta_col_cjp avn_25 bvn_25 ajv_25 bjv_25 a_jvt_25 b_jvt_25
[17] e_ajv_25 e_bjv_25 atv_25 btv_25 flnr fnr Rsa Apg_alpha
[25] g0 g1_medlyn g1_leuning d0 g1_ball g_a1_yin g_b1_yin rs
[33] cica_chi rb can_ttc leaf_width ri co2_diff hco_co2_ratio hco_co2_diff_ratio
[41] d13c_a d13c_b d13c_b_prime d13c_am d13c_f a_rdv_25 b_rdv_25 a_rdn_25
[49] b_rdn_25 rl_rd_ratio rl_rd_lloyd_a rl_rd_lloyd_b a_rdv_25_t b_rdv_25_t reftemp atref
[57] Ha Hd Topt deltaS a_deltaS_t b_deltaS_t q10 a_q10_t
[65] b_q10_t tupp_cox tlow_cox exp_cox gstar_bf_a gstar_bf_b gstar_bf_c R
[1]
[1] Configure: leaf , env .
[1] df passed to configure:
leaf.ca_conc leaf.o2_conc leaf.par leaf.water_l leaf.sphag_l leaf.temp leaf.vpd leaf.rh leaf.atm_press leaf.wind
400.00 0.21 1000.00 0.00 0.00 25.00 1.00 0.00 101325.00 1.00
[1] listnames:
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf
[2,] ca_conc o2_conc par water_l sphag_l temp vpd rh atm_press wind
[3,]
[1] subscripts for this model object: leaf
[1] 1 2 3 4 5 6 7 8 9 10
[1] subscripts for variables that are lists:
NULL
[1] subscripts for variables that are not lists:
[1] 1 2 3 4 5 6 7 8 9 10
[1] subscripts in: leaf env for variables that are not lists:
[1] 1 2 3 4 5 6 7 8 9 10
[1] ca_conc o2_conc par water_l sphag_l temp vpd rh atm_press wind
[1]
[1] Configure: leaf , fnames .
[1] df passed to configure:
leaf.sys leaf.solver leaf.residual_func leaf.semiana leaf.Acg
f_sys_enzymek f_solver_brent f_residual_func_leaf_Ar f_semiana_quad f_Acg_farquhar1980
leaf.Ajg leaf.Apg leaf.etrans leaf.gas_diff leaf.Alim
f_Ajg_generic f_Apg_vonc2000 f_etrans_harley1992 f_gas_diff_ficks_ci f_Alim_farquhar1980
leaf.vcmax leaf.jmax leaf.tcor_jmax leaf.tpu leaf.rd
f_vcmax_lin f_jmax_power f_scalar_none f_tpu_lin f_rd_lin_vcmax
leaf.rl_rd leaf.gstar leaf.ri leaf.rs leaf.rb
f_scalar_none f_gstar_f1980 f_r_zero f_rs_medlyn2011 f_rb_leafdim
leaf.cica_ratio leaf.d13c leaf.tcor_asc.vcmax leaf.tcor_asc.jmax leaf.tcor_asc.tpu
f_cica_ratio_constant f_d13c_classical f_tcor_asc_Arrhenius f_tcor_asc_Arrhenius f_tcor_asc_Arrhenius
leaf.tcor_asc.rd leaf.tcor_asc.gstar leaf.tcor_asc.tau leaf.tcor_asc.Kc leaf.tcor_asc.Ko
f_tcor_asc_Arrhenius f_tcor_asc_quadratic_bf1985 f_tcor_asc_Q10 f_tcor_asc_Arrhenius f_tcor_asc_Arrhenius
leaf.tcor_des.vcmax leaf.tcor_des.jmax leaf.tcor_des.tpu leaf.tcor_des.rd leaf.tcor_dep.tpu
f_tcor_des_modArrhenius f_tcor_des_modArrhenius f_tcor_des_modArrhenius f_scalar_none f_tcor_dep_independent
leaf.tcor_dep.rd leaf.tcor_dep.tau leaf.deltaS.rd leaf.deltaS.vcmax leaf.deltaS.jmax
f_tcor_dep_independent f_tcor_dep_independent f_deltaS f_deltaS f_deltaS
leaf.deltaS.tpu leaf.q10.rd leaf.q10.vcmax leaf.q10.jmax leaf.q10.tau
f_deltaS f_q10_constant f_q10_constant f_q10_constant f_q10_constant
leaf.q10.Kc leaf.q10.Ko
f_q10_constant f_q10_constant
[1] listnames:
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22]
[1,] leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf
[2,] sys solver residual_func semiana Acg Ajg Apg etrans gas_diff Alim vcmax jmax tcor_jmax tpu rd rl_rd gstar ri rs rb cica_ratio d13c
[3,]
[,23] [,24] [,25] [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [,38] [,39]
[1,] leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf leaf
[2,] tcor_asc tcor_asc tcor_asc tcor_asc tcor_asc tcor_asc tcor_asc tcor_asc tcor_des tcor_des tcor_des tcor_des tcor_dep tcor_dep tcor_dep deltaS deltaS
[3,] vcmax jmax tpu rd gstar tau Kc Ko vcmax jmax tpu rd tpu rd tau rd vcmax
[,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47]
[1,] leaf leaf leaf leaf leaf leaf leaf leaf
[2,] deltaS deltaS q10 q10 q10 q10 q10 q10
[3,] jmax tpu rd vcmax jmax tau Kc Ko
[1] subscripts for this model object: leaf
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
[1] subscripts for variables that are lists:
[1] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
[1] subscripts for variables that are not lists:
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
[1] subscripts in: leaf fnames for variables that are not lists:
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
[1] sys solver residual_func semiana Acg Ajg Apg etrans gas_diff Alim vcmax
[12] jmax tcor_jmax tpu rd rl_rd gstar ri rs rb cica_ratio d13c
[23] tcor_asc tcor_des tcor_dep deltaS q10
oi ca cb ci cc leaf_temp leafN_area fwdw_ratio J Acg
21.278250 30.397500 30.397500 23.656279 23.656279 25.000000 2.000000 5.000000 112.169861 17.413897
Ajg Apg A rd lim A_ana_rbzero A_ana_rbg0zero aguess1 aguess2 aguess3
21.998954 40.573080 13.971927 1.050000 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000
aguess4 faguess1 faguess2 faguess3 faguess4 aguess_flag iter estimprec assim1 assim2
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
fA_ana_final1 fA_ana_final2 A_noR transition d13c vcmax vcmaxlt jmax jmaxlt tpu
0.000000 0.000000 0.000000 0.000000 0.000000 70.000000 70.000000 120.441091 120.441091 11.666667
tpult rd Kc Ko Km gstar tau gamma rb rs
11.666667 1.050000 40.490000 27.840000 71.436708 3.249404 0.000000 4.386756 0.000000 2.976087
ri alpha cica_chi
0.000000 0.385000 0.000000
> leaf_object$fnames
$sys
[1] "f_sys_enzymek"
$solver
[1] "f_solver_brent"
$residual_func
[1] "f_residual_func_leaf_Ar"
$semiana
[1] "f_semiana_quad"
$Acg
[1] "f_Acg_farquhar1980"
$Ajg
[1] "f_Ajg_generic"
$Apg
[1] "f_Apg_vonc2000"
$etrans
[1] "f_etrans_harley1992"
$gas_diff
[1] "f_gas_diff_ficks_ci"
$Alim
[1] "f_Alim_farquhar1980"
$vcmax
[1] "f_vcmax_lin"
$jmax
[1] "f_jmax_power"
$tcor_jmax
[1] "f_scalar_none"
$tpu
[1] "f_tpu_lin"
$rd
[1] "f_rd_lin_vcmax"
$rl_rd
[1] "f_scalar_none"
$gstar
[1] "f_gstar_f1980"
$ri
[1] "f_r_zero"
$rs
[1] "f_rs_medlyn2011"
$rb
[1] "f_r_zero"
$cica_ratio
[1] "f_cica_ratio_constant"
$d13c
[1] "f_d13c_classical"
$tcor_asc
$tcor_asc$vcmax
[1] "f_tcor_asc_Arrhenius"
$tcor_asc$jmax
[1] "f_tcor_asc_Arrhenius"
$tcor_asc$tpu
[1] "f_tcor_asc_Arrhenius"
$tcor_asc$rd
[1] "f_tcor_asc_Arrhenius"
$tcor_asc$gstar
[1] "f_tcor_asc_quadratic_bf1985"
$tcor_asc$tau
[1] "f_tcor_asc_Q10"
$tcor_asc$Kc
[1] "f_tcor_asc_Arrhenius"
$tcor_asc$Ko
[1] "f_tcor_asc_Arrhenius"
$tcor_des
$tcor_des$vcmax
[1] "f_tcor_des_modArrhenius"
$tcor_des$jmax
[1] "f_tcor_des_modArrhenius"
$tcor_des$tpu
[1] "f_tcor_des_modArrhenius"
$tcor_des$rd
[1] "f_scalar_none"
$tcor_dep
$tcor_dep$tpu
[1] "f_tcor_dep_independent"
$tcor_dep$rd
[1] "f_tcor_dep_independent"
$tcor_dep$tau
[1] "f_tcor_dep_independent"
$deltaS
$deltaS$rd
[1] "f_deltaS"
$deltaS$vcmax
[1] "f_deltaS"
$deltaS$jmax
[1] "f_deltaS"
$deltaS$tpu
[1] "f_deltaS"
$q10
$q10$rd
[1] "f_q10_constant"
$q10$vcmax
[1] "f_q10_constant"
$q10$jmax
[1] "f_q10_constant"
$q10$tau
[1] "f_q10_constant"
$q10$Kc
[1] "f_q10_constant"
$q10$Ko
[1] "f_q10_constant"
> leaf_object$state
$oi
[1] 21.27825
$ca
[1] 30.3975
$cb
[1] 30.3975
$ci
[1] 23.65628
$cc
[1] 23.65628
$leaf_temp
[1] 25
$leafN_area
[1] 2
$fwdw_ratio
[1] 5
$J
[1] 112.1699
$Acg
[1] 17.4139
$Ajg
[1] 21.99895
$Apg
[1] 40.57308
$A
[1] 13.97193
$rd
[1] 1.05
$lim
[1] 2
$A_ana_rbzero
[1] 0
$A_ana_rbg0zero
[1] 0
$aguess
[1] 0 0 0 0
$faguess
[1] 0 0 0 0
$aguess_flag
[1] 0
$iter
[1] 0
$estimprec
[1] 0
$assim
[1] 0 0
$fA_ana_final
[1] 0 0
$A_noR
[1] 0
$transition
[1] 0
$d13c
[1] 0
> leaf_object$state_pars
$vcmax
[1] 70
$vcmaxlt
[1] 70
$jmax
[1] 120.4411
$jmaxlt
[1] 120.4411
$tpu
[1] 11.66667
$tpult
[1] 11.66667
$rd
[1] 1.05
$Kc
[1] 40.49
$Ko
[1] 27.84
$Km
[1] 71.43671
$gstar
[1] 3.249404
$tau
[1] 0
$gamma
[1] 4.386756
$rb
[1] 0
$rs
[1] 2.976087
$ri
[1] 0
$alpha
[1] 0.385
$cica_chi
[1] 0
> leaf_object$pars
$d13c
[1] 0
$deltaA_prop
[1] 0.15
$solver_min
[1] -0.0029834
$solver_max
[1] 51.83644
$a
[1] 0.8
$f
[1] 0.23
$ko_kc_ratio
[1] 0.21
$theta_j
[1] 0.9
$theta_col_cj
[1] 0.95
$theta_col_cjp
[1] 0.98
$avn_25
[1] 10
$bvn_25
[1] 30
$ajv_25
[1] 29
$bjv_25
[1] 1.63
$a_jvt_25
[1] 2.59
$b_jvt_25
[1] -0.035
$e_ajv_25
[1] 1.01
$e_bjv_25
[1] 0.89
$atv_25
[1] 0
$btv_25
[1] 0.1666667
$flnr
[1] 0.09
$fnr
[1] 7.16
$Rsa
[1] 60
$Apg_alpha
[1] 0
$g0
[1] 0.01
$g1_medlyn
[1] 6
$g1_leuning
[1] 10
$d0
[1] 1
$g1_ball
[1] 6
$g_a1_yin
[1] 0.85
$g_b1_yin
[1] 0.14
$rs
[1] 6.666667
$cica_chi
[1] 0.7
$rb
[1] 0.1
$can_ttc
[1] 0.01
$leaf_width
[1] 0.1
$ri
[1] 6.666667
$co2_diff
[1] 1.7e-09
$hco_co2_ratio
[1] 0
$hco_co2_diff_ratio
[1] 0.56
$d13c_a
[1] 4.4
$d13c_b
[1] 27
$d13c_b_prime
[1] 30
$d13c_am
[1] 1.8
$d13c_f
[1] 12
$a_rdv_25
[1] 0
$b_rdv_25
[1] 0.015
$a_rdn_25
[1] 0.5
$b_rdn_25
[1] 0.15
$rl_rd_ratio
[1] 1
$rl_rd_lloyd_a
[1] 0.5
$rl_rd_lloyd_b
[1] 0.05
$a_rdv_25_t
[1] 0.015
$b_rdv_25_t
[1] -5e-04
$reftemp
$reftemp$rd
[1] 25
$reftemp$vcmax
[1] 25
$reftemp$jmax
[1] 25
$reftemp$tpu
[1] 25
$reftemp$Kc
[1] 25
$reftemp$Ko
[1] 25
$reftemp$gstar
[1] 25
$reftemp$tau
[1] 25
$atref
$atref$rd
[1] 2
$atref$vcmax
[1] 50
$atref$jmax
[1] 100
$atref$tpu
[1] 5
$atref$Kc
[1] 40.49
$atref$Ko
[1] 27.84
$atref$gstar
[1] 4.325
$atref$tau
[1] 2600
$atref$vomax
[1] 0
$Ha
$Ha$rd
[1] 69830
$Ha$vcmax
[1] 69830
$Ha$jmax
[1] 100280
$Ha$tpu
[1] 69830
$Ha$Kc
[1] 79430
$Ha$Ko
[1] 36380
$Ha$gstar
[1] 37830
$Ha$tau
[1] -41572
$Ha$vomax
[1] 60110
$Hd
$Hd$rd
[1] 2e+05
$Hd$vcmax
[1] 2e+05
$Hd$jmax
[1] 2e+05
$Hd$tpu
[1] 2e+05
$Topt
$Topt$rd
[1] 27.56
$Topt$vcmax
[1] 27.56
$Topt$jmax
[1] 19.89
$Topt$tpu
[1] 27.56
$deltaS
$deltaS$rd
[1] 0
$deltaS$vcmax
[1] 0
$deltaS$jmax
[1] 0
$deltaS$tpu
[1] 0
$a_deltaS_t
$a_deltaS_t$rd
[1] 490
$a_deltaS_t$vcmax
[1] 668
$a_deltaS_t$jmax
[1] 660
$a_deltaS_t$tpu
[1] 485
$b_deltaS_t
$b_deltaS_t$rd
[1] 0
$b_deltaS_t$vcmax
[1] -1.07
$b_deltaS_t$jmax
[1] -0.75
$b_deltaS_t$tpu
[1] 0
$q10
$q10$rd
[1] 2
$q10$vcmax
[1] 2
$q10$jmax
[1] 2
$q10$tpu
[1] 2
$q10$Kc
[1] 2
$q10$Ko
[1] 2
$q10$tau
[1] 0.57
$a_q10_t
$a_q10_t$rd
[1] 3.22
$b_q10_t
$b_q10_t$rd
[1] -0.046
$tupp_cox
$tupp_cox$vcmax
[1] 36
$tupp_cox$rd
[1] 45
$tlow_cox
$tlow_cox$vcmax
[1] 0
$tlow_cox$rd
[1] 5
$exp_cox
$exp_cox$vcmax
[1] 0.3
$exp_cox$rd
[1] 0.4
$gstar_bf_a
[1] 0.012
$gstar_bf_b
[1] 1.68
$gstar_bf_c
[1] 42.7
$R
[1] 8.31446
> leaf_object$env
$ca_conc
[1] 300
$o2_conc
[1] 0.21
$par
[1] 1000
$water_l
[1] 0
$sphag_l
[1] 0
$temp
[1] 25
$vpd
[1] 1
$rh
[1] 0.6843213
$atm_press
[1] 101325
$wind
[1] 1
> leaf_object$.test(verbose=F, leaf.par=1000, leaf.ca_conc=1100 )
oi ca cb ci cc leaf_temp leafN_area fwdw_ratio J Acg
21.278250 111.457500 111.457500 87.541841 87.541841 25.000000 2.000000 5.000000 112.169861 38.545634
Ajg Apg A rd lim A_ana_rbzero A_ana_rbg0zero aguess1 aguess2 aguess3
26.104552 36.349221 24.085597 1.050000 3.000000 0.000000 0.000000 0.000000 0.000000 0.000000
aguess4 faguess1 faguess2 faguess3 faguess4 aguess_flag iter estimprec assim1 assim2
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
fA_ana_final1 fA_ana_final2 A_noR transition d13c vcmax vcmaxlt jmax jmaxlt tpu
0.000000 0.000000 0.000000 0.000000 0.000000 70.000000 70.000000 120.441091 120.441091 11.666667
tpult rd Kc Ko Km gstar tau gamma rb rs
11.666667 1.050000 40.490000 27.840000 71.436708 3.249404 0.000000 4.386756 0.000000 6.124750
ri alpha cica_chi
0.000000 0.385000 0.000000
> leaf_object$.test(verbose=F, leaf.par=1000, leaf.ca_conc=1 )
oi ca cb ci cc leaf_temp leafN_area fwdw_ratio J Acg
21.2782500 0.1013250 0.1013250 4.1154459 4.1154459 25.0000000 2.0000000 5.0000000 112.1698607 3.8130112
Ajg Apg A rd lim A_ana_rbzero A_ana_rbg0zero aguess1 aguess2 aguess3
10.8728548 166.3206607 -0.2476018 1.0500000 3.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
aguess4 faguess1 faguess2 faguess3 faguess4 aguess_flag iter estimprec assim1 assim2
0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
fA_ana_final1 fA_ana_final2 A_noR transition d13c vcmax vcmaxlt jmax jmaxlt tpu
0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 70.0000000 70.0000000 120.4410914 120.4410914 11.6666667
tpult rd Kc Ko Km gstar tau gamma rb rs
11.6666667 1.0500000 40.4900000 27.8400000 71.4367077 3.2494043 0.0000000 4.3867563 0.0000000 100.0000000
ri alpha cica_chi
0.0000000 0.3850000 0.0000000
> source('leaf_object.R')
> leaf_object$.test_aci(leaf.ca_conc=seq(0.1,2000,50), verbose=F )
Error in 1:.$dataf$lm : argument of length 0
9.
vapply(1:.$dataf$lm, .$run_met1, .$dataf$mout)
8.
t(vapply(1:.$dataf$lm, .$run_met1, .$dataf$mout)) at generic_model_functions.R#114
7.
res(x, ...)
6.
FUN(X[[i]], ...)
5.
lapply(1:length(.$dataf$met[, 1]), .$run_met)
4.
do.call(rbind, lapply(1:length(.$dataf$met[, 1]), .$run_met))
3.
data.frame(do.call(rbind, lapply(1:length(.$dataf$met[, 1]),
.$run_met))) at leaf_object.R#545
2.
res(x, ...)
1.
leaf_object$.test_aci(leaf.ca_conc = seq(0.1, 2000, 50), verbose = F)
Failing at "leaf_object$.test_aci(leaf.ca_conc=seq(0.1,2000,50), verbose=F )"
Is this on master? We've been bug-fixing that error and others, though I thought they were on a different branch. We're actively pursuing those bugfixes and it's gotten a bit messy. Might be worth holding off until the bugs are fixed and I have a chance to merge everything into master.
I believe this was on master but I will hold off for now until you have a chance to try and finish the bug squashing. Its not really impacting me at the moment, it was more that I was trying to get another user up to speed and notice the crash
Sorry this is taking longer than expected. I'll deal with it asap.
Hi @serbinsh apologies for the delay. I hope it didn't hold you up, and if my slow responses do in the future please feel free to hassle me.
This issue should be resolved with the latest commit on master. Please let me know if not, otherwise please mark as resolved. Thanks!
Running via Rscript
and via R studio
Session info