r sp_name

sp_names <- sp_name
if(sp_name=="Quercus pubescens") sp_names <- c("Quercus pubescens", "Quercus pyrenaica")
dfbai_SP = dfbai_sp[dfbai_sp$Species_ini %in% sp_names,]
dfbatot_SP = dfbatot_sp[dfbatot_sp$Species %in% sp_names,]
dfbarecr_SP = dfbarecr_sp[dfbarecr_sp$Species %in% sp_names,]
dfbadead_SP = dfbadead_sp[dfbadead_sp$Species %in% sp_names,]
dfNtot_SP = dfNtot_sp[dfNtot_sp$Species %in% sp_names,]
dfNrecr_SP = dfNrecr_sp[dfNrecr_sp$Species %in% sp_names,]
dfNdead_SP = dfNdead_sp[dfNdead_sp$Species %in% sp_names,]
dfdbh_SP = dfdbh[dfdbh$Species_ini %in% sp_names,]
dfh_SP = dfh[dfh$Species_ini %in% sp_names,]

Annual diameter increment

Prediction ability for diameter increase (cm/yr) of surviving trees:

dfdbh_SP |> 
  evaluation_stats() |> 
  kbl() |>
  kable_styling()

Annual height increment

Prediction ability for height increase (cm/yr) of surviving trees:

dfh_SP |> 
  evaluation_stats() |> 
  kbl() |>
  kable_styling()

Growth basal area increment

Prediction ability for basal area increase due to growth (m2/ha/yr) of surviving trees:

dfbai_SP |> 
  evaluation_stats() |> 
  kbl() |>
  kable_styling()

Mortality

Prediction ability for basal area decrease due to mortality (m2/ha/yr):

dfbadead_SP |> 
  evaluation_stats() |> 
  kbl() |>
  kable_styling()

Prediction ability for density decrease due to mortality (ind/ha/yr):

dfNdead_SP |> 
  evaluation_stats() |> 
  kbl() |>
  kable_styling()

Ingrowth

Prediction ability for basal area increase due to ingrowth (m2/ha/yr):

dfbarecr_SP |> 
  evaluation_stats() |> 
  kbl() |>
  kable_styling()

Prediction ability for density increase due to ingrowth (ind/ha/yr):

dfNrecr_SP |> 
  evaluation_stats() |> 
  kbl() |>
  kable_styling()

Overall basal area changes

Prediction ability for overall basal area changes (including growth, mortality and ingrowth):

dfbatot_SP |> 
  evaluation_stats() |> 
  kbl() |>
  kable_styling()

Predictive capacity plots (IFN2-IFN4):

dfbatot_bas <- dfbatot_SP |> filter(transpirationMode == "Granier",
                             period == "IFN24")
dfbatot_adv <- dfbatot_SP |> filter(transpirationMode == "Sperry",
                             period == "IFN24") 
plot_scatter_bai(dfbatot_bas, dfbatot_adv, quantity = "basal area change", xylim = c(-0.5,2), errorlim = c(-2,2))

Relationship between basal area changes and climatic variables (MAT and P/PET; IFN2-IFN4):

plot_cov_clim_bai(dfbatot_bas, dfbatot_adv, quantity = "Basal area change", ylim = c(-0.5,2), errorlim = c(-2,2))

Spatial distribution of errors (IFN2-IFN4):

p1<-bai_error_map(dfbatot_bas)+labs(title="Basic sub-model")
p2<-bai_error_map(dfbatot_adv)+labs(title="Advanced sub-model")
plot_grid(p1+theme(legend.position = "none"),p2+theme(legend.position = "none"),
          get_legend(p1),nrow=1, rel_widths = c(1,1,0.25))

Prediction ability for overall density changes (including growth, mortality and ingrowth):

dfNtot_SP |> 
  evaluation_stats() |> 
  kbl() |>
  kable_styling()


emf-creaf/medfateland documentation built on April 17, 2025, 5:43 a.m.