View source: R/simulate_data.R
| SimStepData | R Documentation |
SimStepData takes physical parameters of a k-box model and simulates
the first n years of its response to an abrupt 4xCO2 forcing.
SimStepData(gamma, C, kappa, epsilon, sigma_eta, sigma_xi, F_4xCO2, n)
gamma |
stochastic forcing correlation parameter. |
C |
vector of box heat capacities. |
kappa |
vector of heat transfer coefficients. |
epsilon |
deep ocean heat uptake efficacy factor. |
sigma_eta |
stochastic forcing standard deviation parameter. |
sigma_xi |
standard deviation of stochastic temperature disturbances. |
F_4xCO2 |
effective radiative forcing due to CO2 quadrupling. |
n |
length of simulation in years. |
SimStepData returns a matrix with two rows containing time
series of global mean surface temperature and top-of-the-atmosphere net
downward radiative flux respectively.
BuildMatrices, FitKalman.
# set physical parameters
parameters <- list(
gamma = 2.2,
C = c(7.0, 80.0),
kappa = c(1.2, 0.75),
epsilon = 1.2,
sigma_eta = 0.54,
sigma_xi = 0.72,
F_4xCO2 = 7.4,
n = 150
)
# simulate step response
step <- with(parameters, {
SimStepData(gamma, C, kappa, epsilon, sigma_eta, sigma_xi, F_4xCO2, n)
})
# plot results
plot.ts(t(step), main = "Simulated Step Response")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.