---
author: "Nuria Perez"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteEngine{knitr::knitr}
  %\VignetteIndexEntry{Create a High Resolution Dataset}
  %\usepackage[utf8]{inputenc}
---

Create a High Resolution Dataset
-------------------------------------------

Seasonal Forecast has been proved to be be decisive in sectorial decisions and stakeholders management. However, the data in the desired format of decision makers is not always available. Here, it is presented a step by step document to create your own High Resolution Dataset for your period and area of interest.

### 1.- System requirements

CSTools has a system dependency, the CDO libraries, for interpolation of grid data and retrieval of metadata. Make sure you have these libraries installed in the system or download and install from https://code.zmaw.de/projects/cdo.

A critical step on this process is the storage structure of the datasets you would like to use. The retrieve of data from local files, *CSTools* is based in *s2dverification* R package. It can loaded almost any NetCDF 3/4 data file containing climate data in monthly or daily time resolution in regular or gaussian grids. Find out more information in the s2dverification GitLab project https://earth.bsc.es/gitlab/es/s2dverification/blob/master/vignettes/data_retrieval.md

Open an R session and run the following lines to install and load the required packages:

Library *CSTools*, should be installed from CRAN and loaded:


```r
install.packages("CSTools")
library(CSTools)
library(s2dverifiacion)
```

### 2.- Load Data

A detailed explanation of the procedure to download public available data and loaded using *CSTools* would be available soon.

In this vignette, the sample data 'lonlat' already available along with the package, will be used.

To explore that data you can run the following commands to see: the names of the list of the 's2dv_cube' objects.

```
names(lonlat_data$exp)
names(lonlat_data$obs)



