Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Smoothing

Smoothes An Array Along A Dimension


Description

Smoothes an array of any number of 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.

Author(s)

History:
0.1 - 2011-03 (V. Guemas, virginie.guemas@ic3.cat) - Original code
1.0 - 2013-09 (N. Manubens, nicolau.manubens@ic3.cat) - Formatting to R CRAN
1.1 - 2015-05 (N. Manubens, nicolau.manubens@bsc.es) - Adding security checks, fixing computation in cases where runmeanlen is odd and making it able to work on arrays of any number of dimensions.

Examples

# 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")

s2dverification

Set of Common Tools for Forecast Verification

v2.10.0
Apache License 2.0
Authors
BSC-CNS [aut, cph], Virginie Guemas [aut], Nicolau Manubens [aut], An-Chi Ho [ctb, cre], Nuria Perez-Zanon [ctb], Javier Garcia-Serrano [aut], Neven Fuckar [aut], Louis-Philippe Caron [aut], Omar Bellprat [aut], Luis Rodrigues [aut], Veronica Torralba [aut], Alasdair Hunter [aut], Chloe Prodhomme [aut], Martin Menegoz [aut], Domingo Manubens [ctb], Constantin Ardilouze [ctb], Lauriane Batte [ctb], Fabian Lienert [ctb], Julia Giner [ctb], Jean-Philippe Baudouin [ctb], Nube Gonzalez [ctb], Ludovic Auger [ctb], Nicola Cortesi [ctb], Eleftheria Exarchou [ctb], Ruben Cruz [ctb], Isabel Andreu-Burillo [ctb], Ramiro Saurral [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.