Learn R Programming

ncdf.tools (version 0.7.1.295)

transNcdfMerge: Merge several netCDF files

Description

transNcdfMerge is a convenience wrapper around cdo to merge several netCDF files containing subsequent time steps into one continuous file.

Usage

transNcdfMerge(file.names, name.change = function(x) return(x), time.diff = NULL, fun.start = NULL, fun.end = NULL, time.range.out = c(), format = "%Y%m", convert = function(x) chron(paste(x, "15", sep = ""), format = "ymd", out.format = "d-m-y"), path.target = getwd(), target.name = "")

Arguments

file.names
character vector: names of the files to merge.
name.change
time.diff
maximum time difference to be allowed between two subsequent input files.
fun.start
function: function to retrieve the start date from the file name e.g. function(x) substr(x, nchar(x)-15, nchar(x)-10)
fun.end
see fun.start
time.range.out
POSIXct vector: (start date, end date): start and end dates of the final file. If not supplied, all available data are used.
format
character string: see ?transNcdfCutFile
convert
path.target
file path: path where to copy to the results files.
target.name

Value