Title: | Download and Open Data Provided by the Copernicus Global Land Service |
---|---|
Description: | Download and open manifest files provided by the Copernicus Global Land Service data <https://land.copernicus.eu/global/>. The manifest files are available at: <https://land.copernicus.vgt.vito.be/manifest/>. Also see: <https://land.copernicus.eu/global/access/>. Before you can download the data, you will first need to register to create a username and password. |
Authors: | Willemijn Vroege [aut, cre]
|
Maintainer: | Willemijn Vroege <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.3 |
Built: | 2025-02-13 05:28:41 UTC |
Source: | https://github.com/cran/RCGLS |
Downloads manifest files of the Copernicus Global Land Service. Registration at https://land.copernicus.eu/global/ is required.
download_CGLS_data(username, password, timeframe, product, resolution, version)
download_CGLS_data(username, password, timeframe, product, resolution, version)
username |
Register at https://land.copernicus.eu/global/ |
password |
Register at https://land.copernicus.eu/global/ |
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,... |
Check https://land.copernicus.eu/global/products/ for a product overview and product details. Check https://land.copernicus.vgt.vito.be/manifest/ for an overview for data availability in the manifest.
CGLS data Data saved locally in chosen folder.
## Not run: #library(RCurl) UN <- "Willemijn" PW <- "Testthis" TF <- seq(as.Date("2019-06-01"), as.Date("2019-06-15"), 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, ... download_CGLS_data(username=UN, password=PW, timeframe=TF, product=PROD, resolution=RES, version=V) ## End(Not run)
## Not run: #library(RCurl) UN <- "Willemijn" PW <- "Testthis" TF <- seq(as.Date("2019-06-01"), as.Date("2019-06-15"), 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, ... download_CGLS_data(username=UN, password=PW, timeframe=TF, product=PROD, resolution=RES, version=V) ## End(Not run)
Opens single orginal data files/layers of Copernicus Global as netCDF filesLand Service as netCDF files without adjusting coordinates. Coordinate adjustment is necessary as R uses upper left corner as pixel reference and Copernicus uses pixel centre. Also see: https://land.copernicus.eu/global/products/.
nc_open_CGLS(date, product, resolution, version)
nc_open_CGLS(date, product, resolution, version)
date |
Date of interest, for example for 13 june 2019: 2019-06-13 |
product |
Product name: fapar, fcover, lai, ndvi, ss, swi, lst, ... |
resolution |
1km, 300m or 100m |
version |
Version number: v1, v2, v3,... |
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. This function opens the data without any corrections.
CGLS data Opens single netcdf file in environment
Coordinates are shifted and need to be adjusted, for example by: if(resolution == "300m") lon <- lon - (1/336)/2 lat <- lat + (1/336)/2 if(resolution == "1km") lon <- lon - (1/112)/2 lat <- lat + (1/112)/2
## Not run: library(ncdf4) DATE <- "2019-06-13" #Date of interest, for example for 13 june 2019: 2019-06-13 PROD <- "fapar" #Product name: fapar, fcover, lai, ndvi, ss, swi, lst, ... RES <- "1km" #1km, 300m or 100m V <- "v1" #Version number: v1, v2, v3, ... nc <- nc_open_CGLS (date=DATE, product=PROD, resolution=RES, version=V) ## End(Not run)
## Not run: library(ncdf4) DATE <- "2019-06-13" #Date of interest, for example for 13 june 2019: 2019-06-13 PROD <- "fapar" #Product name: fapar, fcover, lai, ndvi, ss, swi, lst, ... RES <- "1km" #1km, 300m or 100m V <- "v1" #Version number: v1, v2, v3, ... nc <- nc_open_CGLS (date=DATE, product=PROD, resolution=RES, version=V) ## End(Not run)
Read single layers of Copernicus Global Land Service (CGLS) data and adjusts coordinates for R.
ncvar_get_CGSL(date, product, resolution, version, variable)
ncvar_get_CGSL(date, product, resolution, version, variable)
date |
Date of interest, for example for 13 june 2019: 2019-06-13 |
product |
Product name: fapar, fcover, lai, ndvi, ss, swi, lst, ... |
resolution |
1km, 300m or 100m |
version |
Version number: v1, v2, v3,... |
variable |
FAPAR_ERR, FAPAR_QFLAG... Also see https://land.copernicus.eu/global/products/ |
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. This function opens the data without any corrections.
CGLS data Large matrix of a specific variable in environment, coordinates adjusted.
## Not run: #' library(ncdf4) DATE <- "2019-06-13" #Date of interest, for example for 13 june 2019: 2019-06-13 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/ nc_data <- ncvar_get_CGSL (date=DATE, product=PROD, resolution=RES, version=V, variable=VAR) ## End(Not run)
## Not run: #' library(ncdf4) DATE <- "2019-06-13" #Date of interest, for example for 13 june 2019: 2019-06-13 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/ nc_data <- ncvar_get_CGSL (date=DATE, product=PROD, resolution=RES, version=V, variable=VAR) ## End(Not run)
Read all downloaded files from Copernicus Global Land Service within a timeframe as Raster Stack and adjusts coordinates for R.
stack_CGLS (timeframe, product, resolution, version, variable)
stack_CGLS (timeframe, product, resolution, version, variable)
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/ |
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.
CGLS data Raster Stack
## 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) ## End(Not run)
## 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) ## End(Not run)