x. The default statistic is weighted.mean,
but any summary function that returns a numeric result can be used.
makeGlobalStat(x, area = NULL, verbose = FALSE, sortData = FALSE, FUN = cmip5.weighted.mean, ...)cmip5data objectcmip5data objectx and area before computing?FUNcmip5data object, in which the val dimensions are the
same as the caller for Z (if present) and time, but lon and lat are reduced to
1 (i.e. no dimensionality). A numCells field is also added, recording the number
of cells in the spatial grid.
weighted.mean function doesn't
work well for CMIP5 data, and so cmip5.weighted.mean is used as a default
function. Any other user-supplied stat function must
follow the weighted.mean syntax, in particular accepting parameters 'x'
(data) and 'w' (weights) of equal size, as well as dots(...).
makeAnnualStat makeZStat makeMonthlyStat cmip5.weighted.mean
d <- cmip5data(1970:1975) # sample data
makeGlobalStat(d)
summary(makeGlobalStat(d))
Run the code above in your browser using DataLab