Skip to content

Commit

Permalink
AndisonDriver needs fixing. No more global
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmseddy committed Dec 18, 2018
1 parent 2a538e3 commit 155ef1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 107 deletions.
7 changes: 2 additions & 5 deletions modules/andisonDriver_dataPrep/andisonDriver_dataPrep.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Init <- function(sim) {
dPath <- dataPath(sim)
cacheTags = c(currentModule(sim), "function:.inputObjects")

if (!suppliedElsewhere("studyArea0", sim)) {
if (!suppliedElsewhere("studyArea", sim)) {
message("study area not supplied. Using Ecodistrict 348")

#source shapefile from ecodistict in input folder. Use ecodistrict 348
Expand All @@ -76,7 +76,7 @@ Init <- function(sim) {
destinationPath = file.path(dPath, "ecodistricts_shp", "Ecodistricts"))

SA <- SA[SA$ECODISTRIC == 348, ]
sim$studyArea0 <- SA
sim$studyArea <- SA
}

if (!suppliedElsewhere("AndisonFRI", sim)) {
Expand All @@ -96,9 +96,6 @@ Init <- function(sim) {
dissolve = TRUE)
}
}
##workaround. This forces studyArea to be Andison shapefile
sim$AndisonFRI <- spTransform(sim$AndisonFRI, CRSobj = crs(sim$studyArea0))
sim$studyArea <- crop(sim$AndisonFRI, y = sim$studyArea0)

if (!suppliedElsewhere("rasterToMatch", sim)) {
rasterToMatch <- pemisc::prepInputsLCC(year = 2005,
Expand Down
102 changes: 0 additions & 102 deletions scfm_IansGlobal.R

This file was deleted.

0 comments on commit 155ef1a

Please sign in to comment.