# NOT RUN {
## loading EmiStatR
library("EmiStatR")
showClass("input")
## running EmiStatR with user defined input
data("Esch_Sure2010")
P1 <- Esch_Sure2010[1:1000,] # selecting just the first 1,000 rows
station <- "Esch-sur-Sure"
# defining estructures E1
E1 <- list(id = 1, ns = "FBH Goesdorf", nm = "Goesdorf", nc = "Obersauer", numc = 1,
use = "R/I", Atotal = 36, Aimp = 25.2, Cimp = 0.80, Cper = 0.30,
tfS = 1, pe = 650, Qd = 5,
Dd = 0.15, Cd = 0.18, V = 190, lev.ini = 0.10,
lev2vol = list(lev = c(.06, 1.10, 1.30, 3.30),
vol = c(0.5, 31, 45, 190))
)
# defining Input objet
input.user <- input(spatial = 0, zero = 1e-5, folder = getwd(),
cores = 1,
ww = list(qs = 150, CODs = 104, NH4s = 4.7),
inf = list(qf= 0.04, CODf = 0, NH4f =0),
rw = list(CODr = 0, NH4r = 0, stat = station),
P1 = P1, st = list(E1=E1), export = 0)
str(input.user)
# invoking EmiStatR
sim <- EmiStatR(input.user)
## a visualisation example
dev.new()
par(mfrow=c(2,2), oma = c(0,0,2,0))
plot(x=sim[[1]][[1]][[2]], y=sim[[1]][[1]][[3]], typ="l", col="blue",
xlab = "time", ylab = colnames(sim[[1]][[1]])[3], main = "Precipitation")
plot(x=sim[[1]][[1]][[2]], y=sim[[1]][[1]][[10]], typ="l", col="blue",
xlab = "time", ylab = colnames(sim[[1]][[1]])[10], main = "CSO, volume")
plot(x=sim[[1]][[1]][[2]], y=sim[[1]][[1]][[13]], typ="l", col="blue",
xlab = "time", ylab = colnames(sim[[1]][[1]])[13], main = "CSO, COD concentration")
plot(x=sim[[1]][[1]][[2]], y=sim[[1]][[1]][[14]], typ="l", col="blue",
xlab = "time", ylab = colnames(sim[[1]][[1]])[14], main = "CSO, NH4 concentration")
mtext(paste("Structure", sim[[1]][[3]][[1]]), outer=TRUE, cex = 1.5)
# }
Run the code above in your browser using DataLab