% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CST_PDFBest.R
\name{CST_PDFBest}
\alias{CST_PDFBest}
\title{Computing the Best Index PDFs combining Index PDFs from two SFSs
of a CSTools object.}
\usage{
CST_PDFBest(pdf_exp, bc_dataset1 = TRUE, bc_dataset2 = TRUE)
}
\arguments{
\item{pdf_exp}{An object of the class 's2dv_cube'
containing the parameters of the Index PDFs from two SFSs for a period
to combine and obtain the Best estimation.
The index_hind object is expected to have an element named \code{$data}
with dimensions (time, dataset = 2, member = 1, statistic = 4, season).}

\item{bc_dataset1}{Logical (default = TRUE).
If TRUE the Index PDFs for the first SFS or dataset has been computed
with bias corrected.}

\item{bc_dataset2}{Logical (default = TRUE).
If TRUE the Index PDFs for the second SFS or dataset has been computed
with bias corrected.}
}
\value{
CST_PDFBest() returns a CSTools object (i.e., of the
class 's2dv_cube').
This object has at least two elements: i) an element named \code{$data}
with dimensions (time, statistic = 2, season) and ii) an element
named \code{$statistic} with the names of 'statistic' dimension
of the first element ("mean", "sigma").
The firt statistic is the parameter 'mean' of the PDF
The second statistic is the parameter 'standard deviation' of the PDF
}
\description{
This function implements the computation to obtain the index PDFs
(e.g. NAO index) to improve the index estimate from the forecast of SFSs
and accepts a CSTools object (an object of the class 's2dv_cube' as input.
}
\examples{
pdf_exp <- c(1: (10 * 2* 4 * 1))
dim(pdf_exp) <-  c(time = 10, dataset = 2, member = 1, statistic = 4, 
season = 1)
pdf_exp <- list(data = pdf_exp, Datasets = c("ECMWF-S5","UKMO-S13"),
                season = c('DJF'), Dates = list(start = 1997:2006))
class(pdf_exp) <- 's2dv_cube'
res_CST <- CST_PDFBest(pdf_exp)
str(res_CST)
# List of 5
# $ data     : num [1:10, 1:2, 1] 45.2 46.3 47.3 48.3 49.3 ...
# $ Datasets : chr [1:2] "ECMWF-S5" "UKMO-S13"
# $ season   : chr "DJF"
# $ Dates    :List of 1
# ..$ start: int [1:10] 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006
# $ statistic: chr [1:2] "mean" "sigma"
# - attr(*, "class")= chr "s2dv_cube"
dim(res_CST$data)
# time statistic    season
#   10         2         1
}
\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}
}
