View source: R/main_interface.R
insol_ts | R Documentation |
insol_ts(times, Astro)
times |
|
Astro |
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (times, Astro)
{
N = length(times)
pre = rep(0, N)
forcing = as.numeric(rep(0, 3))
dforcingdt = as.numeric(rep(0, 3))
cpre = obl = pre
for (i in seq(along = times)) {
INSOL = .Fortran("astro", Astro$nap, Astro$nao, as.numeric(times[i]),
Astro$amppre, Astro$omepre, Astro$angpre, Astro$ampobl,
Astro$omeobl, Astro$angobl, forcing = forcing, dforcingdt = dforcingdt,
DUP = FALSE)
pre[i] <- INSOL$forcing[1]
cpre[i] <- INSOL$forcing[2]
obl[i] <- INSOL$forcing[3]
}
list(pre = pre, cpre = cpre, obl = obl)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.