From f68addf3f1d76864121650d94d243044317ab902 Mon Sep 17 00:00:00 2001 From: KH Date: Sun, 25 Aug 2024 10:51:54 +0200 Subject: [PATCH 1/5] keyring to suggests --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9522a5e..6d4d2a6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -35,7 +35,6 @@ Depends: R (>= 4.2) Imports: httr, - keyring, memoise, getPass, curl, @@ -44,6 +43,7 @@ License: AGPL-3 ByteCompile: true RoxygenNote: 7.3.1 Suggests: + keyring, rmarkdown, covr, xml2, From 3d8ebca74d1fb6a76bb8188afa0e2c3877eeb5ec Mon Sep 17 00:00:00 2001 From: KH Date: Sun, 25 Aug 2024 10:52:02 +0200 Subject: [PATCH 2/5] typo in default user --- R/wf_request_batch.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/wf_request_batch.R b/R/wf_request_batch.R index beaa62e..576d438 100644 --- a/R/wf_request_batch.R +++ b/R/wf_request_batch.R @@ -12,7 +12,7 @@ wf_request_batch <- function( request_list, workers = 2, - user = "ecmwf", + user = "ecmwfr", path = tempdir(), time_out = 3600, retry = 5, From 9fcc77d172345305fa6abb270e3303b710196c82 Mon Sep 17 00:00:00 2001 From: KH Date: Sun, 25 Aug 2024 10:52:14 +0200 Subject: [PATCH 3/5] correct? login link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 33bd5d2..f3217e4 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ library("ecmwfr") ## Use: ECMWF Data Store services Create a ECMWF account by [self -registering](https://accounts.ecmwf.int/auth/realms/ecmwf/login-actions/registration?client_id=cms-www&tab_id=-Wuo-QeT0_k). Once your user account has been verified you can get your personal access token or *key* by visiting one of the Data Stores user profiles, for example the CDS [user profile](https://cds-beta.climate.copernicus.eu/profile). +registering](https://accounts.ecmwf.int/auth/realms/ecmwf/protocol/openid-connect/auth?client_id=cms-www&response_type=code&scope=openid%20email%20profile&redirect_uri=https%3A//www.ecmwf.int/openid-connect/). Once your user account has been verified you can get your personal access token or *key* by visiting one of the Data Stores user profiles, for example the CDS [user profile](https://cds-beta.climate.copernicus.eu/profile). The Personal Access Token is a long string of letters and numbers: From c9ec224ed7a9d6f31b36a7a23a34bafb7f390e49 Mon Sep 17 00:00:00 2001 From: KH Date: Sun, 25 Aug 2024 11:35:45 +0200 Subject: [PATCH 4/5] mixing services example --- vignettes/advanced_vignette.Rmd | 49 +++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/vignettes/advanced_vignette.Rmd b/vignettes/advanced_vignette.Rmd index f0cb46b..15dbc5e 100644 --- a/vignettes/advanced_vignette.Rmd +++ b/vignettes/advanced_vignette.Rmd @@ -94,8 +94,53 @@ batch_request <- list( # can't exceed 20) wf_request_batch( batch_request, - workers = 2, - user = user + workers = 2 + ) +``` + +### Mixing data services in batch requests + +It is allowed to mix data services in a batch requests. This allows you to formulate complex multi-service requests. Below you see a simple example using a batch requests for data from both the CDS and ADS services in one pass. + +```{r eval=FALSE} +# CDS +cds_request <- + list( + product_type = 'reanalysis', + variable = 'geopotential', + year = '2024', + month = '03', + day = '01', + time = '13:00', + pressure_level = '1000', + data_format = 'grib', + dataset_short_name = 'reanalysis-era5-pressure-levels', + target = 'test.grib' +) + +# ADS +ads_request <- list( + dataset_short_name = "cams-global-radiative-forcings", + variable = "radiative_forcing_of_carbon_dioxide", + forcing_type = "instantaneous", + band = "long_wave", + sky_type = "all_sky", + level = "surface", + version = "2", + year = "2018", + month = "06", + target = "download.grib" +) + + +combined_request <- list( + cds_request, + ads_request +) + + +files <- wf_request_batch( + combined_request ) ``` From 46fd39f47f03348fa258dd3bd2003aeff66e1ec7 Mon Sep 17 00:00:00 2001 From: KH Date: Sun, 25 Aug 2024 13:23:33 +0200 Subject: [PATCH 5/5] docs --- man/wf_request.Rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/wf_request.Rd b/man/wf_request.Rd index 8f14dff..029db20 100644 --- a/man/wf_request.Rd +++ b/man/wf_request.Rd @@ -19,7 +19,7 @@ wf_request( wf_request_batch( request_list, workers = 2, - user = "ecmwf", + user = "ecmwfr", path = tempdir(), time_out = 3600, retry = 5,