Computes the accumulation of the given variable over time. The resulting outfile has the same dimensions as the infile.
timcumsum(
var,
infile,
outfile,
nc34 = 4,
overwrite = FALSE,
na_replace = "mean",
verbose = FALSE,
nc = NULL
)
Name of variable in infile (character).
Character containing file name or path of input file.
Character containing file name or path of output file. If NULL, the input file is directly edited instead.
NetCDF version of output file. If nc34 = 3
the output
file will be in NetCDFv3 format (numeric). Default output is NetCDFv4.
Logical; should existing output file be overwritten? If outfile is NULL, this parameter is ignored.
Replacing NA values with either 'mean' or 'previous' for monthly mean or previous value, respectively (character).
logical; if TRUE, progress messages are shown
Alternatively to infile
you can specify the input as an
object of class ncdf4
(as returned from ncdf4::nc_open
).