ag5_download {ag5Tools}R Documentation

Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store

Description

The data is downloaded from Copernicus Climate Change Service (C3S) using the Copernicus Climate Data Store (CDSAPI) Python library https://github.com/ecmwf/cdsapi

This function provides programmatic access to the AgERA5 dataset. For more information about the data license, please visit: https://cds.climate.copernicus.eu/api/v2/terms/static/licence-to-use-copernicus-products.pdf

To download the data you should have a valid CDS account, an CDS API key. Please follow the instructions at: https://cds.climate.copernicus.eu/api-how-to to create a file to store your API key. You do not need to install Python or the cdsapi, Ag5Tools will do it if required.

Usage

ag5_download(
  variable,
  statistic = NULL,
  year,
  month,
  day,
  time = NULL,
  version = "1_1",
  path
)

Arguments

variable

character The variable to be downloaded. See details

statistic

character Only required for some variables. See details for options.

year

numeric (Integer) Year to download. Should be between 1979 - 2022

month

numeric Month to be requested. Use month = "all" download all the months for the requested year.

day

numeric Days of the month for the requested data. Use day = "all" to download all days from requested month

time

Character Only required for "2m_relative_humidity".

version

Character Version 1_1 is currently the default and recommended See details for available options.

path

Character Target folder in an local hardrive e.g. "C:/agera5". The folder should exist and the user should have write permission.

Value

No return value, called for side effects.

AgERA5 variables available for download:

Statistics for variable "2m_temperature"

Variable "2m_temperature" requires to indicate at least one of the following options in statistic:

Parameter "time" for Variable "2m_relative_humidity"

Variable "2m_relative_humidity" requires to indicate one of the following options in time:

Variables that require statistic

For the following variables, only "24_hour_mean" statistic is available, but should be explicitly indicated.

Examples

## Not run: 
ag5_download(variable = "2m_temperature",
            statistic = "night_time_minimum",
            day = "all",
            month = "all",
            year = 2015,
            path = "C:/custom_target_folder"
            )
            
## End(Not run)


[Package ag5Tools version 0.0.2 Index]