% Generated by roxygen2: do not edit by hand % Please edit documentation in R/as.s2dv_cube.R \name{as.s2dv_cube} \alias{as.s2dv_cube} \title{Convert seasonal to decadal data to a 's2dv_cube' class} \usage{ as.s2dv_cube(data, lon = NULL, lat = NULL, Variable = NULL, Datasets = NULL, Dates = NULL, when = NULL, source_files = NULL) } \arguments{ \item{data}{an array with any number of named dimensions, tipically and object output from CST_Load,with the following dimensions: dataset, member, sdate, ftime, lat and lon.} \item{lon}{an array with one dimension containing the longitudes and attributes: dim, cdo_grid_name, data_across_gw, array_across_gw, first_lon, last_lon and projection.} \item{lat}{an array with one dimension containing the longitudes and attributes: dim, cdo_grid_name, first_lat, last_lat and projection.} \item{Variable}{a list of two elements: \code{varName} a character string indicating the abbreviation of a variable name and \code{level} a character string indicating the level, if it is not required it could be set as NULL.} \item{Datasets}{a named list with the dataset model with two elements: \code{InitiatlizationDates}, containing a list of the start dates for each member named with the names of each member, and \code{Members} containing a vertor with the member names (i.e.: "Member_1")} \item{Dates}{a named list of two elements: \code{start}, an array of dimensions (sdate, time) with the POSIX initial date of each forecast time of each starting date, and \code{end}, an array of dimensions (sdate, time) with the POSIX final date of each forecast time of each starting date.} \item{when}{a time stamp of the date the Load() call to obtain the data was issued.} \item{source_files}{a vector of character strings with complete paths to all the found files involved in the Load() call.} } \value{ a object of class 's2dv_cube'. } \description{ This function allows to convert data to 's2dv_cube' class if the data hasn't been loaded using CST_Load or has been transformed with other methods. A 's2dv_cube' object has many different components including metadata. This function will allow to create partial 's2dv_cube' objects and for each expected missed parameter a warning message will be displayed. } \examples{ exp <- 1:100 dim(exp) <- c(lat = 2, time = 10, lon = 5) exp <- as.s2dv_cube(data = exp) class(exp) } \author{ Perez-Zanon Nuria, \email{nuria.perez@bsc.es} } \seealso{ \code{\link[s2dverification]{Load}} and \code{\link{CST_Load}} }