ropensci / chirps

API Client for CHIRPS
https://docs.ropensci.org/chirps/
Other
31 stars 12 forks source link

ClimateSERV server results in a failure #38

Closed adamhsparks closed 2 years ago

adamhsparks commented 3 years ago

e.g.,

> dates = c("2017-12-15","2017-12-31")
> lonlat = c(121.25562, 14.6774)
> names(lonlat) <- c("lon", "lat")

> get_chirps(object = data.frame(as.list(lonlat)),
             dates = dates,
             server = "ClimateSERV")

Fetching data from ClimateSERV server 

Getting your request...

 Error in data.frame(..., check.names = FALSE) : 
arguments imply differing number of rows: 0, 121
herrmol commented 3 years ago

The code works on my computer. What is strange is that in your server reply it says "Fetching data from ClimateSERV server". It should be "Fetching data from CHC server ". And this is what it says when I run the code. Maybe this helps.

However, I also tried the following code (same as your just changed the server to "ClimateSERV").

lonlat = c(121.25562, 14.6774) dates <- c("2017-12-24", "2017-12-31") names(lonlat) <- c("lon", "lat")

dat <- get_chirps(object = data.frame(as.list(lonlat)), dates = dates, server = "ClimateSERV")

Fetching data from ClimateSERV server

Error in curl::curl_fetch_memory(x$url$url, handle = x$url$handle) : SSL certificate problem: unable to get local issuer certificate

Any idea what to do about the certificates? Normaly, I do not run into these issues.

adamhsparks commented 3 years ago

That's a typo on my part. It should be ClimateSERVE in my issue, thanks for catching that. I was trying both to make sure that CHC worked (it does).

Yes, I've noticed the same thing with the certificates. This seems to possibly be server-side since we've not made any changes to the codebase here that I'm aware of that would affect this.

Kauê is away and I've not been making changes to it when this cropped up. So I've opened an issue to come back to it later when I have time. In the meantime, I just modified my other package that depends on this one to use the CHC (default) server and it's fine.

herrmol commented 3 years ago

Ok, thanks for the info. Accessing data via CHC is very slow. Since access via ClimateSERVE does not work (currently) on my side, can you give me an idea how much faster it is in general?

kauedesousa commented 3 years ago

CHC is slow because it fetches the whole GeoTIFF files, so it is better to work with it when you have points from a large geographical coverage. The API of ClimateSERV has been recently updated (here https://github.com/SERVIR/ClimateSERV/issues/3) so we still need to make some tests to ensure backward compatibility with the existing chirps package. We will try to check it as soon as possible. Best regards

billyz313 commented 3 years ago

ClimateSERV was giving a certificate warning, but it should be solved now. Please let me know if you experience any issues.

adamhsparks commented 3 years ago

ClimateSERV along with the failure to fetch the data

-- Dr Adam Sparks | Senior Research Scientist Farming Systems Innovation Primary Industries Development Department of Primary Industries and Regional Development 3 Baron-Hay Court, South Perth WA 6151 t +61 (0)8 9368 3689 | m +61 (0)415 489 422 | w dpird.wa.gov.au

On 25 Oct 2021, at 23:45, Billy Ashmall @.***> wrote:

 Where are y'all seeing a certificate error from CHC or from ClimateSERV?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.