RCGLS (version 1.0.3)

stack_CGLS: stack CGLS data

Description

Read all downloaded files from Copernicus Global Land Service within a timeframe as Raster Stack and adjusts coordinates for R.

Usage

stack_CGLS (timeframe, product, resolution, version, variable)

Arguments

timeframe

Time frame of interest, for example June 2019

product

Product name: fapar, fcover, lai, ndvi, ss, swi, lst, ...

resolution

1km, 300m or 100m

version

Version number: v1, v2, v3,...

variable

Variable name: FAPAR_ERR, FAPAR_QFLAG... Also see https://land.copernicus.eu/global/products/

Value

CGLS data Raster Stack

Details

Adjusting coordinates is a necessary step to use the data because Copernicus nc files have lat/long belonging to the centre of the pixel, and R uses upper/left corner.

Examples

Run this code
# NOT RUN {
library(raster)
TF    <- seq(as.Date("2019-06-01"), as.Date("2019-06-31"), by="days")
PROD  <- "fapar" #Product name: fapar, fcover, lai, ndvi,  ss, swi, lst, ...
RES   <- "1km" #1km, 300m or 100m
V     <- "v1" #Version number: v1, v2, v3, ...
VAR   <- "FAPAR" #FAPAR_ERR, FAPAR_QFLAG... Also see https://land.copernicus.eu/global/products/
data  <- stack_CGLS(timeframe=TF, product=PROD, resolution=RES, version=V, variable=VAR)
# }

Run the code above in your browser using DataLab