Learn R Programming

RCMIP5 (version 1.2.0)

loadCMIP5: Load CMIP5 data

Description

Loads CMIP5 data from disk. loadCMIP5 will return a unique model ensemble, or will apply a function across all ensemble members of a specified experiment-variable-model combination.

Usage

loadCMIP5(variable, model, experiment, ensemble = "[^_]+", domain = "[^_]+", path = ".", recursive = TRUE, verbose = FALSE, force.ncdf = FALSE, FUN = mean, yearRange = NULL, ZRange = NULL, loadAs = "data.frame")

Arguments

variable
CMIP5 variable to load (required)
model
CMIP5 model to load (required)
experiment
CMIP5 experiment to load (required)
ensemble
optional CMIP5 ensemble to load
domain
optional CMIP5 domain to load
path
root of directory tree
recursive
logical. Should we recurse into directories?
verbose
logical. Print info as we go?
force.ncdf
Force use of the less-desirable ncdf package for testing?
FUN
function. Function (mean, min, max, or sum) to apply across ensembles
yearRange
numeric of length 2. If supplied, load only years of data in this range
ZRange
numeric of length 2. If supplied, load only Z data within this range.
loadAs
a string identifying possible structures for values. Currently: 'data.frame' and 'array' the only valid options.

Value

A cmip5data object, or NULL if nothing loaded

Examples

Run this code
## Not run: 
# loadCMIP5(experiment='rcp85', variable='prc', model='GFDL-CM3', ensemble='r1i1p1')
# ## End(Not run)

Run the code above in your browser using DataLab