Thanks Koen, this new version of {ecmwfr} for R is still valid? For the following code in R I’m getting “
Test failed: Data identifier reanalysis-era5-land is not found in Web API, CDS or ADS datasets.\n Or your login credentials do not match your request.”
Minimal test script for CDS connection
library(ecmwfr)
Set key with validation disabled (if available)
tryCatch({
Try to set key with current .cdsapirc contents
config_path ← “C:/Users/alexk/.cdsapirc”
if(file.exists(config_path)) {
lines ← readLines(config_path, warn = FALSE)
key_line ← grep(“^key:”, lines, value = TRUE)
if(length(key_line) > 0) {
api_key ← trimws(sub(“^key:\s*”, “”, key_line))
# Try without validate parameter first
wf_set_key(key = api_key, service = "cds")
print("✅ Key set successfully")
}
}
}, error = function(e) {
print(paste(“Setting key failed:”, e$message))
})
Test request
test_request ← list(
dataset_short_name = “reanalysis-era5-land”,
product_type = “reanalysis”,
variable = “2m_temperature”,
year = “2020”,
month = “01”,
day = “01”,
time = “00:00”,
area = c(10, -86, 9, -85), # Small area in Costa Rica
format = “netcdf”,
target = “test.nc”
)
print(“Testing download…”)
tryCatch({
result ← wf_request(request = test_request, time_out = 300, path = temp_dir)
print(“
Test download successful!”)
}, error = function(e) {
print(paste(“
Test failed:”, e$message))
})