MyNixOS website logo
Description

Toolbox for Downloading and Extracting Copernicus AgERA5 Data.

Tools for downloading and extracting data from the Copernicus "Agrometeorological indicators from 1979 to present derived from reanalysis" <https://cds.climate.copernicus.eu/cdsapp#!/dataset/sis-agrometeorological-indicators?tab=overview> (AgERA5).

R-CMD-check CRAN Downloads Contributor Covenant

ag5Tools

Toolbox for downloading and extracting data from the Copernicus AgERA5 dataset

Description

The R package ag5Tools is a toolbox to download and extract data from the "Agrometeorological indicators from 1979 to present derived from reanalysis" dataset (AgERA5).

https://cds.climate.copernicus.eu/cdsapp#!/dataset/10.24381/cds.6c68c9bb?tab=overview

The download function provides programmatic access to the Copernicus Climate Data Store to download AgERA5 data.

A detailed description can be found in the companion paper: https://doi.org/10.1016/j.softx.2022.101267

Data license

The ag5Tools package does not distribute data, it only provides access to Climate Data Store through the python cdsapi.

For specific details about the license agreement on downloading and using the data please check the license at: https://cds.climate.copernicus.eu/api/v2/terms/static/licence-to-use-copernicus-products.pdf

Installation

The stable version of ag5Tools can be installed from CRAN using

install.packages("ag5Tools")

The development version could be installed using

devtools::install_github("agrdatasci/ag5Tools", build_vignettes = TRUE)

Downloading AgERA5 data

Install Python and the CDS API

Before using the ag5Tools package, you need to intall Python and the CDS API, please see the details here: https://cds.climate.copernicus.eu/api-how-to.

Get your CDS API-Key

To download AgERA5 data you should first register at the Climate Data Store and get your API key. Please follow the instructions in: https://cds.climate.copernicus.eu/api-how-to

You need to create a file to store the API key, following the instructions from: https://cds.climate.copernicus.eu/api-how-to.

Examples

Downloading data

The following example downloads daily '2m_temperature' data for year 2015

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

Extracting data

To extract maximum day temperature ("Max-Day-Time") of "2m_temperature"

ag5_extract(coords = c(35.726364, -2.197162), 
            dates = "1995-01-23", 
            variable = "2m_temperature",
            statistic = "Max-Day-Time", 
            path = "C:/agera5_data")

Acknowledgements

The ag5Tools package relies on the functionality available from other open source packages.

  • The Python cdsapi

  • The R package reticulate is used to access the Python CDS API functions from R.

  • The R package terra is used to extract data from nc files.

  • The R package fs is used for efficiently search and list files.

License

Please be aware that ag5Tools is released under MIT license, please find details in the MIT license document

Citation

To cite the ag5Tools in scientific publications please use:

Brown, D., de Sousa, K., & van Etten, J. (2023). ag5Tools: An R package for downloading and extracting agrometeorological data from the AgERA5 database. SoftwareX, 21, 101267. https://doi.org/10.1016/j.softx.2022.101267

Code of Conduct

Please note that the ag5Tools project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Metadata

Version

0.0.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows