SignalNoiseRatio {s2dv}R Documentation

Calculate Signal-to-noise ratio

Description

This function computes the signal-to-noise ratio, where the signal is the ensemble mean variance and the noise is the variance of the ensemble members about the ensemble mean (Eade et al., 2014; Scaife and Smith, 2018).

Usage

SignalNoiseRatio(
  data,
  time_dim = "year",
  member_dim = "member",
  na.rm = FALSE,
  ncores = NULL
)

Arguments

data

A numerical array with, at least, 'time_dim' and 'member_dim' dimensions.

time_dim

A character string indicating the name of the time dimension in 'data'. The default value is 'year'.

member_dim

A character string indicating the name of the member dimension in 'data'. The default value is 'member'.

na.rm

A logical value indicating whether to remove NA values during the computation. The default value is FALSE.

ncores

An integer indicating the number of cores to use for parallel computation. The default value is NULL.

Value

An array with of the signal-to-noise ratio. It has the same dimensions as 'data' except 'time_dim' and 'member_dim' dimensions.

Examples

exp <- array(data = runif(600), dim = c(year = 15, member = 10, lat = 2, lon = 2))
SignalNoiseRatio(exp)


[Package s2dv version 2.0.0 Index]