Learn R Programming

s2dverification (version 2.5.0)

Smoothing: Smoothes A Matrix Along A Dimension

Description

Smoothes a matrix of any number of dimensions up to 10 dimensions along one of its dimensions

Usage

Smoothing(var, runmeanlen = 12, numdimt = 4)

Arguments

var
Array to be smoothed along one of its dimension (typically the forecast time dimension).
runmeanlen
Running mean length in number of sampling units (typically months).
numdimt
Dimension to smooth.

Value

Array with same the dimensions as 'var' but smoothed along the 'numdimt'-th dimension.

Examples

Run this code
# Load sample data as in Load() example:
example(Load)
clim <- Clim(sampleData$mod, sampleData$obs)
ano_exp <- Ano(sampleData$mod, clim$clim_exp)
ano_obs <- Ano(sampleData$obs, clim$clim_obs)
runmean_months <- 12
dim_to_smooth <- 4  # Smooth along lead-times
smooth_ano_exp <- Smoothing(ano_exp, runmean_months, dim_to_smooth)
smooth_ano_obs <- Smoothing(ano_obs, runmean_months, dim_to_smooth)
PlotAno(smooth_ano_exp, smooth_ano_obs, startDates, 
        toptitle = "Smoothed Mediterranean mean SST", ytitle = "K",
        fileout = "tos_smoothed_ano.eps")

Run the code above in your browser using DataLab