inla.climate: An INLA climate forcing model for global mean surface...

View source: R/inla.climate.R

inla.climateR Documentation

An INLA climate forcing model for global mean surface temperature

Description

Fits forcing data to a given temperature dataset using INLA. The undocumented forcing variables not included in forcing are collectively assumed a stochastic fGn process. Also uses Monte Carlo simulations to obtain Bayesian inference about the transient climate response.

Usage

inla.climate(data, forcing, Qco2 = NULL,compute.mu=NULL, stepLength = 0.01, restart.inla = FALSE, m = 4, model = "fgn", formula=NULL, print.progress = FALSE,
   inla.options = list(),
   tcr.options = list(),
   mu.options = list(),
   ar1.options = list())

Arguments

data

Global mean surface temperature. Must be a numeric vector (for now).

forcing

The documented forcing data as a sum of all contributive forcing variables. Must be a numeric vector.

Qco2

Qco2 The slope of the forcing when assuming a CO2 doubling in the future. Used for computing the transient climate response. Qco2 = NULL will skip the transient climate response sampling procedure.

compute.mu

Decides if and how the forcing temperature response should be explicitly computed. Doing so will significantly increase runtime. If method compute.mu=1 is chosen, the samples will not be stored and the quantiles will not be computed. If compute.mu=2 is chosen, full Bayesian inference is returned. Method 2 requires significantly more memory.

stepLength

Numerical value which sets the steplength for the numerical scheme within INLA. A poor convergence can sometimes be improved by adjusting this.

restart.inla

Boolean variable indicating whether INLA should restart at the solution found from the first convergence of the Newton-Rhapson algorithm. This can sometimes improve convergence.

m

m The number of AR(1) processes used in the fGn approximation. I recommend having at least four (up to six, depending on model and lagmax). The model will perform slower, but more accurately if this is increased.

model

The model used to describe stochastic forcing. For long memory responses the fractional Gaussian noise (model="fgn") and ARFIMA(0,d,0) (model="arfima") are supported. The first-order autoregressive model (model="ar1") is also supported.

formula

The formula for the additive predictor. If formula=NULL the default option of forced and unforced temperature response, with no additional trend is selected.

print.progress

Prints progression if TRUE.

inla.options

A list of options for the R-INLA fitting procedure. See control.inla, control.compute, control.family and control.predictor for detailed description of options. There are, however, some default values that has been overridden in INLA.climate: num.threads = 1, control.compute\$dic = TRUE if there are no NA values in data, control.compute\$config = TRUE, control.inla\$reordering = "metis", control.family\$hyper\$prec\$initial = 12, control.family\$hyper\$prec\$fixed = TRUE

tcr.options

A list of options for the transient climate response sampling procedure. The following options can be set: nsamples denotes the number of Monte Carlo simulations used to estimate the TCR. Default value is 100000. seed is used as initial input for the random number generator. Default value is 1234.

mu.options

A list of options for the forcing response sampling procedure. The following options can be set: full.Bayesian is a boolean variable that indicates if full Bayesian inference is to be computed. If TRUE, all samples for each point in time is stored. This will increase runtime and memory consumption considerably. If FALSE, only the posterior mean and standard deviation for each point is computed. Default value is FALSE. nsamples denotes the number of Monte Carlo simulations used to estimate the forcing response. Default value is 100000. seed is used as initial input for the random number generator. Default value is 1234.

ar1.options

A list of options for the AR(1) weights and parameter evaluation. The following options can be set: nsamples denotes the number of Monte Carlo simulations used to estimate the forcing response. Default value is 100000. seed is used as initial input for the random number generator. Default value is 1234.

Details

If length(data)>length(forcing) or data contains NA values the missing values will be predicted using inla. For return value results, a summary can be displayed using summary.inla.climate(results).

Value

inla.result

An object of class "inla" returned by the inla-function. See inla for more details.

hyperparam

A list containing the marginal posterior distribution, its mean, standard deviation and the 0.025, 0.5 and 0.975 quantiles of each hyperparameters.

latent.field

This list contains the marginal posterior mean, standard deviation and the 0.025, 0.5 and 0.975 quantiles of the latent Gaussian variables fitted to the data and the underlying AR(1) components. Also includes predictions if there are any.

time

Time spent for convergence. time$fGn gives the time spent fitting the temperature to an fGn, time$TCR gives the time spent doing the Monte Carlo sampling for the transient climate response and time$total gives total time elapsed time for the inla.climate function.

TCR

A list containing the mean, standard deviation and 0.025, 0.5 and 0.975 quantiles obtained from the transient climate response simulation procedure. TCR$samples gives a list of the Monte Carlo samples for the TCR and the hyperparameters.

misc

A list containing the call of the inla.climate function, as well as the input variables data, forcing, C, m, model, and the options set for the INLA procedure and, if they are computed, the TCR and forcing response sampling schemes. It also includes the value for the constant term $T_0$, defined by the mean of the 20 first values of y.

log.mlikelihood

The log marginal-likelihood of the fit obtained by INLA.

dic

The Deviance Information Criterion (DIC) for the fit, obtained by INLA.

Author(s)

Eirik Myrvoll-Nilsen eirik.myrvoll-nilsen@uit.no

See Also

inla,inla.climate.mu

Examples

if(require("INLA",quietly=TRUE)){
  data(GISS_E2_R)
  result.climate <- inla.climate(data=GISS_E2_R$Temperature,forcing=GISS_E2_R$Forcing)
  summary(result.climate)
  }

eirikmn/INLA.climate documentation built on Feb. 6, 2023, 11:41 a.m.