CDO: System call of the cdo binary.

Description Usage Arguments Details Examples

View source: R/CDO.R

Description

System call of the cdo binary.

Usage

1
CDO(..., sep = "", debug = FALSE)

Arguments

...

one or more arguments of type string, which can be concatenated using the paste function (e.g. '-yseasmean', '-fldmean'). Additionally, parameter for the system function can be passed, e.g., intern = TRUE to capture the output of the cdo command.

sep

character used to seperate the terms. Used in the paste function.

debug

print cdo command before execution and call cdo without '-s' argument.

Details

The behaviour of some cdo commands is control by environment variables. These need to defined prior to the CDO call using Sys.setenv(...), e.g, Sys.setenv('CDO_WEIGHT_MODE' = 'off')

Examples

1
2
3
     infile <- "~/data/u_50hPa_era40_DJF.grb"
     tmpfile <- tempfile()
     CDO('-fldmean -selyear,1980/1990',infile,tmpfile,sep=' ')

smu/smumisc documentation built on March 21, 2021, 3:38 a.m.