forked from PredictiveEcology/LandWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path01-init.R
More file actions
44 lines (39 loc) · 2.02 KB
/
01-init.R
File metadata and controls
44 lines (39 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
################################################################################
## Initialization parameters and settings
################################################################################
.starttime <- Sys.time()
quickPlot::dev.useRSGD(useRSGD = quickPlot::isRstudioServer()) ## TODO: temporary for Alex's testing
computeCanadaScratch <- file.path("~/scratch/LandWeb")
gitLocalPath <- if (pemisc::user("achubaty")) "~/GitHub/PredictiveEcology" else "~/GitHub"
activeDir <- if (dir.exists(computeCanadaScratch)) {
file.path("~/LandWeb")
} else if (pemisc::user("rstudio")) {
file.path("~/LandWeb")
} else {
file.path("~/GitHub/LandWeb")
}
ageClasses <- c("Young", "Immature", "Mature", "Old") ## LandWebUtils:::.ageClasses
ageClassCutOffs <- c(0, 40, 80, 120) ## LandWebUtils:::.ageClassCutOffs
batchMode <- if (pemisc::user("achubaty")) TRUE else FALSE ## NOTE: runName must be defined
cloudCacheFolderID <- "/folders/1b2h5hJlarNMkxdUyJLO5pPUwrQV8m626"
deleteSpeciesLayers <- FALSE
eventCaching <- c(".inputObjects", "init")
fireTimestep <- 1
mapParallel <- TRUE #getOption("Ncpus", parallel::detectCores() / 2)
maxAge <- 400
minFRI <- 25
postProcessOnly <- FALSE
rerunSpeciesLayers <- if (grepl("LandWeb", runName)) FALSE else TRUE
restartInterval <- 100
sppEquivCol <- "LandWeb"
successionTimestep <- 10
useCloudCache <- if (pemisc::user("emcintir")) TRUE else FALSE # only for simInitAndSpades
useDEoptim <- FALSE
usePOM <- if (pemisc::user("achubaty")) FALSE else FALSE ## NOTE: TO and FROM indices must be defined
useParallel <- 3 ## values > 2 use WAY too much RAM for very little speed increase (too much overhead!)
useSpades <- if (pemisc::user("emcintir")) TRUE else TRUE
vegLeadingProportion <- 0.8 # indicates what proportion the stand must be in one species group for it to be leading.
# If all are below this, then it is a "mixed" stand
################################################################################
reproducible::checkPath(activeDir, create = TRUE)
setwd(activeDir)