% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CST_PDFIndexFcst.R
\name{CST_PDFIndexFcst}
\alias{CST_PDFIndexFcst}
\title{Computing the Index PDFs for a forecast year of a SFSs dataset
of a CSTools object.}
\usage{
CST_PDFIndexFcst(index_hind, index_obs, index_fcst, method = "ME",
  na.rm = FALSE)
}
\arguments{
\item{index_hind}{An object of the class 's2dv_cube'
containing the indices or drivers of climate variability (as e.g.,
the North Atlantic Oscillation (NAO)) estimate for a hindcast period
from SFSs for improving.
The index_hind object is expected to have an element named \code{$data}
with dimensions (time, dataset, member, season).}

\item{index_obs}{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 observations or
reanalysis.
The index_obs object is expected to have an element named \code{$data}
with at least three dimensions (time, dataset, season).
It could have one more dimension (member) equal to 1.}

\item{index_fcst}{An object of the class 's2dv_cube'
containing the indices or drivers of climate variability (as e.g.,
the North Atlantic Oscillation (NAO)) estimate for a forecast year
from SFSs for improving.
The index_fcst object is expected to have an element named \code{$data}
with dimensions (time = 1, dataset, member, season).}

\item{method}{A character string indicating which methodology is applied
to compute the PDFs. One of "ME" (default) or "LMEV".}

\item{na.rm}{Logical (default = FALSE). Should missing values be removed?}
}
\value{
CST_PDFIndexFcst() 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 = 1, dataset, statistic = 4, season) and ii) an element
named \code{$statistic} with the names of 'statistic' dimension
of the first element ("mean_notbc", "sigma_notbc", "mean_bc", "sigma_bc")
The firt statistic is the parameter 'mean' of the PDF with not bias corrected
The second statistic is the parameter 'standard deviation' of the PDF
with not bias corrected
The third statistic is the parameter 'mean' of the PDF with bias corrected
The fourth statistic is the parameter 'standard deviation' of the PDF
with bias corrected
}
\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{
index_hind <- 1 : (3 * 5 * 4 * 7)
dim(index_hind) <- c(time = 5, dataset = 3, member = 7, season = 4)
index_hind <- list(data = index_hind)
class(index_hind) <- 's2dv_cube'
index_obs <- 1 : (3 * 5 * 4)
dim(index_obs) <- c(time = 5, dataset = 3, member = 1, season = 4)
index_obs <- list(data = index_obs)
class(index_obs) <- 's2dv_cube'
index_fcst <- 1 : (3 * 4 * 7)
dim(index_fcst) <- c(time = 1, dataset = 3, member = 7, season = 4)
index_fcst <- list(data = index_fcst)
class(index_fcst) <- 's2dv_cube'
res_CST <- CST_PDFIndexFcst(index_hind, index_obs, index_fcst, method = 'LMEV')
str(res_CST)
dim(res_CST$data)
#time   dataset statistic    season
# 1         3         4         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}
}
