-
Notifications
You must be signed in to change notification settings - Fork 1
/
06-studyArea.R
34 lines (27 loc) · 877 Bytes
/
06-studyArea.R
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
## run module(s) to create study areas etc.
do.call(SpaDES.core::setPaths, paths1)
modules1 <- list("LandR_MPB_studyArea")
objects1 <- list()
parameters1 <- list(
MPB_SK_studyArea = list(
.plotInitialTime = NA
)
)
# Digest the code files
# mcf <- CacheDigest(moduleCodeFiles, quick = FALSE)$outputHash
simOutPreamble <- Cache(
simInitAndSpades,
times = list(start = 0, end = 1),
params = parameters1,
modules = modules1,
objects = objects1,
paths = paths1,
debug = 1,
omitArgs = c("debug", "paths"),
.cacheExtra = moduleCodeFiles(paths1, modules1) # new fn in SpaDES.core (>= 1.0.8.9004)
#useCache = "overwrite", ## TODO: remove this workaround
#useCloud = useCloudCache,
#cloudFolderID = cloudCacheFolderID
)
fsimOutPreamble <- file.path(Paths$outputPath, "ml_preamble.rds")
saveSimList(simOutPreamble, fsimOutPreamble, fileBackend = 2)