% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CST_QuantileMapping.R
\name{CST_QuantileMapping}
\alias{CST_QuantileMapping}
\title{Quaintiles Mapping for seasonal or decadal forecast data}
\usage{
CST_QuantileMapping(
  exp,
  obs,
  exp_cor = NULL,
  sdate_dim = "sdate",
  memb_dim = "member",
  window_dim = NULL,
  method = "QUANT",
  na.rm = FALSE,
  ncores = NULL,
  ...
)
}
\arguments{
\item{exp}{an object of class \code{s2dv_cube}}

\item{obs}{an object of class \code{s2dv_cube}}

\item{exp_cor}{an object of class \code{s2dv_cube} in which the quantile mapping correction should be applied. If it is not specified, the correction is applied in object 'exp'.}

\item{sdate_dim}{a character string indicating the dimension name in which cross-validation would be applied when exp_cor is not provided. 'sdate' by default.}

\item{memb_dim}{a character string indicating the dimension name where ensemble members are stored in the experimental arrays. 'member' by default.}

\item{window_dim}{a character string indicating the dimension name where samples has been stored. It can be NULL (default) in case all samples are used.}

\item{method}{a character string indicating the method to be used: 'PTF','DIST','RQUANT','QUANT','SSPLIN'. By default, the empirical quantile mapping 'QUANT' is used.}

\item{na.rm}{logical indicating ig missing values should be removed (FALSE by default).}

\item{ncores}{an integer that indicates the number of cores for parallel computations using multiApply function. The default value is NULL (1).}

\item{...}{additional parameters to be used by the method choosen. See qmap package.}
}
\value{
an oject of class \code{s2dv_cube} containing the experimental data after applyingthe quantile mapping correction. 
) <- c(dataset = 1, member = 10, sdate = 20, ftime = 60 ,
}
\description{
This function is a wrapper from fitQmap and doQmap from package 'qmap'to be applied in CSTools objects of class 's2dv_cube'.
}
\examples{
exp <- NULL
exp$data <- 1 : c(1 * 10 * 20 * 60 * 6 * 7)
dim(exp$data) <- c(dataset = 1, member = 10, sdate = 20, ftime = 60 , 
                  lat = 6, lon = 7)
class(exp) <- 's2dv_cube'
obs$data <- 101 : c(100 + 1 * 1 * 20 * 60 * 6 * 7)
dim(obs$data) <- c(dataset = 1, member = 1, sdate = 20, ftime = 60 ,
                  lat = 6, lon = 7)
class(obs) <- 's2dv_cube'
res <- CST_QuantileMapping(exp, obs)
exp <- lonlat_data$exp
obs <- lonlat_data$obs
res <- CST_QuantileMapping(exp, obs)
}
\seealso{
\code{\link[qmap]{fitQmap}} and \code{\link[qmap]{doQmap}}
}
\author{
Nuria Perez-Zanon, \email{nuria.perez@bsc.es}
}
