# Pseudocode notes for Wood et al. (2013)
# Insects/Disease and Climate Change
DiscussClimateAndBioticDisturbances <- function(
GHG = 'increase', temps = 'increase') {
conclusions <- list()
if (GHG == 'increase') {
if (temperatures == 'increase') {
ret <- list()
for (i in 1:3) {
ret <- append(ret, switch(i,
'Physiology of insects --> changes to abundance and distribution'
'Effects on tree defenses and tolerance',
'Effects on insects ~ insects * competitors + insects * mutualists + insects * enemies'
))
}
ReduceMortality(insects, when = 'winter')
IncreaseDevelopment(insects, when = 'growing season')
aa <- UpdateTree(phenology = 'leaf')
bb <- UpdateInsects(phenology = 'feeding')
cc <- UpdateInsects(what = 'bark_beetles', how = 'synchrony')
if (cc == 'synchrony') {
ma <- MassAttack(beetles, include_cc = TRUE)
if (ma == TRUE) {
KillTrees(which = 'stressed')
}
}
if (aa == TRUE && bb == TRUE) {
KillTrees()
}
UpdateWater()
}
if (drought == 'active' | nutrients == 'deficient') {
if (inorganic_N == 'increase') {
ReduceDefenses(trees, type = c('inducible', 'consitutive'))
}
} else if (drought > threshold) {
KillTrees(which = c('stressed, healthy'))
}
CheckSymbiosis(bark_beetles, pathogenic_fungus)
}
UpdateConclusions(conclusions)
return(conclusions)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.