% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CST_WeightIndex.R
\name{CST_WeightIndex}
\alias{CST_WeightIndex}
\title{Computing the weights for SFSs using the Best Index PDFs
of a CSTools object}
\usage{
CST_WeightIndex(index_exp, pdf_exp)
}
\arguments{
\item{index_exp}{An object of the class 's2dv_cube' containing the indices
or drivers of climate variability (as e.g., the North Atlantic Oscillation
(NAO)) estimate from SFSs.
The index_exp object is expected to have an element named \code{$data}
with dimensions (time, dataset, member, season).}

\item{pdf_exp}{An object of the class 's2dv_cube' containing the statistics
which define a Gaussian PDFs for weighting the values estimate for the SFS
ensemble members.
The pdf_exp object is expected to have an element named \code{$data}
with dimensions (time, statistic = 2, season).
The firt statistic is the parameter 'mean' of the PDFs and
the second statistic is the parameter 'standard deviation' of the PDFs.}
}
\value{
CST_WeightIndex() returns a CSTools object (i.e., of the
class 's2dv_cube').
This object has at least an element named \code{$data}
with dimensions (time, dataset, member, season).
}
\description{
This function implements the computation to obtain the
normalized weights for SFS members using the Best Index estimation and
accepts a CSTools object (an object of the class 's2dv_cube') as input.
}
\examples{
index_exp <- 1 : (5 * 3 * 7 * 4)
dim(index_exp) <- c(time = 5, dataset = 3, member = 7, season = 4)
index_exp <- list(data = index_exp)
pdf_exp <- 1 : (5 * 2 * 4)
dim(pdf_exp) <- c(time = 5, statistic = 2, season = 4)
pdf_exp <- list(data = pdf_exp)
class(index_exp) <- 's2dv_cube'
class(pdf_exp) <- 's2dv_cube'
res_CST <- CST_WeightIndex(index_exp, pdf_exp)
dim(res_CST$data)
#time   dataset member  season
# 5         3        7       4
}
\references{
Regionally improved seasonal forecast of precipitation through
Best estimation of winter NAO, Sanchez-Garcia, E. et al.,
Adv. Sci. Res., 16, 165174, 2019, https://doi.org/10.5194/asr-16-165-2019
}
\author{
Eroteida Sanchez-Garcia - AEMET, \email{esanchezg@aemet.es}
}
