x_fit: Decomposition of simulated time series into natural and...

View source: R/x_fit.R

x_fitR Documentation

Decomposition of simulated time series into natural and anthropogenic responses

Description

x_fit fits a Generalized Additive Model (GAM, see equation 7 in Qasmi and Ribes, 2021) to each climate model ensemble mean to estimate the natural and anthropogenic responses. For each response, an ensemble of realisations is returned accounting for uncertainty related to internal variability.

Usage

x_fit(Xd, Enat, x_df, Sigma = NULL, Nres = NULL, ant = T)

Arguments

Xd

a 2-D array of dimension [length(year),length(model)] containing the time series associated with the model ensemble means. The first dimension has the time series of years, year, as names. The second dimension, model, must be a vector containing the names of all models.

Enat

a 2-D array of dimension [length(year),Nres] containing the response to natural forcings.

x_df

the number of degrees of freedom for the smoothing by splines

Sigma

the optional covariance matrix accounting for uncertainty in internal variability

Nres

the number of realisations in the gaussian sample of Enat if Sigma is provided

ant

a logical value indicating whether the anthropogenic response should be returned

Value

a 3-D array of dimension [length(year), length(forcing), length(model)] (or 4-D if Sigma is provided), containing the response to several forcings. forcing is a character vector containing the types of external forcing: nat for natural, all for all forcings, ant for anthropogenic (if flagged at the function call). A best-estimate is provided with Nres realisations sampling uncertainty in each model .


saidqasmi/KCC documentation built on July 8, 2022, 6:02 a.m.