Skip to content

Instantly share code, notes, and snippets.

@ashiklom
Last active January 22, 2019 23:08
Show Gist options
  • Save ashiklom/0f61227a124531bca67d88128480d46d to your computer and use it in GitHub Desktop.
Save ashiklom/0f61227a124531bca67d88128480d46d to your computer and use it in GitHub Desktop.
Example ED parameter file
<?xml version="1.0"?>
<!DOCTYPE config SYSTEM "ed.dtd">
<config>
<pft>
<num>9</num>
<is_tropical>0</is_tropical>
<is_grass>0</is_grass>
<include_pft>1</include_pft>
<include_pft_ag>0</include_pft_ag>
<include_pft_fp>0</include_pft_fp>
<clumping_factor>0.49005471555906</clumping_factor>
<orient_factor>0.383276485806502</orient_factor>
<leaf_emiss_tir>0.95</leaf_emiss_tir>
<wood_emiss_tir>0.9</wood_emiss_tir>
<leaf_reflect_vis>0.0495858356687449</leaf_reflect_vis>
<leaf_reflect_nir>0.511748425747306</leaf_reflect_nir>
<wood_reflect_vis>0.11</wood_reflect_vis>
<wood_reflect_nir>0.11</wood_reflect_nir>
<leaf_trans_vis>0.00587062988425939</leaf_trans_vis>
<leaf_trans_nir>0.338947615264381</leaf_trans_nir>
<wood_trans_vis>0.11</wood_trans_vis>
<wood_trans_nir>0.11</wood_trans_nir>
<leaf_backscatter_vis>0</leaf_backscatter_vis>
<leaf_backscatter_nir>0</leaf_backscatter_nir>
<leaf_backscatter_tir>0.625</leaf_backscatter_tir>
<wood_backscatter_vis>0</wood_backscatter_vis>
<wood_backscatter_nir>0</wood_backscatter_nir>
<wood_backscatter_tir>0.625</wood_backscatter_tir>
<leaf_scatter_vis>0</leaf_scatter_vis>
<leaf_scatter_nir>0</leaf_scatter_nir>
<wood_scatter_vis>0</wood_scatter_vis>
<wood_scatter_nir>0</wood_scatter_nir>
<phi1>0</phi1>
<phi2>0</phi2>
<mu_bar>0</mu_bar>
<photosyn_pathway>3</photosyn_pathway>
<quantum_efficiency>0.0729306276298229</quantum_efficiency>
<Vm0>31.0218952561216</Vm0>
<Vm_low_temp>4.7136998177</Vm_low_temp>
<Vm_high_temp>45</Vm_high_temp>
<Vm_decay_e>0.400000006</Vm_decay_e>
<Vm_decay_a>220000</Vm_decay_a>
<Vm_decay_b>690</Vm_decay_b>
<vm_hor>3000</vm_hor>
<vm_q10>2.4000000954</vm_q10>
<dark_respiration_factor>0.0144999996</dark_respiration_factor>
<Rd_low_temp>4.7136998177</Rd_low_temp>
<Rd_high_temp>45</Rd_high_temp>
<Rd_decay_e>0.400000006</Rd_decay_e>
<Rd_hor>3000</Rd_hor>
<Rd_q10>2.4000000954</Rd_q10>
<Rd0>0.2956125736</Rd0>
<D0>0.0160000008</D0>
<stomatal_slope>4.4081818275489</stomatal_slope>
<cuticular_cond>14211.0105751027</cuticular_cond>
<water_conductance>1.90132e-05</water_conductance>
<leaf_width>0.1000000015</leaf_width>
<growth_resp_factor>0.423967765694678</growth_resp_factor>
<leaf_turnover_rate>0</leaf_turnover_rate>
<root_turnover_rate>5.772506237</root_turnover_rate>
<storage_turnover_rate>0</storage_turnover_rate>
<f_labile>0.7900000215</f_labile>
<root_respiration_factor>0.2800000012</root_respiration_factor>
<rrf_low_temp>4.7136998177</rrf_low_temp>
<rrf_high_temp>45</rrf_high_temp>
<rrf_decay_e>0.400000006</rrf_decay_e>
<rrf_hor>3000</rrf_hor>
<rrf_q10>2.4000000954</rrf_q10>
<frost_mort>3</frost_mort>
<mort0>0</mort0>
<mort1>1</mort1>
<mort2>20</mort2>
<mort3>0.0061440002</mort3>
<cbr_severe_stress>-0.7971192598</cbr_severe_stress>
<seedling_mortality>0.9499999881</seedling_mortality>
<treefall_s_gt>0</treefall_s_gt>
<treefall_s_lt>0.1000000015</treefall_s_lt>
<fire_s_gt>0</fire_s_gt>
<fire_s_lt>0</fire_s_lt>
<plant_min_temp>193.1499938965</plant_min_temp>
<rho>0</rho>
<SLA>24.0612845844399</SLA>
<horiz_branch>0.5699999928</horiz_branch>
<q>0.51406352760996</q>
<sapwood_ratio>3900</sapwood_ratio>
<qsw>0.0076923077</qsw>
<init_density>0.1000000015</init_density>
<b1Ht>22.6798992157</b1Ht>
<b2Ht>-0.0653399974</b2Ht>
<hgt_ref>1.2999999523</hgt_ref>
<hgt_min>1.5</hgt_min>
<hgt_max>22.6572189331</hgt_max>
<min_dbh>0.1355601549</min_dbh>
<dbh_crit>43.4928016663</dbh_crit>
<dbh_adult>10</dbh_adult>
<dbh_bigleaf>14.4976005554</dbh_bigleaf>
<b1Bl_small>0.0129000004</b1Bl_small>
<b1Bl_large>0.0129000004</b1Bl_large>
<b2Bl_small>1.747699976</b2Bl_small>
<b2Bl_large>1.747699976</b2Bl_large>
<bleaf_adult>0.3607943356</bleaf_adult>
<b1Bs_small>0.0264800005</b1Bs_small>
<b1Bs_large>0.0264800005</b1Bs_large>
<b2Bs_small>2.9595398903</b2Bs_small>
<b2Bs_large>2.9595398903</b2Bs_large>
<min_bdead>3.57601e-05</min_bdead>
<bdead_crit>935.0818481445</bdead_crit>
<b1Ca>2.4901540279</b1Ca>
<b2Ca>0.8068805933</b2Ca>
<b1WAI>0.0096000005</b1WAI>
<b2WAI>2.094700098</b2WAI>
<brf_wd>0.1599999964</brf_wd>
<agf_bs>0.6999999881</agf_bs>
<b1Vol>0.0247086249</b1Vol>
<b2Vol>2</b2Vol>
<b1Rd>-1.1140580177</b1Rd>
<b2Rd>0.4223014116</b2Rd>
<c2n_leaf>13.4641094208</c2n_leaf>
<c2n_recruit>17.8949623108</c2n_recruit>
<phenology>2</phenology>
<c_grn_leaf_dry>3218</c_grn_leaf_dry>
<wat_dry_ratio_grn>2.5</wat_dry_ratio_grn>
<wat_dry_ratio_ngrn>0.6999999881</wat_dry_ratio_ngrn>
<c_ngrn_biom_dry>1217.3759765625</c_ngrn_biom_dry>
<delta_c>-225.1618652344</delta_c>
<b1Cl>0.3106774986</b1Cl>
<b2Cl>1.0980000496</b2Cl>
<r_fract>0.3000000119</r_fract>
<st_fract>0</st_fract>
<nonlocal_dispersal>1</nonlocal_dispersal>
<repro_min_h>18</repro_min_h>
<one_plant_c>0.0004555048</one_plant_c>
<min_recruit_size>4.555e-06</min_recruit_size>
<min_cohort_size>4.555e-07</min_cohort_size>
<seed_rain>0.0100000007</seed_rain>
<negligible_nplant>1e-08</negligible_nplant>
<veg_hcap_min>0.0895049497</veg_hcap_min>
<prospect_N>2.26894281022444</prospect_N>
<prospect_Cab>97.79708021356</prospect_Cab>
<prospect_Car>6.91693840830206</prospect_Car>
<prospect_Cw>0.0707722431126997</prospect_Cw>
<prospect_Cm>0.00122955397540594</prospect_Cm>
<b1Bl>0.0463957230480866</b1Bl>
<b2Bl>9.48493048617484</b2Bl>
<fineroot2leaf>0.51406352760996</fineroot2leaf>
<Vcmax>31.0218952561216</Vcmax>
</pft>
<pft>
<num>10</num>
<is_tropical>0</is_tropical>
<is_grass>0</is_grass>
<include_pft>1</include_pft>
<include_pft_ag>0</include_pft_ag>
<include_pft_fp>0</include_pft_fp>
<clumping_factor>0.563660553062649</clumping_factor>
<orient_factor>-0.20421010102538</orient_factor>
<leaf_emiss_tir>0.95</leaf_emiss_tir>
<wood_emiss_tir>0.9</wood_emiss_tir>
<leaf_reflect_vis>0.0365846013602876</leaf_reflect_vis>
<leaf_reflect_nir>0.279604583134223</leaf_reflect_nir>
<wood_reflect_vis>0.11</wood_reflect_vis>
<wood_reflect_nir>0.11</wood_reflect_nir>
<leaf_trans_vis>0.0125183383497022</leaf_trans_vis>
<leaf_trans_nir>0.549969271329349</leaf_trans_nir>
<wood_trans_vis>0.11</wood_trans_vis>
<wood_trans_nir>0.11</wood_trans_nir>
<leaf_backscatter_vis>0</leaf_backscatter_vis>
<leaf_backscatter_nir>0</leaf_backscatter_nir>
<leaf_backscatter_tir>0.625</leaf_backscatter_tir>
<wood_backscatter_vis>0</wood_backscatter_vis>
<wood_backscatter_nir>0</wood_backscatter_nir>
<wood_backscatter_tir>0.625</wood_backscatter_tir>
<leaf_scatter_vis>0</leaf_scatter_vis>
<leaf_scatter_nir>0</leaf_scatter_nir>
<wood_scatter_vis>0</wood_scatter_vis>
<wood_scatter_nir>0</wood_scatter_nir>
<phi1>0</phi1>
<phi2>0</phi2>
<mu_bar>0</mu_bar>
<photosyn_pathway>3</photosyn_pathway>
<quantum_efficiency>0.0405542201446483</quantum_efficiency>
<Vm0>28.3189433950885</Vm0>
<Vm_low_temp>4.7136998177</Vm_low_temp>
<Vm_high_temp>45</Vm_high_temp>
<Vm_decay_e>0.400000006</Vm_decay_e>
<Vm_decay_a>220000</Vm_decay_a>
<Vm_decay_b>690</Vm_decay_b>
<vm_hor>3000</vm_hor>
<vm_q10>2.4000000954</vm_q10>
<dark_respiration_factor>0.0144999996</dark_respiration_factor>
<Rd_low_temp>4.7136998177</Rd_low_temp>
<Rd_high_temp>45</Rd_high_temp>
<Rd_decay_e>0.400000006</Rd_decay_e>
<Rd_hor>3000</Rd_hor>
<Rd_q10>2.4000000954</Rd_q10>
<Rd0>0.2530929446</Rd0>
<D0>0.0160000008</D0>
<stomatal_slope>2.31739053371518</stomatal_slope>
<cuticular_cond>10102.7842347423</cuticular_cond>
<water_conductance>1.90132e-05</water_conductance>
<leaf_width>0.1000000015</leaf_width>
<growth_resp_factor>0.347725577973498</growth_resp_factor>
<leaf_turnover_rate>0</leaf_turnover_rate>
<root_turnover_rate>5.0837001801</root_turnover_rate>
<storage_turnover_rate>0</storage_turnover_rate>
<f_labile>0.7900000215</f_labile>
<root_respiration_factor>0.2800000012</root_respiration_factor>
<rrf_low_temp>4.7136998177</rrf_low_temp>
<rrf_high_temp>45</rrf_high_temp>
<rrf_decay_e>0.400000006</rrf_decay_e>
<rrf_hor>3000</rrf_hor>
<rrf_q10>2.4000000954</rrf_q10>
<frost_mort>3</frost_mort>
<mort0>0</mort0>
<mort1>1</mort1>
<mort2>20</mort2>
<mort3>0.0038079999</mort3>
<cbr_severe_stress>-0.7971192598</cbr_severe_stress>
<seedling_mortality>0.9499999881</seedling_mortality>
<treefall_s_gt>0</treefall_s_gt>
<treefall_s_lt>0.1000000015</treefall_s_lt>
<fire_s_gt>0</fire_s_gt>
<fire_s_lt>0</fire_s_lt>
<plant_min_temp>253.1499938965</plant_min_temp>
<rho>0</rho>
<SLA>53.9965799703606</SLA>
<horiz_branch>0.3899999857</horiz_branch>
<q>0.683408811041541</q>
<sapwood_ratio>3900</sapwood_ratio>
<qsw>0.0062051285</qsw>
<init_density>0.1000000015</init_density>
<b1Ht>25.1800003052</b1Ht>
<b2Ht>-0.0496399999</b2Ht>
<hgt_ref>1.2999999523</hgt_ref>
<hgt_min>1.5</hgt_min>
<hgt_max>25.1548213959</hgt_max>
<min_dbh>0.160646826</min_dbh>
<dbh_crit>59.3171386719</dbh_crit>
<dbh_adult>10</dbh_adult>
<dbh_bigleaf>19.7723808289</dbh_bigleaf>
<b1Bl_small>0.0480000004</b1Bl_small>
<b1Bl_large>0.0480000004</b1Bl_large>
<b2Bl_small>1.4550000429</b2Bl_small>
<b2Bl_large>1.4550000429</b2Bl_large>
<bleaf_adult>0.6842444539</bleaf_adult>
<b1Bs_small>0.1616999954</b1Bs_small>
<b1Bs_large>0.1616999954</b1Bs_large>
<b2Bs_small>2.4572000504</b2Bs_small>
<b2Bs_large>2.4572000504</b2Bs_large>
<min_bdead>0.000904376</min_bdead>
<bdead_crit>1839.6638183594</bdead_crit>
<b1Ca>2.4901540279</b1Ca>
<b2Ca>0.8068805933</b2Ca>
<b1WAI>0.0096000005</b1WAI>
<b2WAI>2.094700098</b2WAI>
<brf_wd>0.1599999964</brf_wd>
<agf_bs>0.6999999881</agf_bs>
<b1Vol>0.0247086249</b1Vol>
<b2Vol>2</b2Vol>
<b1Rd>-1.1140580177</b1Rd>
<b2Rd>0.4223014116</b2Rd>
<c2n_leaf>19.3469314575</c2n_leaf>
<c2n_recruit>28.5154895782</c2n_recruit>
<phenology>2</phenology>
<c_grn_leaf_dry>3218</c_grn_leaf_dry>
<wat_dry_ratio_grn>2.5</wat_dry_ratio_grn>
<wat_dry_ratio_ngrn>0.6999999881</wat_dry_ratio_ngrn>
<c_ngrn_biom_dry>1217.3759765625</c_ngrn_biom_dry>
<delta_c>-225.1618652344</delta_c>
<b1Cl>0.3106774986</b1Cl>
<b2Cl>1.0980000496</b2Cl>
<r_fract>0.3000000119</r_fract>
<st_fract>0</st_fract>
<nonlocal_dispersal>0.3249999881</nonlocal_dispersal>
<repro_min_h>18</repro_min_h>
<one_plant_c>0.0044894684</one_plant_c>
<min_recruit_size>4.48947e-05</min_recruit_size>
<min_cohort_size>4.4895e-06</min_cohort_size>
<seed_rain>0.0100000007</seed_rain>
<negligible_nplant>1e-08</negligible_nplant>
<veg_hcap_min>0.7652710676</veg_hcap_min>
<prospect_N>0.899798137409343</prospect_N>
<prospect_Cab>126.600690832846</prospect_Cab>
<prospect_Car>7.99841322980683</prospect_Car>
<prospect_Cw>0.0439969596124788</prospect_Cw>
<prospect_Cm>0.00814596326000451</prospect_Cm>
<b1Bl>0.72954056278644</b1Bl>
<b2Bl>32.9350751397138</b2Bl>
<fineroot2leaf>0.683408811041541</fineroot2leaf>
<Vcmax>28.3189433950885</Vcmax>
</pft>
<pft>
<num>11</num>
<is_tropical>0</is_tropical>
<is_grass>0</is_grass>
<include_pft>1</include_pft>
<include_pft_ag>0</include_pft_ag>
<include_pft_fp>0</include_pft_fp>
<clumping_factor>0.993658263533858</clumping_factor>
<orient_factor>0.585324145298493</orient_factor>
<leaf_emiss_tir>0.95</leaf_emiss_tir>
<wood_emiss_tir>0.9</wood_emiss_tir>
<leaf_reflect_vis>0.0562970108234894</leaf_reflect_vis>
<leaf_reflect_nir>0.463762744712652</leaf_reflect_nir>
<wood_reflect_vis>0.11</wood_reflect_vis>
<wood_reflect_nir>0.11</wood_reflect_nir>
<leaf_trans_vis>0.020682907279462</leaf_trans_vis>
<leaf_trans_nir>0.396930005799724</leaf_trans_nir>
<wood_trans_vis>0.11</wood_trans_vis>
<wood_trans_nir>0.11</wood_trans_nir>
<leaf_backscatter_vis>0</leaf_backscatter_vis>
<leaf_backscatter_nir>0</leaf_backscatter_nir>
<leaf_backscatter_tir>0.625</leaf_backscatter_tir>
<wood_backscatter_vis>0</wood_backscatter_vis>
<wood_backscatter_nir>0</wood_backscatter_nir>
<wood_backscatter_tir>0.625</wood_backscatter_tir>
<leaf_scatter_vis>0</leaf_scatter_vis>
<leaf_scatter_nir>0</leaf_scatter_nir>
<wood_scatter_vis>0</wood_scatter_vis>
<wood_scatter_nir>0</wood_scatter_nir>
<phi1>0</phi1>
<phi2>0</phi2>
<mu_bar>0</mu_bar>
<photosyn_pathway>3</photosyn_pathway>
<quantum_efficiency>0.0834741671613003</quantum_efficiency>
<Vm0>16.3014449405717</Vm0>
<Vm_low_temp>4.7136998177</Vm_low_temp>
<Vm_high_temp>45</Vm_high_temp>
<Vm_decay_e>0.400000006</Vm_decay_e>
<Vm_decay_a>220000</Vm_decay_a>
<Vm_decay_b>690</Vm_decay_b>
<vm_hor>3000</vm_hor>
<vm_q10>2.4000000954</vm_q10>
<dark_respiration_factor>0.0144999996</dark_respiration_factor>
<Rd_low_temp>4.7136998177</Rd_low_temp>
<Rd_high_temp>45</Rd_high_temp>
<Rd_decay_e>0.400000006</Rd_decay_e>
<Rd_hor>3000</Rd_hor>
<Rd_q10>2.4000000954</Rd_q10>
<Rd0>0.1012371853</Rd0>
<D0>0.0160000008</D0>
<stomatal_slope>2.31739053371518</stomatal_slope>
<cuticular_cond>14211.0105751027</cuticular_cond>
<water_conductance>1.90132e-05</water_conductance>
<leaf_width>0.1000000015</leaf_width>
<growth_resp_factor>0.423967765694678</growth_resp_factor>
<leaf_turnover_rate>0</leaf_turnover_rate>
<root_turnover_rate>5.070991993</root_turnover_rate>
<storage_turnover_rate>0</storage_turnover_rate>
<f_labile>0.7900000215</f_labile>
<root_respiration_factor>0.2800000012</root_respiration_factor>
<rrf_low_temp>4.7136998177</rrf_low_temp>
<rrf_high_temp>45</rrf_high_temp>
<rrf_decay_e>0.400000006</rrf_decay_e>
<rrf_hor>3000</rrf_hor>
<rrf_q10>2.4000000954</rrf_q10>
<frost_mort>3</frost_mort>
<mort0>0</mort0>
<mort1>1</mort1>
<mort2>20</mort2>
<mort3>0.00428</mort3>
<cbr_severe_stress>-0.7971192598</cbr_severe_stress>
<seedling_mortality>0.9499999881</seedling_mortality>
<treefall_s_gt>0</treefall_s_gt>
<treefall_s_lt>0.1000000015</treefall_s_lt>
<fire_s_gt>0</fire_s_gt>
<fire_s_lt>0</fire_s_lt>
<plant_min_temp>253.1499938965</plant_min_temp>
<rho>0</rho>
<SLA>56.9132019717376</SLA>
<horiz_branch>0.6100000143</horiz_branch>
<q>0.703173787726156</q>
<sapwood_ratio>3900</sapwood_ratio>
<qsw>0.0153846154</qsw>
<init_density>0.1000000015</init_density>
<b1Ht>23.3873996735</b1Ht>
<b2Ht>-0.0540399998</b2Ht>
<hgt_ref>1.2999999523</hgt_ref>
<hgt_min>1.5</hgt_min>
<hgt_max>23.3640117645</hgt_max>
<min_dbh>0.1589262187</min_dbh>
<dbh_crit>53.145866394</dbh_crit>
<dbh_adult>10</dbh_adult>
<dbh_bigleaf>17.7152900696</dbh_bigleaf>
<b1Bl_small>0.0170000009</b1Bl_small>
<b1Bl_large>0.0170000009</b1Bl_large>
<b2Bl_small>1.7309999466</b2Bl_small>
<b2Bl_large>1.7309999466</b2Bl_large>
<bleaf_adult>0.4575293064</bleaf_adult>
<b1Bs_small>0.2349999994</b1Bs_small>
<b1Bs_large>0.2349999994</b1Bs_large>
<b2Bs_small>2.2518000603</b2Bs_small>
<b2Bs_large>2.2518000603</b2Bs_large>
<min_bdead>0.0018676263</min_bdead>
<bdead_crit>902.5061645508</bdead_crit>
<b1Ca>2.4901540279</b1Ca>
<b2Ca>0.8068805933</b2Ca>
<b1WAI>0.0096000005</b1WAI>
<b2WAI>2.094700098</b2WAI>
<brf_wd>0.1599999964</brf_wd>
<agf_bs>0.6999999881</agf_bs>
<b1Vol>0.0247086249</b1Vol>
<b2Vol>2</b2Vol>
<b1Rd>-1.1140580177</b1Rd>
<b2Rd>0.4223014116</b2Rd>
<c2n_leaf>18.0751247406</c2n_leaf>
<c2n_recruit>56.3194046021</c2n_recruit>
<phenology>2</phenology>
<c_grn_leaf_dry>3218</c_grn_leaf_dry>
<wat_dry_ratio_grn>2.5</wat_dry_ratio_grn>
<wat_dry_ratio_ngrn>0.6999999881</wat_dry_ratio_ngrn>
<c_ngrn_biom_dry>1217.3759765625</c_ngrn_biom_dry>
<delta_c>-225.1618652344</delta_c>
<b1Cl>0.3106774986</b1Cl>
<b2Cl>1.0980000496</b2Cl>
<r_fract>0.3000000119</r_fract>
<st_fract>0</st_fract>
<nonlocal_dispersal>0.074000001</nonlocal_dispersal>
<repro_min_h>18</repro_min_h>
<one_plant_c>0.0026248484</one_plant_c>
<min_recruit_size>2.62485e-05</min_recruit_size>
<min_cohort_size>2.6248e-06</min_cohort_size>
<seed_rain>0.0100000007</seed_rain>
<negligible_nplant>1e-08</negligible_nplant>
<veg_hcap_min>0.1606011242</veg_hcap_min>
<prospect_N>1.8153384657385</prospect_N>
<prospect_Cab>59.5788603055259</prospect_Cab>
<prospect_Car>7.80202356659722</prospect_Car>
<prospect_Cw>0.0507235866957247</prospect_Cw>
<prospect_Cm>0.00403044901431989</prospect_Cm>
<b1Bl>1.04982410562986</b1Bl>
<b2Bl>5.10794482851479</b2Bl>
<fineroot2leaf>0.703173787726156</fineroot2leaf>
<Vcmax>16.3014449405717</Vcmax>
</pft>
<pft>
<num>6</num>
<is_tropical>0</is_tropical>
<is_grass>0</is_grass>
<include_pft>1</include_pft>
<include_pft_ag>0</include_pft_ag>
<include_pft_fp>1</include_pft_fp>
<clumping_factor>0.58281709567428</clumping_factor>
<orient_factor>-0.910528600868446</orient_factor>
<leaf_emiss_tir>0.97</leaf_emiss_tir>
<wood_emiss_tir>0.9</wood_emiss_tir>
<leaf_reflect_vis>0.0623455710493752</leaf_reflect_vis>
<leaf_reflect_nir>0.31138471282662</leaf_reflect_nir>
<wood_reflect_vis>0.11</wood_reflect_vis>
<wood_reflect_nir>0.11</wood_reflect_nir>
<leaf_trans_vis>0.0272293510450092</leaf_trans_vis>
<leaf_trans_nir>0.257487804675397</leaf_trans_nir>
<wood_trans_vis>0.11</wood_trans_vis>
<wood_trans_nir>0.11</wood_trans_nir>
<leaf_backscatter_vis>0</leaf_backscatter_vis>
<leaf_backscatter_nir>0</leaf_backscatter_nir>
<leaf_backscatter_tir>0.625</leaf_backscatter_tir>
<wood_backscatter_vis>0</wood_backscatter_vis>
<wood_backscatter_nir>0</wood_backscatter_nir>
<wood_backscatter_tir>0.625</wood_backscatter_tir>
<leaf_scatter_vis>0</leaf_scatter_vis>
<leaf_scatter_nir>0</leaf_scatter_nir>
<wood_scatter_vis>0</wood_scatter_vis>
<wood_scatter_nir>0</wood_scatter_nir>
<phi1>0</phi1>
<phi2>0</phi2>
<mu_bar>0</mu_bar>
<photosyn_pathway>3</photosyn_pathway>
<quantum_efficiency>0.0637903616924472</quantum_efficiency>
<Vm0>2.22065133246354</Vm0>
<Vm_low_temp>4.7136998177</Vm_low_temp>
<Vm_high_temp>45</Vm_high_temp>
<Vm_decay_e>0.400000006</Vm_decay_e>
<Vm_decay_a>220000</Vm_decay_a>
<Vm_decay_b>690</Vm_decay_b>
<vm_hor>3000</vm_hor>
<vm_q10>2.4000000954</vm_q10>
<dark_respiration_factor>0.0144999996</dark_respiration_factor>
<Rd_low_temp>4.7136998177</Rd_low_temp>
<Rd_high_temp>45</Rd_high_temp>
<Rd_decay_e>0.400000006</Rd_decay_e>
<Rd_hor>3000</Rd_hor>
<Rd_q10>2.4000000954</Rd_q10>
<Rd0>0.1645749956</Rd0>
<D0>0.0160000008</D0>
<stomatal_slope>2.31739053371518</stomatal_slope>
<cuticular_cond>14211.0105751027</cuticular_cond>
<water_conductance>1.90132e-05</water_conductance>
<leaf_width>0.0500000007</leaf_width>
<growth_resp_factor>0.347725577973498</growth_resp_factor>
<leaf_turnover_rate>0.3333333433</leaf_turnover_rate>
<root_turnover_rate>3.9272179604</root_turnover_rate>
<storage_turnover_rate>0</storage_turnover_rate>
<f_labile>0.7900000215</f_labile>
<root_respiration_factor>0.2800000012</root_respiration_factor>
<rrf_low_temp>4.7136998177</rrf_low_temp>
<rrf_high_temp>45</rrf_high_temp>
<rrf_decay_e>0.400000006</rrf_decay_e>
<rrf_hor>3000</rrf_hor>
<rrf_q10>2.4000000954</rrf_q10>
<frost_mort>3</frost_mort>
<mort0>0</mort0>
<mort1>1</mort1>
<mort2>20</mort2>
<mort3>0.0033928</mort3>
<cbr_severe_stress>-0.7971192598</cbr_severe_stress>
<seedling_mortality>0.9499999881</seedling_mortality>
<treefall_s_gt>0</treefall_s_gt>
<treefall_s_lt>0.1000000015</treefall_s_lt>
<fire_s_gt>0</fire_s_gt>
<fire_s_lt>0</fire_s_lt>
<plant_min_temp>193.1499938965</plant_min_temp>
<rho>0</rho>
<SLA>14.6474989899547</SLA>
<horiz_branch>0.6100000143</horiz_branch>
<q>0.241676111114444</q>
<sapwood_ratio>3900</sapwood_ratio>
<qsw>0.0015384615</qsw>
<init_density>0.1000000015</init_density>
<b1Ht>27.1399993896</b1Ht>
<b2Ht>-0.0388399996</b2Ht>
<hgt_ref>1.2999999523</hgt_ref>
<hgt_min>1.5</hgt_min>
<hgt_max>27.112859726</hgt_max>
<min_dbh>0.1904353052</min_dbh>
<dbh_crit>77.7029876709</dbh_crit>
<dbh_adult>10</dbh_adult>
<dbh_bigleaf>25.9009971619</dbh_bigleaf>
<b1Bl_small>0.0240000002</b1Bl_small>
<b1Bl_large>0.0240000002</b1Bl_large>
<b2Bl_small>1.8990000486</b2Bl_small>
<b2Bl_large>1.8990000486</b2Bl_large>
<bleaf_adult>0.9510016441</bleaf_adult>
<b1Bs_small>0.1469999999</b1Bs_small>
<b1Bs_large>0.1469999999</b1Bs_large>
<b2Bs_small>2.2379999161</b2Bs_small>
<b2Bs_large>2.2379999161</b2Bs_large>
<min_bdead>0.0017962311</min_bdead>
<bdead_crit>1250.5089111328</bdead_crit>
<b1Ca>2.4901540279</b1Ca>
<b2Ca>0.8068805933</b2Ca>
<b1WAI>0.0276500005</b1WAI>
<b2WAI>1.9768999815</b2WAI>
<brf_wd>0.1599999964</brf_wd>
<agf_bs>0.6999999881</agf_bs>
<b1Vol>0.0247086249</b1Vol>
<b2Vol>2</b2Vol>
<b1Rd>-1.1140580177</b1Rd>
<b2Rd>0.4223014116</b2Rd>
<c2n_leaf>78.032623291</c2n_leaf>
<c2n_recruit>124.6847686768</c2n_recruit>
<phenology>0</phenology>
<c_grn_leaf_dry>3218</c_grn_leaf_dry>
<wat_dry_ratio_grn>2.5</wat_dry_ratio_grn>
<wat_dry_ratio_ngrn>0.6999999881</wat_dry_ratio_ngrn>
<c_ngrn_biom_dry>1217.3759765625</c_ngrn_biom_dry>
<delta_c>-225.1618652344</delta_c>
<b1Cl>0.3106774986</b1Cl>
<b2Cl>1.0980000496</b2Cl>
<r_fract>0.3000000119</r_fract>
<st_fract>0</st_fract>
<nonlocal_dispersal>0.7659999728</nonlocal_dispersal>
<repro_min_h>18</repro_min_h>
<one_plant_c>0.0024901477</one_plant_c>
<min_recruit_size>2.49015e-05</min_recruit_size>
<min_cohort_size>2.4901e-06</min_cohort_size>
<seed_rain>0.0100000007</seed_rain>
<negligible_nplant>1e-08</negligible_nplant>
<veg_hcap_min>0.2346830666</veg_hcap_min>
<prospect_N>1.80325531024831</prospect_N>
<prospect_Cab>42.5292893153896</prospect_Cab>
<prospect_Car>9.21964077764762</prospect_Car>
<prospect_Cw>0.0918372763837782</prospect_Cw>
<prospect_Cm>0.0523600789353438</prospect_Cm>
<b1Bl>1.23899226801311</b1Bl>
<b2Bl>10.6266040178463</b2Bl>
<fineroot2leaf>0.241676111114444</fineroot2leaf>
<Vcmax>2.22065133246354</Vcmax>
</pft>
<pft>
<num>8</num>
<is_tropical>0</is_tropical>
<is_grass>0</is_grass>
<include_pft>1</include_pft>
<include_pft_ag>0</include_pft_ag>
<include_pft_fp>0</include_pft_fp>
<clumping_factor>0.521443027576719</clumping_factor>
<orient_factor>-0.500486212123411</orient_factor>
<leaf_emiss_tir>0.97</leaf_emiss_tir>
<wood_emiss_tir>0.9</wood_emiss_tir>
<leaf_reflect_vis>0.0567428346791076</leaf_reflect_vis>
<leaf_reflect_nir>0.43068086281162</leaf_reflect_nir>
<wood_reflect_vis>0.11</wood_reflect_vis>
<wood_reflect_nir>0.11</wood_reflect_nir>
<leaf_trans_vis>0.00270555096057275</leaf_trans_vis>
<leaf_trans_nir>0.171790995869421</leaf_trans_nir>
<wood_trans_vis>0.11</wood_trans_vis>
<wood_trans_nir>0.11</wood_trans_nir>
<leaf_backscatter_vis>0</leaf_backscatter_vis>
<leaf_backscatter_nir>0</leaf_backscatter_nir>
<leaf_backscatter_tir>0.625</leaf_backscatter_tir>
<wood_backscatter_vis>0</wood_backscatter_vis>
<wood_backscatter_nir>0</wood_backscatter_nir>
<wood_backscatter_tir>0.625</wood_backscatter_tir>
<leaf_scatter_vis>0</leaf_scatter_vis>
<leaf_scatter_nir>0</leaf_scatter_nir>
<wood_scatter_vis>0</wood_scatter_vis>
<wood_scatter_nir>0</wood_scatter_nir>
<phi1>0</phi1>
<phi2>0</phi2>
<mu_bar>0</mu_bar>
<photosyn_pathway>3</photosyn_pathway>
<quantum_efficiency>0.0915084517383756</quantum_efficiency>
<Vm0>0.85500523898067</Vm0>
<Vm_low_temp>4.7136998177</Vm_low_temp>
<Vm_high_temp>45</Vm_high_temp>
<Vm_decay_e>0.400000006</Vm_decay_e>
<Vm_decay_a>220000</Vm_decay_a>
<Vm_decay_b>690</Vm_decay_b>
<vm_hor>3000</vm_hor>
<vm_q10>2.4000000954</vm_q10>
<dark_respiration_factor>0.0144999996</dark_respiration_factor>
<Rd_low_temp>4.7136998177</Rd_low_temp>
<Rd_high_temp>45</Rd_high_temp>
<Rd_decay_e>0.400000006</Rd_decay_e>
<Rd_hor>3000</Rd_hor>
<Rd_q10>2.4000000954</Rd_q10>
<Rd0>0.0658299997</Rd0>
<D0>0.0160000008</D0>
<stomatal_slope>2.31739053371518</stomatal_slope>
<cuticular_cond>14211.0105751027</cuticular_cond>
<water_conductance>1.90132e-05</water_conductance>
<leaf_width>0.0500000007</leaf_width>
<growth_resp_factor>0.347725577973498</growth_resp_factor>
<leaf_turnover_rate>0.3333333433</leaf_turnover_rate>
<root_turnover_rate>3.8001320362</root_turnover_rate>
<storage_turnover_rate>0</storage_turnover_rate>
<f_labile>0.7900000215</f_labile>
<root_respiration_factor>0.2800000012</root_respiration_factor>
<rrf_low_temp>4.7136998177</rrf_low_temp>
<rrf_high_temp>45</rrf_high_temp>
<rrf_decay_e>0.400000006</rrf_decay_e>
<rrf_hor>3000</rrf_hor>
<rrf_q10>2.4000000954</rrf_q10>
<frost_mort>3</frost_mort>
<mort0>0</mort0>
<mort1>1</mort1>
<mort2>20</mort2>
<mort3>0.0023568</mort3>
<cbr_severe_stress>-0.7971192598</cbr_severe_stress>
<seedling_mortality>0.9499999881</seedling_mortality>
<treefall_s_gt>0</treefall_s_gt>
<treefall_s_lt>0.1000000015</treefall_s_lt>
<fire_s_gt>0</fire_s_gt>
<fire_s_lt>0</fire_s_lt>
<plant_min_temp>213.1499938965</plant_min_temp>
<rho>0</rho>
<SLA>35.1827825510162</SLA>
<horiz_branch>0.6100000143</horiz_branch>
<q>0.241676111114444</q>
<sapwood_ratio>3900</sapwood_ratio>
<qsw>0.0025641026</qsw>
<init_density>0.1000000015</init_density>
<b1Ht>22.7900009155</b1Ht>
<b2Ht>-0.0444499999</b2Ht>
<hgt_ref>1.2999999523</hgt_ref>
<hgt_min>1.5</hgt_min>
<hgt_max>22.7672119141</hgt_max>
<min_dbh>0.1983015537</min_dbh>
<dbh_crit>64.0400543213</dbh_crit>
<dbh_adult>10</dbh_adult>
<dbh_bigleaf>21.3466854095</dbh_bigleaf>
<b1Bl_small>0.0454000011</b1Bl_small>
<b1Bl_large>0.0454000011</b1Bl_large>
<b2Bl_small>1.6828999519</b2Bl_small>
<b2Bl_large>1.6828999519</b2Bl_large>
<bleaf_adult>1.0937695503</bleaf_adult>
<b1Bs_small>0.1616999954</b1Bs_small>
<b1Bs_large>0.1616999954</b1Bs_large>
<b2Bs_small>2.1535999775</b2Bs_small>
<b2Bs_large>2.1535999775</b2Bs_large>
<min_bdead>0.0024797136</min_bdead>
<bdead_crit>628.1369628906</bdead_crit>
<b1Ca>2.4901540279</b1Ca>
<b2Ca>0.8068805933</b2Ca>
<b1WAI>0.0276500005</b1WAI>
<b2WAI>1.9768999815</b2WAI>
<brf_wd>0.1599999964</brf_wd>
<agf_bs>0.6999999881</agf_bs>
<b1Vol>0.0247086249</b1Vol>
<b2Vol>2</b2Vol>
<b1Rd>-1.1140580177</b1Rd>
<b2Rd>0.4223014116</b2Rd>
<c2n_leaf>108.4507446289</c2n_leaf>
<c2n_recruit>132.0868988037</c2n_recruit>
<phenology>0</phenology>
<c_grn_leaf_dry>3218</c_grn_leaf_dry>
<wat_dry_ratio_grn>2.5</wat_dry_ratio_grn>
<wat_dry_ratio_ngrn>0.6999999881</wat_dry_ratio_ngrn>
<c_ngrn_biom_dry>1217.3759765625</c_ngrn_biom_dry>
<delta_c>-225.1618652344</delta_c>
<b1Cl>0.3106774986</b1Cl>
<b2Cl>1.0980000496</b2Cl>
<r_fract>0.3000000119</r_fract>
<st_fract>0</st_fract>
<nonlocal_dispersal>0.001</nonlocal_dispersal>
<repro_min_h>18</repro_min_h>
<one_plant_c>0.0044928668</one_plant_c>
<min_recruit_size>4.49287e-05</min_recruit_size>
<min_cohort_size>4.4929e-06</min_cohort_size>
<seed_rain>0.0100000007</seed_rain>
<negligible_nplant>1e-08</negligible_nplant>
<veg_hcap_min>0.6800739169</veg_hcap_min>
<prospect_N>3.00293974361095</prospect_N>
<prospect_Cab>93.0935270952303</prospect_Cab>
<prospect_Car>11.7766199979015</prospect_Car>
<prospect_Cw>0.0821548214340861</prospect_Cw>
<prospect_Cm>0.0450056656130239</prospect_Cm>
<b1Bl>8.15037383593714</b1Bl>
<b2Bl>10.8072759640833</b2Bl>
<fineroot2leaf>0.241676111114444</fineroot2leaf>
<Vcmax>0.85500523898067</Vcmax>
</pft>
</config>
context("Download NARR via THREDDS")
start_date <- "2012-02-20"
end_date <- "2012-03-05"
ntime <- as.numeric(difftime(end_date, start_date) + 1) * 24 / 3 + 1
lat.in <- 43.3724
lon.in <- -89.9071
outfolder <- tempfile()
dir.create(outfolder)
# Create a fake NARR file the outfolder against which we will test
testfile <- file.path(outfolder, "_dl_narr_test.nc")
time_units <- "hours since 2012-02-20"
time_vals <- seq_len(difftime(end_date, start_date, units = "hours") * 3) - 1
timedim <- ncdf4::ncdim_def("time", units = time_units, vals = time_vals)
reftimedim <- ncdf4::ncdim_def("reftime", units = time_units, vals = time_vals)
flx_vars <- purrr::pmap(list(
name = narr_flx_vars[["NARR_name"]],
units = narr_flx_vars[["units"]]
), ncdf4::ncvar_def, dim = timedim)
sfc_vars <- purrr::pmap(list(
name = narr_sfc_vars[["NARR_name"]],
units = narr_sfc_vars[["units"]]
), ncdf4::ncvar_def, dim = reftimedim)
ncdf4::nc_create(testfile, c(flx_vars, sfc_vars))
nc <- ncdf4::nc_open(testfile, write = TRUE)
purrr::walk(
flx_vars,
ncdf4::ncvar_put,
nc = nc,
vals = rexp(length(time_vals))
)
purrr::walk(
sfc_vars,
ncdf4::ncvar_put,
nc = nc,
vals = rexp(length(time_vals))
)
teardown({
ncdf4::nc_close(nc)
unlink(outfolder, recursive = TRUE, force = TRUE)
})
test_that(
"NARR download works as expected",
{
# Instead of reading the target NARR file, we read the testfile.
# This works because the NARR site code only uses nc_open to read
# the remote file, never to read anything downloaded.
r <- with_mock(
"ncdf4::nc_open" = function(filename) ncdf4::nc_open(testfile),
download.NARR_site(outfolder, start_date, end_date, lat.in, lon.in,
progress = FALSE, parallel = FALSE)
)
expect_equal(nrow(r), 1)
expect_true(file.exists(r$file[1]))
nc <- ncdf4::nc_open(r$file)
temp <- ncdf4::ncvar_get(nc, "air_temperature")
precip <- ncdf4::ncvar_get(nc, "precipitation_flux")
expect_true(all(!is.na(temp)), all(temp > 0), length(temp) == ntime)
expect_true(all(!is.na(precip)), length(precip) == ntime)
ncdf4::nc_close(nc)
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment