autogif()
uses ggplot2
and gganimate
to render an animation from a
TROLL simulation. The animation can include a vertical cut in the forest
structure along the X-axis highlighting either tree species (variables = 'species'
), either tree height relative to their maximum height (variables = 'height_ct'
), or tree carbon acquisition with net over growth primary
productivity (variables = 'npp_gpp'
). The animation can also include a top
view of the canopy representing either canopy trees height (variables = 'height'
) or total leaf area index per pixel (variables = 'lai'
).
autogif(
name = NULL,
path = NULL,
variables = c("species", "height_ct", "npp_gpp", "height", "lai"),
global,
species,
climate,
daily,
forest = NULL,
verbose = TRUE,
overwrite = TRUE,
thin = NULL
)
char. Model name (if NULL timestamp).
char. Path to save the simulation outputs, the default is null corresponding to a simulation in memory without saved intermediary files (based on temporary files from option.rcontroll).
char. Variables to build as a gif among 'species', 'height_ct', 'npp_gpp', 'height', or 'lai'.
df. Global parameters (e.g. TROLLv3_input or using
generate_parameters()
).
df. Species parameters (e.g. TROLLv3_species).
df. Climate parameters (e.g. TROLLv3_climatedaytime12).
df. Daily variation parameters (e.g. TROLLv3_daytimevar).
df. TROLL with forest input, if null starts from an empty grid
(default NULL) (e.g. using TROLLv3_output with get_forest()
).
bool. Show TROLL outputs in the console.
bool. Overwrite previous outputs.
int. Vector of integers corresponding to the iterations to be kept to reduce output size, default is NULL and corresponds to no thinning.
A list of gganimate
objects corresponding to chosen outputs.
if (FALSE) { # \dontrun{
data("TROLLv3_species")
data("TROLLv3_climatedaytime12")
data("TROLLv3_daytimevar")
autogif(
name = "test", global = generate_parameters(
cols = 100, rows = 100,
iterperyear = 12, nbiter = 12 * 100,
extent_visual = 10
),
species = TROLLv3_species,
climate = TROLLv3_climatedaytime12,
daily = TROLLv3_daytimevar,
verbose = FALSE
)
} # }