https://github.com/pepijn-devries/copernicusclimate
Search Download and Handle Data from Copernicus Climate Data Service
https://github.com/pepijn-devries/copernicusclimate
Last synced: 4 months ago
JSON representation
Search Download and Handle Data from Copernicus Climate Data Service
- Host: GitHub
- URL: https://github.com/pepijn-devries/copernicusclimate
- Owner: pepijn-devries
- License: gpl-3.0
- Created: 2025-09-27T15:45:35.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-11-30T09:22:33.000Z (7 months ago)
- Last Synced: 2025-12-02T12:33:08.950Z (7 months ago)
- Language: R
- Homepage: https://pepijn-devries.github.io/CopernicusClimate/
- Size: 6.65 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
tryCatch({
Sys.setlocale("LC_ALL", "English")
})
library(ggplot2)
theme_set(theme_light())
```
# CopernicusClimate 
[](https://github.com/pepijn-devries/CopernicusClimate/actions/workflows/R-CMD-check.yaml)

[](https://CRAN.R-project.org/package=CopernicusClimate)
[](https://cran.r-project.org/web/checks/check_results_CopernicusClimate.html)
[](https://pepijn-devries.r-universe.dev/CopernicusClimate)
[](https://app.codecov.io/gh/pepijn-devries/CopernicusClimate)
## Overview
[The Copernicus Climate Change Service (C3S)](https://climate.copernicus.eu/) has the mission of
providing information about the past, present and future climate, as well as tools to enable
climate change mitigation and adaptation strategies.
The C3S Climate Data Store provides open and state-of-the-art climate data to scientists. This
package allows users to download data from the data store and handle it in R.
## Installation
Install CRAN release:
```{r install1, eval=FALSE}
install.packages("CopernicusClimate")
```
Install latest developmental version from R-Universe:
```{r install2, eval=FALSE}
install.packages("CopernicusClimate", repos = c('https://pepijn-devries.r-universe.dev', 'https://cloud.r-project.org'))
```
## Example
In order to download data from C3S you first need to submit a request with `cds_submit_job()`.
After your request has been processed by C3S, you can download the data with `cds_download_jobs()`.
This workflow is demonstrated in the code snippet below. For a more detailed
description of the workflow see `vignette("download")`.
```{r example, message=FALSE, fig.width=7, fig.height=3, fig.alt="Temperature map created from downloaded data"}
library(CopernicusClimate)
library(stars) ## For loading spatial raster data
library(ggplot2) ## For plotting the data
if (cds_token_works()) { ## Make sure there is an operational access token
## Submit a download job:
job <-
cds_submit_job(
"sis-agrometeorological-indicators",
statistic = "day_time_mean",
variable = "2m_temperature",
year = "2025",
month = "01",
day = "01")
## Actually download the data:
data_file <- cds_download_jobs(job$jobID, tempdir())
## Unzip the downloaded data:
data_unzipped <- unzip(data_file$local, list = TRUE)
unzip(data_file$local, exdir = tempdir())
data_stars <- read_mdim(file.path(tempdir(), data_unzipped))
## Plot the downloaded data
ggplot() +
geom_stars(data = data_stars) +
coord_sf() +
labs(fill = "T(air 2m) [K]", x = NULL, y = NULL) +
scale_fill_viridis_c(option = "inferno", na.value = "transparent")
}
```
## More of Copernicus
More R packages for exploring other Copernicus data services:
* [CopernicusMarine](https://github.com/pepijn-devries/CopernicusMarine)
Dedicated to marine datasets
## Code of Conduct
Please note that the CopernicusClimate project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.