Skip to content

Commit

Permalink
Update write.config.STICS.R with STICS filenames
Browse files Browse the repository at this point in the history
Added which STICS file the parameter is found in to the pecan2stics lookup table.
  • Loading branch information
qdbell authored Nov 15, 2024
1 parent dd54681 commit b0a3cbe
Showing 1 changed file with 145 additions and 149 deletions.
294 changes: 145 additions & 149 deletions models/stics/R/write.config.STICS.R
Original file line number Diff line number Diff line change
Expand Up @@ -928,157 +928,153 @@ pecan2stics <- function(trait.values){

# TODO :match all stics and pecan names
vartable <- tibble::tribble(
~sticsname, ~pecanname, ~sticsunits, ~pecanunits,
~sticsname, ~pecanname, ~sticsunits, ~pecanunits, ~sticsfile,
# Plant and soil related parameters
"abscission", "fracLeafFall", NA, NA,
"adens", "adens", NA, NA,
"adil", "adil", NA, NA,
"ahres", "ahres", NA, NA,
"akres", "ORdecomp_par", NA, NA,
"ampfroid", "vernalization_TAmp", NA, NA,
"awb", "awb", NA, NA,
"bdens", "dens_comp", NA, NA,
"bdil", "bdil", NA, NA,
"belong", "belong", NA, NA,
"beta", "maxTPincrease_waterstress", NA, NA,
"bhres", "bhres", NA, NA,
"bkres", "ORdecomp_rate", NA, NA,
"bwb", "bwb", NA, NA,
"celong", "celong", NA, NA,
"CNresmax", "CNresmax", NA, NA,
"CNresmin", "CNresmin", NA, NA,
"coefamflax", "coefamflax", NA, NA,
"coefb", "rad_on_conversion_eff", NA, NA,
"coefdrpmat", "coefdrpmat", NA, NA,
"coefflodrp", "coefflodrp", NA, NA,
"coeflaxsen", "coeflaxsen", NA, NA,
"coeflevamf", "coeflevamf", NA, NA,
"coeflevdrp", "coeflevdrp", NA, NA,
"coefmshaut", "biomass2usefulheight", NA, NA,
"coefsenlan", "coefsenlan", NA, NA,
"contrdamax", "db_reduc_rgr_max", NA, NA,
"CroCo", "fOR_decomp", NA, NA,
"croirac", "croirac", NA, NA,
"cwb", "minC2N_microbialbiomass", NA, NA,
"dacohes", "bd_rootgrowth_reduced", NA, NA,
"daseuilbas", "bd_rootgrowth_maximal", NA, NA,
"daseuilhaut", "bd_rootgrowth_impossible", NA, NA,
"debsenrac", "root_sen_dday", "round", "0",
"difN", "difN_FC", NA, NA,
"diftherm", "soil_thermal_diffusivity", NA, NA,
"dlaimaxbrut", "lai_max_rate", NA, NA,
"dlaimin", "lai_growth_rate_accelerating", NA, NA,
"draclong", "rootlength_prod_max", NA, NA,
"durvieF", "leaf_lifespan_max", NA, NA,
"durviesupmax", "relative_addlifespan_DT_excessN", NA, NA,
"efcroijuv", "RUE_juv", NA, NA,
"efcroirepro", "RUE_rep", NA, NA,
"efcroiveg", "RUE_veg", NA, NA,
"elmax", "coleoptile_elong_dark_max", NA, NA,
"extin", "extinction_coefficient_diffuse", NA, NA,
"fhminsat", "fhminsat", NA, NA,
"FINERT", "FINERT", NA, NA,
"FMIN1", "FMIN1", NA, NA,
"FMIN2", "FMIN2", NA, NA,
"FMIN3", "FMIN3", NA, NA,
"fNCbiomin", "fNCbiomin", NA, NA,
"fredkN", "Nlim_reductionOMdecomp", NA, NA,
"fredlN", "Nlim_reductionMBdecomp", NA, NA,
"fredNsup", "fredNsup", NA, NA,
"FTEMh", "T_p1_Hdecomp_rate", NA, NA,
"FTEMha", "T_p2_Hdecomp_rate", NA, NA,
"FTEMr", "FTEMr", NA, NA,
"FTEMra", "FTEMra", NA, NA,
"h2ofeuilverte", "water_content_TLP_leaf", NA, NA,
"hautmax", "HTMAX", NA, NA,
"hautbase", "height", NA, NA,
"hminm", "hminm", NA, NA,
"hoptm", "hoptm", NA, NA,
"INNmin", "INNmin", NA, NA,
"innsen", "innsen", NA, NA,
"innturgmin", "innturgmin", NA, NA,
"julvernal", "vernalization_init", "round", "0",
"jvcmini", "vernalization_days_min", "round", "0",
"kbio", "microbialbiomass_decay", NA, NA,
"khaut", "LAI2height", NA, NA,
"Kmabs1", "Kmabs1", NA, NA,
"kmax", "crop_water_max", NA, NA,
"laicomp", "lai_comp", NA, NA,
"longsperac", "SRL", NA, NA,
"lvfront", "rootdens_at_apex", NA, NA,
"lvopt", "lvopt", NA, NA,
"masecNmax", "masecNmax", NA, NA,
"maxazorac", "maxazorac", NA, NA,
"minazorac", "minazorac", NA, NA,
"minefnra", "minefnra", NA, NA,
"nlevlim1", "days2reduced_emergence_postgerm", "round", "0",
"nlevlim2", "days2stopped_emergence_postgerm", "round", "0",
"Nmeta", "Nmeta", NA, NA,
"Nreserve", "Nreserve", NA, NA,
"parazofmorte", "parazofmorte", NA, NA,
"pentlaimax", "pentlaimax", NA, NA,
"pHmaxvol", "pHmaxvol", NA, NA,
"pHminvol", "pHminvol", NA, NA,
"phobase", "phobase", NA, NA,
"phosat", "phosat", NA, NA,
"phyllotherme", "phyllochron", NA, NA,
"plNmin", "plNmin", NA, NA,
"pminruis", "precmin4runoff", NA, NA,
"Primingmax", "Primingmax", NA, NA,
"prophumtassrec", "SMC_compaction_delay_harvest", NA, NA,
"prophumtasssem", "SMC_compaction_delay_sow", NA, NA,
"proprac", "root2aerial_harvest", NA, NA,
"psihucc", "SWP_FC", NA, NA,
"psihumin", "SWP_WP", NA, NA,
"psisto", "psi_stomata_closure", NA, NA, # psisto, potential of stomatal closing (absolute value) (bars). note: units in betyDB are m, but Istem's prior is for testing
"psiturg", "leaf_psi_tlp", NA, NA,
"QNpltminINN", "QNpltminINN", NA, NA,
"rapsenturg", "rapsenturg", NA, NA,
"ratiodurvieI", "early2last_leaflife", NA, NA,
"ratiosen", "senes2total_biomass", NA, NA,
"rayon", "rayon", NA, NA,
"rdrain", "rdrain", NA, NA,
"remobres", "remobres", NA, NA,
"sensrsec", "rootsens2drought", NA, NA,
"slamax", "SLAMAX", "cm2 g-1", "m2 kg-1",
"slamin", "SLAMIN", "cm2 g-1", "m2 kg-1",
"stamflax", "cum_thermal_growth", NA, NA,
"stlevamf", "cum_thermal_juvenile", NA, NA,
"stlevdrp", "cum_thermal_filling", NA, NA,
"stpltger", "cum_thermal_germin", NA, NA,
"stressdev", "phasic_delay_max", NA, NA,
"swfacmin", "swfacmin", NA, NA,
"tcmax", "tcmax_growth", NA, NA,
"tcmin", "tcmin_growth", NA, NA,
"tcxstop", "tcmax_foliar_growth", NA, NA,
"tdmax", "tdmax", NA, NA,
"tdmin", "tdmin", NA, NA,
"temax", "temax", NA, NA,
"temin", "temin", NA, NA,
"teopt", "teopt", NA, NA,
"teoptbis", "teoptbis", NA, NA,
"tfroid", "vernalization_TOpt", NA, NA,
"tgmin", "emergence_Tmin", NA, NA,
"tigefeuil", "stem2leaf", NA, NA,
"tmin_mineralisation", "tmin_mineralisation", NA, NA,
"TREFh", "T_r_HOMdecomp", NA, NA,
"TREFr", "T_r_ORdecomp", NA, NA,
"udlaimax", "udlaimax", NA, NA,
"Vabs2", "Nupt_fertloss_halve", NA, NA,
"vlaimax", "vlaimax", NA, NA,
"Wh", "Wh", NA, NA,
"GMIN1", "GMIN1", NA, NA,
"GMIN2", "GMIN2", NA, NA,
"GMIN3", "GMIN3", NA, NA,
"GMIN4", "GMIN4", NA, NA,
"GMIN5", "GMIN5", NA, NA,
"GMIN6", "GMIN6", NA, NA,
"GMIN7", "GMIN7", NA, NA,
"Xorgmax", "maxNimm_mineralfert", NA, NA,
"y0msrac", "rootmin_harvest", NA, NA,
"yres", "microbialbiomass_C_yield", NA, NA,
"abscission", "fracLeafFall", NA, NA, "plt.xml",
"adens", "adens", NA, NA, "plt.xml",
"adil", "adil", NA, NA, "plt.xml",
"ahres", "ahres", NA, NA, "param_gen.xml",
"akres", "ORdecomp_par", NA, NA, "param_gen.xml",
"ampfroid", "vernalization_TAmp", NA, NA, "plt.xml",
"awb", "awb", NA, NA, "param_gen.xml",
"bdens", "dens_comp", NA, NA, "plt.xml",
"bdil", "bdil", NA, NA, "plt.xml",
"belong", "belong", NA, NA, "plt.xml",
"beta", "maxTPincrease_waterstress", NA, NA, "param_gen.xml",
"bhres", "bhres", NA, NA, "param_gen.xml",
"bkres", "ORdecomp_rate", NA, NA, "param_gen.xml",
"bwb", "bwb", NA, NA, "param_gen.xml",
"celong", "celong", NA, NA, "plt.xml",
"CNresmax", "CNresmax", NA, NA, "param_gen.xml",
"CNresmin", "CNresmin", NA, NA, "param_gen.xml",
"coefamflax", "coefamflax", NA, NA, "plt.xml",
"coefb", "rad_on_conversion_eff", NA, NA, "param_gen.xml",
"coefdrpmat", "coefdrpmat", NA, NA, "plt.xml",
"coefflodrp", "coefflodrp", NA, NA, "plt.xml",
"coeflaxsen", "coeflaxsen", NA, NA, "plt.xml",
"coeflevamf", "coeflevamf", NA, NA, "plt.xml",
"coeflevdrp", "coeflevdrp", NA, NA, "plt.xml",
"coefmshaut", "biomass2usefulheight", NA, NA, "plt.xml",
"coefsenlan", "coefsenlan", NA, NA, "plt.xml",
"contrdamax", "db_reduc_rgr_max", NA, NA, "plt.xml",
"CroCo", "fOR_decomp", NA, NA, "param_gen.xml",
"croirac", "croirac", NA, NA, "plt.xml",
"cwb", "minC2N_microbialbiomass", NA, NA, "param_gen.xml",
"dacohes", "bd_rootgrowth_reduced", NA, NA, "param_gen.xml",
"daseuilbas", "bd_rootgrowth_maximal", NA, NA, "param_gen.xml",
"daseuilhaut", "bd_rootgrowth_impossible", NA, NA, "param_gen.xml",
"debsenrac", "root_sen_dday", "round", "0", "plt.xml",
"difN", "difN_FC", NA, NA, "param_gen.xml",
"diftherm", "soil_thermal_diffusivity", NA, NA, "param_gen.xml",
"dlaimaxbrut", "lai_max_rate", NA, NA, "plt.xml",
"dlaimin", "lai_growth_rate_accelerating", NA, NA, "plt.xml",
"draclong", "rootlength_prod_max", NA, NA, "plt.xml",
"durvieF", "leaf_lifespan_max", NA, NA, "plt.xml",
"durviesupmax", "relative_addlifespan_DT_excessN", NA, NA, "plt.xml",
"efcroijuv", "RUE_juv", NA, NA, "plt.xml",
"efcroirepro", "RUE_rep", NA, NA, "plt.xml",
"efcroiveg", "RUE_veg", NA, NA, "plt.xml",
"elmax", "coleoptile_elong_dark_max", NA, NA, "plt.xml",
"extin", "extinction_coefficient_diffuse", NA, NA, "plt.xml",
"fhminsat", "fhminsat", NA, NA, "param_gen.xml",
"FINERT", "FINERT", NA, NA, "sols.xml",
"fNCbiomin", "fNCbiomin", NA, NA, "param_gen.xml",
"fredkN", "Nlim_reductionOMdecomp", NA, NA, "param_gen.xml",
"fredlN", "Nlim_reductionMBdecomp", NA, NA, "param_gen.xml",
"fredNsup", "fredNsup", NA, NA, "param_gen.xml",
"FTEMh", "T_p1_Hdecomp_rate", NA, NA, "param_gen.xml",
"FTEMha", "T_p2_Hdecomp_rate", NA, NA, "param_gen.xml",
"FTEMr", "FTEMr", NA, NA, "param_gen.xml",
"FTEMra", "FTEMra", NA, NA, "param_gen.xml",
"h2ofeuilverte", "water_content_TLP_leaf", NA, NA, "plt.xml",
"hautmax", "HTMAX", NA, NA, "plt.xml",
"hautbase", "height", NA, NA, "plt.xml",
"hminm", "hminm", NA, NA, "param_gen.xml",
"hoptm", "hoptm", NA, NA, "param_gen.xml",
"INNmin", "INNmin", NA, NA, "plt.xml",
"innsen", "innsen", NA, NA, "plt.xml",
"innturgmin", "innturgmin", NA, NA, "plt.xml",
"julvernal", "vernalization_init", "round", "0", "plt.xml",
"jvcmini", "vernalization_days_min", "round", "0", "plt.xml",
"kbio", "microbialbiomass_decay", NA, NA, "param_gen.xml",
"khaut", "LAI2height", NA, NA, "plt.xml",
"Kmabs1", "Kmabs1", NA, NA, "plt.xml",
"kmax", "crop_water_max", NA, NA, "plt.xml",
"laicomp", "lai_comp", NA, NA, "plt.xml",
"longsperac", "SRL", NA, NA, "plt.xml",
"lvfront", "rootdens_at_apex", NA, NA, "plt.xml",
"lvopt", "lvopt", NA, NA, "param_gen.xml",
"masecNmax", "masecNmax", NA, NA, "plt.xml",
"maxazorac", "maxazorac", NA, NA, "plt.xml",
"minazorac", "minazorac", NA, NA, "plt.xml",
"minefnra", "minefnra", NA, NA, "plt.xml",
"nlevlim1", "days2reduced_emergence_postgerm", "round", "0", "plt.xml",
"nlevlim2", "days2stopped_emergence_postgerm", "round", "0", "plt.xml",
"Nmeta", "Nmeta", NA, NA, "plt.xml",
"Nreserve", "Nreserve", NA, NA, "plt.xml",
"parazofmorte", "parazofmorte", NA, NA, "plt.xml",
"pentlaimax", "pentlaimax", NA, NA, "plt.xml",
"pHmaxvol", "pHmaxvol", NA, NA, "param_gen.xml",
"pHminvol", "pHminvol", NA, NA, "param_gen.xml",
"phobase", "phobase", NA, NA, "plt.xml",
"phosat", "phosat", NA, NA, "plt.xml",
"phyllotherme", "phyllochron", NA, NA, "plt.xml",
"plNmin", "plNmin", NA, NA, "param_gen.xml",
"pminruis", "precmin4runoff", NA, NA, "param_gen.xml",
"Primingmax", "Primingmax", NA, NA, "param_gen.xml",
"prophumtassrec", "SMC_compaction_delay_harvest", NA, NA, "param_gen.xml",
"prophumtasssem", "SMC_compaction_delay_sow", NA, NA, "param_gen.xml",
"proprac", "root2aerial_harvest", NA, NA, "param_gen.xml",
"psihucc", "SWP_FC", NA, NA, "param_gen.xml",
"psihumin", "SWP_WP", NA, NA, "param_gen.xml",
"psisto", "psi_stomata_closure", NA, NA, "plt.xml", # psisto, potential of stomatal closing (absolute value) (bars). note: units in betyDB are m, but Istem's prior is for testing
"psiturg", "leaf_psi_tlp", NA, NA, "plt.xml",
"QNpltminINN", "QNpltminINN", NA, NA, "param_gen.xml",
"rapsenturg", "rapsenturg", NA, NA, "plt.xml",
"ratiodurvieI", "early2last_leaflife", NA, NA, "plt.xml",
"ratiosen", "senes2total_biomass", NA, NA, "plt.xml",
"rayon", "rayon", NA, NA, "plt.xml",
"rdrain", "rdrain", NA, NA, "param_gen.xml",
"remobres", "remobres", NA, NA, "plt.xml",
"sensrsec", "rootsens2drought", NA, NA, "plt.xml",
"slamax", "SLAMAX", "cm2 g-1", "m2 kg-1", "plt.xml",
"slamin", "SLAMIN", "cm2 g-1", "m2 kg-1", "plt.xml",
"stamflax", "cum_thermal_growth", NA, NA, "plt.xml",
"stlevamf", "cum_thermal_juvenile", NA, NA, "plt.xml",
"stlevdrp", "cum_thermal_filling", NA, NA, "plt.xml",
"stpltger", "cum_thermal_germin", NA, NA, "plt.xml",
"stressdev", "phasic_delay_max", NA, NA, "plt.xml",
"swfacmin", "swfacmin", NA, NA, "plt.xml",
"tcmax", "tcmax_growth", NA, NA, "plt.xml",
"tcmin", "tcmin_growth", NA, NA, "plt.xml",
"tcxstop", "tcmax_foliar_growth", NA, NA, "plt.xml",
"tdmax", "tdmax", NA, NA, "plt.xml",
"tdmin", "tdmin", NA, NA, "plt.xml",
"temax", "temax", NA, NA, "plt.xml",
"temin", "temin", NA, NA, "plt.xml",
"teopt", "teopt", NA, NA, "plt.xml",
"teoptbis", "teoptbis", NA, NA, "plt.xml",
"tfroid", "vernalization_TOpt", NA, NA, "plt.xml",
"tgmin", "emergence_Tmin", NA, NA, "plt.xml",
"tigefeuil", "stem2leaf", NA, NA, "plt.xml",
"tmin_mineralisation", "tmin_mineralisation", NA, NA, "param_gen.xml",
"TREFh", "T_r_HOMdecomp", NA, NA, "param_gen.xml",
"TREFr", "T_r_ORdecomp", NA, NA, "param_gen.xml",
"udlaimax", "udlaimax", NA, NA, "plt.xml",
"Vabs2", "Nupt_fertloss_halve", NA, NA, "param_gen.xml",
"vlaimax", "vlaimax", NA, NA, "plt.xml",
"Wh", "Wh", NA, NA, "param_gen.xml",
"GMIN1", "GMIN1", NA, NA, "param_gen.xml",
"GMIN2", "GMIN2", NA, NA, "param_gen.xml",
"GMIN3", "GMIN3", NA, NA, "param_gen.xml",
"GMIN4", "GMIN4", NA, NA, "param_gen.xml",
"GMIN5", "GMIN5", NA, NA, "param_gen.xml",
"GMIN6", "GMIN6", NA, NA, "param_gen.xml",
"GMIN7", "GMIN7", NA, NA, "param_gen.xml",
"Xorgmax", "maxNimm_mineralfert", NA, NA, "param_gen.xml",
"y0msrac", "rootmin_harvest", NA, NA, "param_gen.xml",
"yres", "microbialbiomass_C_yield", NA, NA, "param_gen.xml",
# Missing pecan parameters without corresponding STICS parameters
"SLA", "SLA", NA, NA, # This is necessary as any parameters in the prior that are missing from this tibble cause an error.
)

trait.values <- lapply(trait.values, function(x){
Expand Down

0 comments on commit b0a3cbe

Please sign in to comment.