makeAnnualStat: Compute annual statistic of a variable
Description
Most CMIP5 data are monthly, and we frequently want to summarize these to annual
numbers. This function does that (although annual files also occur, and will be
handled as well). The default statistic is mean, but any summary
function that returns a numeric result can be used.
Usage
makeAnnualStat(x, verbose = FALSE, FUN = mean, ...)
A cmip5data object, whose val field is the annual
mean of the variable. A numMonths field is also added
recording the number of months averaged for each year.
Details
The stat function is calculated for all combinations of lon,
lat, and Z (if present).