getClimTS: Get time series of climate means from CESM history files

Description Usage Arguments Details Value Author(s)

View source: R/getClimTS.R

Description

Get climate means from CESM history files for the requested components through recursive calling to NCO command ncra. All variables in the original files are included in the temporal means.

Usage

1
2
getClimTS(tlimStr = NULL, DOUT_S_ROOT, CASE, by = "year", allowNA = TRUE,
             comps = NULL, loop = NULL, overwrite = FALSE, compvars = NULL)

Arguments

tlimStr

CHARACTER, [2], close,open interval [tlimyStr) representing the time-window for the model climatic averages. The format is AAAA-MM-DD HH:MM:SS. NULL will result in climatic TS over all available files in input folders

DOUT_S_ROOT

CHARACTER, [m], path to model data storage for IO, as defined in CESM documentation. It is assumed that input NetCDF files are given on a monthly basis, and that for each 'im' ensemble member and $com component, they are stored in $DOUT_S_ROOT[im]/$com/hist. Out is then at $DOUT_S_ROOT[im]/$com/post, unles loop below is not null

CASE

CHARACTER, [m], as defined in CESM documentation

by

CHARACTER or REAL, increment of the sequence, given as input to seq.POSIXt function. See details.

allowNA

LOGICAL, whether it is allowed that some ensemble members are not present

comps

CHARACTER, [>=1], vector of model components to be analysed, in: ["atm", "ice", "lnd", "ocn", "rof"]

loop

CHARACTER, if not NULL, output for each component $com will be stored in subfolder '$DOUT_S_ROOT[im]/$com/post/$loop'

overwrite

LOGICAL, if FALSE, only non existing output fiels will be recalculated

compvars

named LIST, OPTIONAL, with each named element matching one of those above in code. If not NULL each element is a CHARACTER vector with the names of variables to be kept in the mean output files

Details

If comps is NULL, all components shown above are obtained. This function is a wrapper around the NCO command ncra. See the by argument in seq.POSIXt for specification details. The default is to create annual time series. For example, by="3 months" makes a seasonal time series, or by="10 years" makes a decadal time series.

Value

Writes a series of netCDF files of climatic averages, out of CESM history files.

Author(s)

Javier Garcia-Pintado


garciapintado/rdafCESM documentation built on July 18, 2019, 4:41 p.m.