ensmean: Compute (multi-model) ensemble means

Description Usage Arguments Examples

View source: R/ensmean.R

Description

This function computes the (unweighted) ensemble mean for an initial condition ensemble or a multi-model ensemble on the assumption that the input of class NetCDF is a 3d or 4d array with the first dimension reflective of models and the second dimension containing runs (in the 4d case).

Usage

1
ensmean(x, multimodel = FALSE, na.rm = F)

Arguments

x

input array of class 'NetCDF'

multimodel

logical, should first dimension (models) be averaged?

na.rm

logical, should missing values be removed (only for multi)

Examples

1
2
3
4
xtmp <- array(1:5, c(5,3,1,1))
class(xtmp) <- 'NetCDF'
ensmean(xtmp)[,1,1]
ensmean(ensmean(xtmp), multimodel=TRUE)[,1]

jonasbhend/geoutils documentation built on May 19, 2019, 7:27 p.m.