as.s2dv_cube {CSTools}R Documentation

Conversion of 'startR_array' or 'list' objects to 's2dv_cube'

Description

This function converts data loaded using startR package or s2dverification Load function into a 's2dv_cube' object.

Usage

as.s2dv_cube(object)

Arguments

object

an object of class 'startR_array' generated from function Start from startR package (version 0.1.3 from earth.bsc.es/gitlab/es/startR) or a list output from function Load from s2dverification package.

Value

The function returns a 's2dv_cube' object to be easily used with functions CST from CSTools package.

Author(s)

Perez-Zanon Nuria, nuria.perez@bsc.es

Nicolau Manubens, nicolau.manubens@bsc.es

See Also

s2dv_cube, Load, Start and CST_Load

Examples

## Not run: 
library(startR)
repos <- '/esarchive/exp/ecmwf/system5_m1/monthly_mean/$var$_f6h/$var$_$sdate$.nc'
data <- Start(dat = repos,
             var = 'tas',
             sdate = c('20170101', '20180101'),
             ensemble = indices(1:20),
             time = 'all',
             latitude = 'all',
             longitude = indices(1:40),
             return_vars = list(latitude = 'dat', longitude = 'dat', time = 'sdate'),
             retrieve = TRUE)
data <- as.s2dv_cube(data)
class(data)
startDates <- c('20001101', '20011101', '20021101',
                '20031101', '20041101', '20051101')
data <- Load(var = 'tas', exp = 'system5c3s', 
            nmember = 15, sdates = startDates,
            leadtimemax = 3, latmin = 27, latmax = 48,
            lonmin = -12, lonmax = 40, output = 'lonlat')
data <- as.s2dv_cube(data)
class(data)

## End(Not run)

[Package CSTools version 4.0.1 Index]