DSensemble | R Documentation |
Downscales an ensemble of climate model runs, e.g. CMIP5, taking the results to be seasonal climate statistics. For temperature, the result hold the seasonal mean and standard deviation, whereas for precipitation, the results hold the wet-day mean, the wet-day frequency, and the wet/dry-spell statistics. The call assumes that netCDF files containing the climate model ensemble runs are stores in a file structure, linked to the path argument and the rcp argument.
DSensemble(y, ...)
y |
A station object. |
... |
additional arguments |
plot |
Plot intermediate results if TRUE. |
path |
The path where the GCM results are stored. |
rcp |
Which (RCP) scenario |
biascorrect |
TRUE, apply a bias adjustment using |
predictor |
The predictor, a field or EOF object |
non.stationarity.check |
If TRUE perform stationarity test - work in progress |
ip |
Which EOFs to include in the step-wise multiple regression. |
rmtrend |
TRUE: detrend before calibrating the regression model. |
lon |
Longitude range for predictor |
lat |
Latitude range for predictor |
rel.cord |
TRUE: use the range relative to predictand; FALSE use absolute range |
it |
Used to extract months or a time period. See |
select |
GCMs to select, e.g .subsample the ensemble (1:3 selects the three first GCMs) |
FUN |
Function for aggregating the predictand (daily), e.g. 'mean', 'wetmean' |
threshold |
Used together with FUN for some functions ('wetmean'). |
nmin |
Minimum number of day used in |
FUNX |
Function for transforming the predictor, e.g.
' |
type |
Type of netCDF used in |
pattern |
File name pattern for GCM data. |
verbose |
TRUE for checking and debugging the functions. |
file.ds |
Name of file saving the results. |
path.ds |
Path of file saving the results. |
xfuns |
Names of functions which do not work in |
mask |
TRUE mask out land |
ds.interval |
Default set to NULL, otherwise set the time period for downscaling, e.g. c(1950,2100) |
These methods are based on DS
, and DSensemble
is
designed to make a number of checks and evaluations in addition to
performing the DS on an ensemble of models. It is based on a similar
philosophy as the old R-package 'clim.pact
', but there is a new
default way of handling the predictors. In order to attempt to ensure a
degree of consistency between the downscaled results and those of the GCMs,
a fist covariate is introduced before the principal components (PCs)
describing the EOFs
.
DSensemble.pca
is used to downscale a predictor represented in terms
of PCA, and can reduce the computation time significantly. See Benestad et
al. (2015) http://dx.doi.org/10.3402/tellusa.v67.28326.
The argument non.stationarity.check
is used to conduct an additional
test, taking the GCM results as 'pseudo-reality' where the predictand is
replaced by GCM results interpolated to the same location as the provided
predictand. The time series with interpolated values are then used as
predictor in calibrating the model, and used to predict future values. This
set of prediction is then compared with the interpolated value itself to see
if the dependency between the large and small scales in the model world is
non-stationary.
Other chekch include cross-validation (crossval
) and
diagnostics comparing the sample of ensemble results with the observations:
number of observations outside the predicted 90-percent conf. int and
comparing trends for the past.
The 'bias correction' is described in Imbert and Benestad (2005), Theor. Appl. Clim. http://dx.doi.org/10.1007/s00704-005-0133-4.
A 'dsensembele' object - a list object holding DS-results.
## Not run:
# Import historical temperature data from Oslo
data(Oslo)
## Download NorESM1-M from 'climexp.knmi.nl' in default directory
## (home directory for linux/mac users)
url <-"http://climexp.knmi.nl/CMIP5/monthly/tas"
## Download NorESM1-ME for the emission scenario RCP4.5
noresm <- "tas_Amon_NorESM1-M_rcp45_000.nc"
if (!file.exists(noresm)) {
download.file(url=file.path(url,noresm), destfile=noresm,
method="auto", quiet=FALSE, mode="w", cacheOK=TRUE)
}
## Download FIO-ESM for the emission scenario RCP4.5
fioesm <- "tas_Amon_FIO-ESM_rcp45_000.nc"
if (!file.exists(fioesm)) {
download.file(url=file.path(url,fioesm), destfile=fioesm,
method="auto", quiet=FALSE, mode="w", cacheOK=TRUE)
}
## Downscale the predictor (ERA-interim reanalysis 2m temperature)
predictor <- "air.2m.mon.mean.nc"
if (!file.exists(predictor)) {
url <-"http://climexp.knmi.nl/ERA-interim/erai_t2m.nc"
download.file(url=url, destfile=predictor,
method="auto", quiet=FALSE, mode="w", cacheOK=TRUE)
}
# Downscale the temperature in Oslo
rcp4.5 <- DSensemble.t2m(Oslo, path='~', rcp='', pattern="tas_Amon_",
biascorrect=TRUE, predictor = predictor,
plot=TRUE, verbose=TRUE)
## Evaluation:
## (1) combare the past trend with downscaled trends for same
## interval by ranking and by fitting a Gaussian to the model ensemble;
## (2) estimate the probability for the counts outside the 90
## percent confidence interval according to a binomial distribution.
diagnose(rcp4.5, plot = TRUE, type = "target")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.