loadCMIP5: Load CMIP5 data

Description Usage Arguments Value Note Examples

View source: R/loadCMIP5.R

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

1
2
3
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

Note

The yearRange parameter is intended to help users deal with large CMIP5 data files on memory-limited machines, e.g. by allowing them to process smaller chunks of such files.

FUN is limited to min, max, sum, and mean (the default), because the memory costs of keeping all ensembles in memory is too high. Be warned that min and max are quite slow!

Examples

1
2
3
4
## Not run: 
loadCMIP5(experiment='rcp85', variable='prc', model='GFDL-CM3', ensemble='r1i1p1')

## End(Not run)

Example output

NULL
Warning message:
In loadCMIP5(experiment = "rcp85", variable = "prc", model = "GFDL-CM3",  :
  Could not find any matching files

RCMIP5 documentation built on May 1, 2019, 6:28 p.m.