insol_ts: Computes time-series of precession and obliquity

View source: R/main_interface.R

insol_tsR Documentation

Computes time-series of precession and obliquity

Usage

insol_ts(times, Astro)

Arguments

times
Astro

Examples

##---- 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)
  }

mcrucifix/iceages documentation built on Jan. 11, 2023, 9:17 p.m.