R/calc_deadw_decay_plot.R
calc_deadw_decay_plot.Rd
This function calculates for each plot and year the volume logs and standing dead wood per hectare and per decay stage.
calc_deadw_decay_plot(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
, 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(plotinfo, data_deadwood, data_dendro_calc)
#> plottype plot_id year period decaystage vol_dead_standing_m3_ha
#> 1 CP 101 2002 1 16 0.0000000
#> 2 CP 101 2002 1 10 0.0000000
#> 3 CP 101 2002 1 12 0.0000000
#> 4 CP 101 2002 1 13 0.0000000
#> 5 CP 204 2000 1 16 0.0000000
#> 6 CP 204 2000 1 13 0.0000000
#> 7 CP 1005 2006 1 16 0.0000000
#> 8 CP 1005 2006 1 13 0.0000000
#> 9 CP 2006 2000 1 12 3.6801507
#> 10 CP 2006 2000 1 16 0.0000000
#> 11 CA 11000 2000 1 16 0.0000000
#> 12 CA 21000 2008 1 12 7.2705860
#> 13 CA 21000 2008 1 16 0.0000000
#> 14 CA 21000 2008 1 13 0.0000000
#> 15 CA 21000 2008 1 14 0.0000000
#> 16 CA 141100 2007 1 16 0.0000000
#> 17 CA 141100 2007 1 12 0.0000000
#> 18 CA 141100 2007 1 13 0.0000000
#> 19 CP 101 2012 2 12 1.0195947
#> 20 CP 101 2012 2 13 0.5865537
#> 21 CP 101 2012 2 16 0.0000000
#> 22 CP 101 2012 2 11 0.0000000
#> 23 CP 204 2011 2 16 0.0000000
#> 24 CP 204 2011 2 13 0.0000000
#> 25 CP 204 2011 2 14 0.0000000
#> 26 CP 1005 2016 2 16 0.0000000
#> 27 CP 2006 2010 2 16 0.0000000
#> 28 CP 2006 2010 2 13 0.0000000
#> 29 CP 2006 2010 2 14 0.0000000
#> 30 CP 2006 2010 2 15 0.0000000
#> 31 CA 11000 2010 2 12 0.6169605
#> 32 CA 11000 2010 2 16 0.0000000
#> 33 CA 11000 2010 2 11 0.0000000
#> 34 CA 11000 2010 2 13 0.0000000
#> 35 CA 11000 2010 2 14 0.0000000
#> 36 CA 21000 2018 2 11 0.0805941
#> 37 CA 21000 2018 2 12 2.4328335
#> 38 CA 21000 2018 2 16 0.0000000
#> 39 CA 21000 2018 2 10 0.0000000
#> 40 CA 21000 2018 2 14 0.0000000
#> 41 CA 141100 2016 2 16 0.0000000
#> 42 CA 141100 2016 2 13 0.0000000
#> 43 CA 141100 2016 2 14 0.0000000
#> 44 CP 2006 2020 3 16 0.0000000
#> 45 CP 2006 2020 3 12 0.0000000
#> 46 CP 2006 2020 3 13 0.0000000
#> 47 CP 2006 2020 3 14 0.0000000
#> 48 CA 11000 2020 3 12 0.6849400
#> 49 CA 11000 2020 3 16 0.0000000
#> 50 CA 11000 2020 3 13 0.0000000
#> 51 CA 11000 2020 3 14 0.0000000
#> 52 CA 11000 1986 0 16 0.0000000
#> vol_bole_dead_m3_ha vol_log_m3_ha
#> 1 0.00000000 0.00000000
#> 2 0.00000000 0.25831240
#> 3 0.00000000 0.09933430
#> 4 0.00000000 0.78390687
#> 5 0.00000000 0.00000000
#> 6 0.00000000 1.82280156
#> 7 0.00000000 0.00000000
#> 8 0.00000000 1.77142988
#> 9 3.34711960 0.00000000
#> 10 0.00000000 0.00000000
#> 11 0.00000000 0.00000000
#> 12 6.06076149 0.00000000
#> 13 0.00000000 0.00000000
#> 14 0.00000000 0.33786122
#> 15 0.00000000 2.28527143
#> 16 0.00000000 0.00000000
#> 17 0.00000000 0.31492000
#> 18 0.00000000 0.16866400
#> 19 1.01959467 1.94059980
#> 20 0.57843873 0.63081356
#> 21 0.00000000 0.00000000
#> 22 0.00000000 0.22030188
#> 23 0.00000000 0.00000000
#> 24 0.00000000 2.42733570
#> 25 0.00000000 0.19856966
#> 26 0.00000000 0.00000000
#> 27 0.00000000 0.00000000
#> 28 0.00000000 3.12851579
#> 29 0.00000000 0.25517843
#> 30 0.00000000 0.04264999
#> 31 0.54898100 0.00000000
#> 32 0.00000000 0.00000000
#> 33 0.00000000 0.61732828
#> 34 0.00000000 0.51918277
#> 35 0.00000000 1.29862986
#> 36 0.05250379 0.00000000
#> 37 2.08903223 0.03972653
#> 38 0.00000000 0.00000000
#> 39 0.00000000 0.55832857
#> 40 0.00000000 0.02916531
#> 41 0.00000000 0.00000000
#> 42 0.00000000 0.53009400
#> 43 0.00000000 0.01212400
#> 44 0.00000000 0.00000000
#> 45 0.00000000 0.13834809
#> 46 0.00000000 4.21210984
#> 47 0.00000000 0.17165745
#> 48 0.54898100 0.00000000
#> 49 0.00000000 0.00000000
#> 50 0.00000000 1.04068000
#> 51 0.00000000 0.84133972
#> 52 0.00000000 0.00000000