Closed lucolotto closed 2 years ago
Hello Luca,
The issue appears to be that you are providing the Latitude
and Longitude
objects to the OISST_sub_dl()
function, rather than the LatitudeYLim
and LongitudeXLim
objects you created to give the grid dimensions for downloaded. When you change those two lines the code runs as expected:
OISST_sub_dl <- function(time_df){
OISST_dat <- griddap(x = "ncdcOisst21Agg_LonPM180",
url = "https://coastwatch.pfeg.noaa.gov/erddap/",
time = c(time_df$start, time_df$end),
zlev = c(0, 0),
latitude = LatitudeYLim, # Change here
longitude = LongitudeXLim, # And here
fields = "sst")$data %>%
mutate(time = as.Date(stringr::str_remove(time, "T00:00:00Z"))) %>%
dplyr::rename(t = time, temp = sst) %>%
select(lon, lat, t, temp) %>%
na.omit()
}
All the best, -Robert
Hi Robert, Thanks, with your suggested edit it works!
Thanks a lot Luca
Hi, First of all thanks for your super useful package. I was trying to download the temperatures for a subset of the mediterranean basin following the download and prepare OISST data vignette. The code I use is the following:
When I execute the last code line, I get the following error:
Error in curl::curl_fetch_disk(x$url$url, x$disk, handle = x$url$handle) : Empty reply from server
Could you help me figuring out what is causing the error? I should also add that I used to use this code about a year ago and it worked like a charm. Thanks in advance for your support All the best Luca