getData: Get validation data object for further analysis

Description Usage Arguments Value Examples

View source: R/getData.R

Description

Get validation data object for further analysis

Usage

1
2
3
4
getData(obsFile, simFiles, locations, simOrigins = rep("0000-12-30",
  length(simFiles)), simVars = rep("OUT_DISCHARGE", length(simFiles)),
  simSkips = rep(0, length(simFiles)), obsOrigin = "1806-01-01",
  obsVar = "dis", attVars = "all")

Arguments

obsFile

Path to the observation file.

simFiles

Path to the simulation file(s). This can also be an empty vector.

locations

List of station locations containing lon/lat values in a vector.

simOrigins

Date origin of the simulation(s). A value per simulation file is required. Defaults to VIC origin.

simVars

Variable name of the simulation(s) to retreive. A value per simulation file is required. Defaults to VIC discharge variable.

simSkips

Number of months to skip for the simulation(s). A value per simulation file is required. Defaults to 0.

obsOrigin

Date origin of the observations.

obsVar

Variable name of the observations to retreive.

attVars

Variable name of attribute(s) to retrieve. If "all" is used, all attributes are retrieved. A variable is recognized as an attribute if it has only lon & lat dimensions (characters can have three dimensions to form strings).

Value

An object containing values for nloc, nsim, ntime, time, observations, simulations and the requested attributes

Examples

1
2
3
4
5
obsFile = system.file("data", "obsSampleRhine.nc", package = "dischargeValidation", mustWork = T)
simFiles = system.file("data", "simSampleRhine.nc", package = "dischargeValidation", mustWork = T)
locations = getLocationsFromBoundingBox(obsFile = obsFile, boundingBox = c(6.75,10.25,47.75,51.25))

data = getData(obsFile = obsFile, simFiles = simFiles, location = locations[1:4])

BramDr/dischargeValidation documentation built on Sept. 3, 2019, 1:57 p.m.