This function prepares gridded data for use with other metis modules.

metis.prepGrid(
  demeterFolders = NULL,
  demeterScenarios = NULL,
  demeterTimesteps = seq(from = 2005, to = 2100, by = 5),
  demeterUnits = NULL,
  demeterAggType = "depth",
  tethysFolders = NULL,
  tethysScenarios = NULL,
  tethysUnits = NULL,
  tethysFiles = c("wddom", "wdelec", "wdirr", "wdliv", "wdmfg", "wdmin", "wdnonag",
    "wdtotal"),
  xanthosFiles = NULL,
  xanthosScenarios = NULL,
  xanthosScenarioAssign = NULL,
  xanthosCoordinatesPath = NULL,
  xanthosGridAreaHecsPath = NULL,
  tethysFilesScarcity = NULL,
  xanthosFilesScarcity = NULL,
  spanLowess = 0.25,
  popFolder = NULL,
  popFiles = NULL,
  biaFolder = NULL,
  biaFiles = NULL,
  downscaleFolder = NULL,
  downscaleFiles = NULL,
  popUnits = NULL,
  dirOutputs = paste(getwd(), "/outputs", sep = ""),
  folderName = NULL,
  saveFormat = "rds",
  filterYears = NULL,
  diagnosticsOn = F
)

Arguments

demeterFolders

Full path to demeter outputs

demeterScenarios

Name of demeter scenario

demeterTimesteps

Default is seq(from=2005,to=2100,by=5)

demeterUnits

No Default

demeterAggType

Default is "depth" which goes with fraction. If sqkm then use "vol".

tethysFolders

Folder for tethys results

tethysScenarios

Scenario name for tethys run

tethysUnits

No Default

tethysFiles

Default =c("wddom","wdelec","wdirr","wdliv","wdmfg","wdmin","wdnonag","wdtotal"),

xanthosFiles

Xanthos Files to Read

xanthosScenarios

Default=NULL,

xanthosScenarioAssign

Default NULL. Scenario name if testing single scenario.

xanthosCoordinatesPath

paste(getwd(),"/dataFiles/grids/xanthosCoords/coordinates.csv",sep="")

xanthosGridAreaHecsPath

=paste(getwd(),"/dataFiles/grids/xanthosRunsChris/reference/Grid_Areas_ID.csv",sep=""),

tethysFilesScarcity

Default=NULL,

xanthosFilesScarcity

Default=NULL,

spanLowess

Default = 0.25

popFolder

Default = <-paste(getwd(),"/dataFiles/grids/griddedIDsPop/",sep="")

popFiles

Default = <-"grid_pop_map"

biaFolder

Default = <-paste(getwd(),"/dataFiles/grids/griddedIDsbia/",sep="")

biaFiles

Default = <-"grid_bia_map"

downscaleFolder

Default = <-paste(getwd(),"/dataFiles/grids/griddedIDsbia/",sep="")

downscaleFiles

Default = <-"grid_bia_map"

popUnits

Default = <-"person"

dirOutputs

Default =paste(getwd(),"/outputs",sep=""),

folderName

Default=NULL

saveFormat

Default="rds". Choose between "rds" (Native R much faster) or "csv" or "both".

filterYears

Default=seq(1980,2100,by=5)

diagnosticsOn

Default =F

Value

A table with data by polygon ID for each shapefile provided