% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sample_data_st.R
\docType{data}
\name{lonlat_temp_st}
\alias{lonlat_temp_st}
\title{Sample Of Experimental And Observational Climate Data In Function Of Longitudes And Latitudes with Start}
\description{
This sample data set contains gridded seasonal forecast and corresponding 
observational data from the Copernicus Climate Change ECMWF-System 5 forecast
system, and from the Copernicus Climate Change ERA-5 reconstruction. 
Specifically, for the 'tas' (2-meter temperature) variable, for the 15 first 
forecast ensemble members, monthly averaged, for the 3 first forecast time 
steps (lead months 1 to 4) of the November start dates of 2000 to 2005, for 
the Mediterranean region (27N-48N, 12W-40E). The data was generated on (or 
interpolated onto, for the reconstruction) a rectangular regular grid of size
360 by 181.
}
\details{
The `CST_Start` call used to generate the data set in the infrastructure of 
the Earth Sciences Department of the Barcelona Supercomputing Center is shown
next. Note that `CST_Start` internally calls `startR::Start` and then uses 
`as.s2dv_cube` that converts the `startR_array` into `s2dv_cube`.
\preformatted{
 library(startR)
 lonlat_temp_st <- NULL
 repos_exp <- paste0('/esarchive/exp/ecmwf/system5c3s/monthly_mean/',
                     '$var$_f6h/$var$_$sdate$.nc')
 sdates <- sapply(2000:2005, function(x) paste0(x, '1101'))
 lonmax <- 40
 lonmin <- -12
 latmax <- 48
 latmin <- 27
 lonlat_temp_st$exp <- CST_Start(dat = repos_exp,
                                 var = 'tas',
                                 ensemble = indices(1:15),
                                 sdate = sdates,
                                 time = indices(1:3),
                                 latitude = values(list(latmin, latmax)),
                                 latitude_reorder = Sort(decreasing = TRUE), 
                                 longitude = values(list(lonmin, lonmax)),
                                 longitude_reorder = CircularSort(0, 360),
                                 synonims = list(longitude = c('lon', 'longitude'),
                                                 latitude = c('lat', 'latitude')),
                                 return_vars = list(latitude = NULL, 
                                 longitude = NULL, time = 'sdate'),
                                 retrieve = TRUE)
 dates <- c(paste0(2000, c(11, 12)), paste0(2001, c('01', 11, 12)),
            paste0(2002, c('01', 11, 12)),  paste0(2003, c('01', 11, 12)),
            paste0(2004, c('01', 11, 12)),  paste0(2005, c('01', 11, 12)),
                   200601)
 dates <- sapply(dates, function(x) {paste0(x, '01')})
 dates <- as.POSIXct(dates, format = '%Y%m%d', 'UTC')
 dim(dates) <- c(time = 3, sdate = 6)

 path.obs <- '/esarchive/recon/ecmwf/era5/monthly_mean/$var$_f1h-r1440x721cds/$var$_$date$.nc'
 lonlat_temp_st$obs <- CST_Start(dat = path.obs,
                                 var = 'tas',
                                 date = unique(format(dates, '%Y%m')),
                                 time = values(dates), 
                                 time_across = 'date',
                                 time_var = 'time',
                                 merge_across_dims = TRUE,
                                 split_multiselected_dims = TRUE,
                                 latitude = values(list(latmin, latmax)),
                                 latitude_reorder = Sort(decreasing = TRUE),
                                 longitude = values(list(lonmin, lonmax)),
                                 longitude_reorder = CircularSort(0, 360),
                                 synonims = list(longitude = c('lon', 'longitude'),
                                                 latitude = c('lat', 'latitude')),
                                 transform = CDORemapper,
                                 transform_extra_cells = 2,
                                 transform_params = list(grid = 'r360x181',
                                                       method = 'conservative'),
                                 transform_vars = c('latitude', 'longitude'),
                                 return_vars = list(longitude = NULL,
                                                    latitude = NULL,
                                                    time = 'date'),
                                 retrieve = TRUE)
}
}
\author{
Nicolau Manubens \email{nicolau.manubens@bsc.es}
}
\keyword{data}
