makeMonthlyStat: Compute monthly statistic of a variable
Description
We frequently want to summarize CMIP5 data by month, e.g. to understand how
air temperature varies over the year for a particular data range. This function
does that for monthly data. The default statistic is mean, but any
summary function that returns a numeric result can be used.
A cmip5data object, whose val field is the monthly
mean of the variable. A numYears field is also added
recording the number of years averaged for each month.
Details
The stat function is calculated for all combinations of lon,
lat, and Z (if present).