mikejohnson51 / climateR

An R 📦 for getting point and gridded climate data by AOI
https://mikejohnson51.github.io/climateR/
MIT License
170 stars 40 forks source link

getDaymet() syntax error #97

Open ADLCero opened 3 months ago

ADLCero commented 3 months ago

I've heavily used getDaymet() to get precipitation data for my work for the past year. However, for the past days (June 2024), it consistently takes longer for the function to run and gives back an error that says:

_syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET or SCANERROR. The proxy server received an invalid response from an upstream server. The proxy server could not handle the request. Error reading from remote server.

Screenshot 2024-06-06 at 19 10 00

Any ideas why this is happening and what the solution can be?

The error occurs regardless of AOI used and can be replicated using this code:

library(climateR)
library(AOI)

start_date <- "1980-10-01"
end_date <- "2021-09-30"

Daymet_precip <- getDaymet(aoi_get(state = "MI"),
                             varname = "prcp",
                             startDate = start_date,
                             endDate = end_date)
mikejohnson51 commented 3 months ago

Hi @ADLCero thanks for reaching out! I suspect this is related to this https://github.com/mikejohnson51/climateR-catalogs/issues/16 and is in the queue to be fixed. Thanks!

Schneiberg commented 3 days ago

Hi there.

I believe this issue also occurs with the getCHIRPS function, but not for all years. It worked perfectly from 1981 to 1994. However, for the following years, the error appears with the message "syntax error, unexpected $end, expecting SCAN_ATTR or SCAN_DATASET or SCAN_ERROR."

library(climateR) library(AOI)

y_chrp <- climateR::getCHIRPS(AOI = shp1, timeRes = "daily", startDate = "2023-01-01", endDate = "2023-12-31")