diff --git a/DESCRIPTION b/DESCRIPTION
index 31fda5c..228f8e4 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
Package: ecmwfr
Title: Interface to 'ECMWF' and 'CDS' Data Web Services
-Version: 2.0.1
+Version: 2.0.2
Authors@R: c(person(
family = "Hufkens",
given = "Koen",
@@ -27,9 +27,9 @@ Description: Programmatic interface to the European Centre for Medium-Range
Weather Forecasts dataset web services (ECMWF; )
and Copernicus's Data Stores. Allows for easy downloads of weather
forecasts and climate reanalysis data in R. Data stores covered include the Climate Data Store (CDS;
- ), Atmosphere Data Store (ADS;
- ) and Early Warning Data Store (CEMS;
- ).
+ ), Atmosphere Data Store (ADS;
+ ) and Early Warning Data Store (CEMS;
+ ).
URL: https://github.com/bluegreen-labs/ecmwfr
BugReports: https://github.com/bluegreen-labs/ecmwfr/issues
Depends:
diff --git a/NEWS.md b/NEWS.md
index 3e7543e..17d4750 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,3 +1,7 @@
+# ecmwfr 2.0.2
+
+* bug fix, sanitizing data requests which would fail on certain (CAMS) products
+
# ecmwfr 2.0.1
* fixing bug in batch processing, which stops the process after one download
diff --git a/R/service-ds.R b/R/service-ds.R
index 4123ced..b5ba2d4 100644
--- a/R/service-ds.R
+++ b/R/service-ds.R
@@ -11,6 +11,14 @@ ds_service <- R6::R6Class("ecmwfr_ds",
user = private$user
)
+ # sanizite request before submission
+ # some product requests can't handle the
+ # presence of extra fields (e.g. target
+ # dataset_short_name)
+ request <- private$request
+ request$dataset_short_name <- NULL
+ request$target <- NULL
+
# get the response for the query provided
response <- httr::VERB(
private$http_verb,
@@ -18,7 +26,7 @@ ds_service <- R6::R6Class("ecmwfr_ds",
httr::add_headers(
"PRIVATE-TOKEN" = key
),
- body = list(inputs = private$request),
+ body = list(inputs = request),
encode = "json"
)
diff --git a/R/zzz.R b/R/zzz.R
index 6b9c3d1..9e1cdec 100644
--- a/R/zzz.R
+++ b/R/zzz.R
@@ -17,9 +17,9 @@
wf_server <- function(id, service = "cds") {
# set base urls
- cds_url <- "https://cds-beta.climate.copernicus.eu/api"
- ads_url <- "https://ads-beta.atmosphere.copernicus.eu/api"
- cems_url <- "https://ewds-beta.climate.copernicus.eu/api"
+ cds_url <- "https://cds.climate.copernicus.eu/api"
+ ads_url <- "https://ads.atmosphere.copernicus.eu/api"
+ cems_url <- "https://ewds.climate.copernicus.eu/api"
# return url depending on service or id
switch(
diff --git a/contact.md b/contact.md
index f1af85b..b873b31 100644
--- a/contact.md
+++ b/contact.md
@@ -5,7 +5,7 @@
To report bugs, issues, and/or feature requests please use the
[github](https://github.com) repository:
-- [ecmwfr github repository](https://github.com/khufkens/ecmwfr/issues)
+- [ecmwfr github repository](https://github.com/bluegreen-labs/ecmwfr/issues)
## Other resources
@@ -14,14 +14,8 @@ To report bugs, issues, and/or feature requests please use the
-
Public data sets of the European Centre for Medium-Range Weather Forecasts (ECMWF)
-## Authors
+## Main author and maintainer
-- Koen Hufkens (author and maintainer)
-
-
+- Koen Hufkens
+
-- Reto Stauffer (contributor)
-
-
-
-
diff --git a/cran-comments.md b/cran-comments.md
index 15d4367..a44bf34 100644
--- a/cran-comments.md
+++ b/cran-comments.md
@@ -1,14 +1,17 @@
-## New release v2.0.1
+## New release v2.0.2
Dear CRAN team,
-This is a bugfix to the package which would halt the batch downloading
-after one donwload completed (due to updates to the argument structure
-after the recent API migration). This updates addresses this issue.
-No further changes were made.
+This is a bugfix to the package which would fail downloads of certain
+products due to the handling of unknown query fields. I now sanitize
+the requests further.
+
+This updates addresses this issue. No further changes were made.
+Given the final migration to the new API at ECMWF you may expect many
+more small bug fixes as the API is poorly documented.
Stats on code coverage and test routines remain the same as per pervious
-v2.0.0 release.
+v2.0.1 release.
Kind regards,
Koen Hufkens