R/calc_deadw_decay_plot_species.R
calc_deadw_decay_plot_species.Rd
This function calculates for each plot, tree species and year the volume logs and standing dead wood per hectare and per decay stage.
calc_deadw_decay_plot_species(
plotinfo,
data_deadwood = NA,
data_dendro_calc = NA
)
dataframe on surveyed plots with variables plot_id
,
plottype
, forest_reserve
, survey_trees
, survey_deadw
, period
and
year_dendro
(output of function load_plotinfo()
)
dataframe on logs with variables plot_id
, plottype
,
date_dendro
, species
, decaystage
, calc_volume_m3
, period
and year
(output of function load_data_deadwood()
)
dataframe on stems (shoots and trees) as given from
the function calc_variables_stem_level()
dataframe with columns plot
, year
, tree_species
, decaystage
,
vol_log_m3_ha
library(forrescalc)
# (add path to your own fieldmap database here)
path_to_fieldmapdb <-
system.file("example/database/mdb_bosres.sqlite", package = "forrescalc")
data_deadwood <- load_data_deadwood(path_to_fieldmapdb)
data_dendro <- load_data_dendrometry(path_to_fieldmapdb)
data_shoots <- load_data_shoots(path_to_fieldmapdb)
data_stems <- compose_stem_data(data_dendro, data_shoots)
# omit argument 'example_dataset = TRUE' below to use all height models
height_model <- load_height_models(example_dataset = TRUE)
data_stems_calc <- calc_variables_stem_level(data_stems, height_model)
data_dendro_calc <- calc_variables_tree_level(data_dendro, data_stems_calc)
plotinfo <- load_plotinfo(path_to_fieldmapdb)
#> Joining with `by = join_by(forest_reserve, plot_id, plottype, survey_trees)`
calc_deadw_decay_plot_species(plotinfo, data_deadwood, data_dendro_calc)
#> plottype plot_id year period species decaystage vol_dead_standing_m3_ha
#> 1 CP 101 2002 1 16 16 0.00000000
#> 2 CP 101 2002 1 28 16 0.00000000
#> 3 CP 101 2002 1 87 16 0.00000000
#> 4 CP 101 2002 1 16 13 0.00000000
#> 5 CP 101 2002 1 87 10 0.00000000
#> 6 CP 101 2002 1 87 12 0.00000000
#> 7 CP 101 2002 1 87 13 0.00000000
#> 8 CP 204 2000 1 26 16 0.00000000
#> 9 CP 204 2000 1 26 13 0.00000000
#> 10 CP 1005 2006 1 87 16 0.00000000
#> 11 CP 1005 2006 1 87 13 0.00000000
#> 12 CP 2006 2000 1 7 16 0.00000000
#> 13 CP 2006 2000 1 87 12 3.68015070
#> 14 CA 11000 2000 1 7 16 0.00000000
#> 15 CA 11000 2000 1 16 16 0.00000000
#> 16 CA 11000 2000 1 87 16 0.00000000
#> 17 CA 21000 2008 1 6 16 0.00000000
#> 18 CA 21000 2008 1 7 16 0.00000000
#> 19 CA 21000 2008 1 16 12 0.04587028
#> 20 CA 21000 2008 1 16 16 0.00000000
#> 21 CA 21000 2008 1 87 12 7.22471567
#> 22 CA 21000 2008 1 87 16 0.00000000
#> 23 CA 21000 2008 1 16 13 0.00000000
#> 24 CA 21000 2008 1 16 14 0.00000000
#> 25 CA 21000 2008 1 87 13 0.00000000
#> 26 CA 141100 2007 1 28 16 0.00000000
#> 27 CA 141100 2007 1 87 16 0.00000000
#> 28 CA 141100 2007 1 87 12 0.00000000
#> 29 CA 141100 2007 1 87 13 0.00000000
#> 30 CP 101 2012 2 16 16 0.00000000
#> 31 CP 101 2012 2 28 12 1.01959467
#> 32 CP 101 2012 2 28 13 0.58655366
#> 33 CP 101 2012 2 87 16 0.00000000
#> 34 CP 101 2012 2 16 12 0.00000000
#> 35 CP 101 2012 2 87 11 0.00000000
#> 36 CP 101 2012 2 87 13 0.00000000
#> 37 CP 204 2011 2 26 16 0.00000000
#> 38 CP 204 2011 2 26 13 0.00000000
#> 39 CP 204 2011 2 26 14 0.00000000
#> 40 CP 1005 2016 2 87 16 0.00000000
#> 41 CP 2006 2010 2 7 16 0.00000000
#> 42 CP 2006 2010 2 7 14 0.00000000
#> 43 CP 2006 2010 2 7 15 0.00000000
#> 44 CP 2006 2010 2 87 13 0.00000000
#> 45 CA 11000 2010 2 7 16 0.00000000
#> 46 CA 11000 2010 2 16 16 0.00000000
#> 47 CA 11000 2010 2 87 12 0.61696050
#> 48 CA 11000 2010 2 87 16 0.00000000
#> 49 CA 11000 2010 2 7 14 0.00000000
#> 50 CA 11000 2010 2 87 11 0.00000000
#> 51 CA 11000 2010 2 87 13 0.00000000
#> 52 CA 21000 2018 2 7 11 0.08059410
#> 53 CA 21000 2018 2 7 16 0.00000000
#> 54 CA 21000 2018 2 16 12 0.01150031
#> 55 CA 21000 2018 2 16 16 0.00000000
#> 56 CA 21000 2018 2 87 12 2.42133316
#> 57 CA 21000 2018 2 87 16 0.00000000
#> 58 CA 21000 2018 2 16 10 0.00000000
#> 59 CA 21000 2018 2 16 14 0.00000000
#> 60 CA 21000 2018 2 87 10 0.00000000
#> 61 CA 141100 2016 2 28 16 0.00000000
#> 62 CA 141100 2016 2 87 16 0.00000000
#> 63 CA 141100 2016 2 6 14 0.00000000
#> 64 CA 141100 2016 2 87 13 0.00000000
#> 65 CP 2006 2020 3 7 16 0.00000000
#> 66 CP 2006 2020 3 7 12 0.00000000
#> 67 CP 2006 2020 3 7 14 0.00000000
#> 68 CP 2006 2020 3 87 13 0.00000000
#> 69 CP 2006 2020 3 87 14 0.00000000
#> 70 CA 11000 2020 3 7 16 0.00000000
#> 71 CA 11000 2020 3 16 16 0.00000000
#> 72 CA 11000 2020 3 87 12 0.68493999
#> 73 CA 11000 2020 3 87 16 0.00000000
#> 74 CA 11000 2020 3 7 14 0.00000000
#> 75 CA 11000 2020 3 87 13 0.00000000
#> 76 CA 11000 1986 0 7 16 0.00000000
#> 77 CA 11000 1986 0 87 16 0.00000000
#> vol_bole_dead_m3_ha vol_log_m3_ha
#> 1 0.00000000 0.00000000
#> 2 0.00000000 0.00000000
#> 3 0.00000000 0.00000000
#> 4 0.00000000 0.28138987
#> 5 0.00000000 0.25831240
#> 6 0.00000000 0.09933430
#> 7 0.00000000 0.50251700
#> 8 0.00000000 0.00000000
#> 9 0.00000000 1.82280156
#> 10 0.00000000 0.00000000
#> 11 0.00000000 1.77142988
#> 12 0.00000000 0.00000000
#> 13 3.34711960 0.00000000
#> 14 0.00000000 0.00000000
#> 15 0.00000000 0.00000000
#> 16 0.00000000 0.00000000
#> 17 0.00000000 0.00000000
#> 18 0.00000000 0.00000000
#> 19 0.04587028 0.00000000
#> 20 0.00000000 0.00000000
#> 21 6.01489120 0.00000000
#> 22 0.00000000 0.00000000
#> 23 0.00000000 0.12717755
#> 24 0.00000000 2.28527143
#> 25 0.00000000 0.21068367
#> 26 0.00000000 0.00000000
#> 27 0.00000000 0.00000000
#> 28 0.00000000 0.31492000
#> 29 0.00000000 0.16866400
#> 30 0.00000000 0.00000000
#> 31 1.01959467 0.00000000
#> 32 0.57843873 0.00000000
#> 33 0.00000000 0.00000000
#> 34 0.00000000 1.94059980
#> 35 0.00000000 0.22030188
#> 36 0.00000000 0.63081356
#> 37 0.00000000 0.00000000
#> 38 0.00000000 2.42733570
#> 39 0.00000000 0.19856966
#> 40 0.00000000 0.00000000
#> 41 0.00000000 0.00000000
#> 42 0.00000000 0.25517843
#> 43 0.00000000 0.04264999
#> 44 0.00000000 3.12851579
#> 45 0.00000000 0.00000000
#> 46 0.00000000 0.00000000
#> 47 0.54898100 0.00000000
#> 48 0.00000000 0.00000000
#> 49 0.00000000 1.29862986
#> 50 0.00000000 0.61732828
#> 51 0.00000000 0.51918277
#> 52 0.05250379 0.00000000
#> 53 0.00000000 0.00000000
#> 54 0.01150031 0.03972653
#> 55 0.00000000 0.00000000
#> 56 2.07753192 0.00000000
#> 57 0.00000000 0.00000000
#> 58 0.00000000 0.27540408
#> 59 0.00000000 0.02916531
#> 60 0.00000000 0.28292449
#> 61 0.00000000 0.00000000
#> 62 0.00000000 0.00000000
#> 63 0.00000000 0.01212400
#> 64 0.00000000 0.53009400
#> 65 0.00000000 0.00000000
#> 66 0.00000000 0.13834809
#> 67 0.00000000 0.05132216
#> 68 0.00000000 4.21210984
#> 69 0.00000000 0.12033528
#> 70 0.00000000 0.00000000
#> 71 0.00000000 0.00000000
#> 72 0.54898100 0.00000000
#> 73 0.00000000 0.00000000
#> 74 0.00000000 0.84133972
#> 75 0.00000000 1.04068000
#> 76 0.00000000 0.00000000
#> 77 0.00000000 0.00000000