mergeData {CityWaterBalance}R Documentation

Merge data sources into input for CityWaterBalance

Description

This function converts units and merges data needed by CityWaterBalance. All inputs must represent the same time intervals. Outputs are fluxes (mm/month) over study area.

Usage

mergeData(area, atm, inflow, outflow, wu, ws_imports = NULL,
  etc_imports = NULL, wweff = NULL, dgr = NULL, cso = NULL,
  runoff = NULL, baseflow = NULL)

Arguments

area

numeric study area (sq km)

atm

xts of atmospheric data, from getAtmoFlows (mm/month)

inflow

xts of daily streamflow into area (cfs)

outflow

xts of daily streamflow out of area (cfs)

wu

xts of water use, from combineWaterUse (MGal/month)

ws_imports

xts of imports for water supply (MGal/month)

etc_imports

xts of other imports to surface water (MGal/month)

wweff

xts of wastewater effluent (MGD)

dgr

xts of deep groundwater recharge (mm/month)

cso

xts of cso events (mm/month)

runoff

xts of runoff (mm/month)

baseflow

xts of baseflow (mm/month)

Value

all fluxes (as xts) for each timestep (mm/month)

Examples

## Not run: 
start <- "2010-01-01"
end <- "2010-12-31"
area <- 2707
atm <- getAtmoFlows(start, end, 'sample:Counties', 'STATE', 'RI', 41.5801)
inflow <- getStreamflow(start, end, c("01112500"))
inflow <- combineStreamflow(inflow, c(1))
outflow <- getStreamflow(start, end, c("01113895", "01114000", "01117000",
"01118500"))
outflow <- combineStreamflow(outflow, c(1, 1, 1, 1))
wu <- getWaterUse(c('RI'), 'ALL')
wu <- combineWaterUse(start, end, wu)
data <- mergeData(area, atm, inflow, outflow, wu)

## End(Not run)

[Package CityWaterBalance version 0.1.0 Index]