getTerraClim returns error when attempting to access 2024 data however data through 2024 is available on threads server. This seems to crop up every year. Making the checking for a valid date range dynamic by checking if the threads server might avoid this issues in the future.
AOI = aoi_get(country = "US")
Fails for 2024
p <- climateR::getTerraClim(AOI=AOI, varname="PDSI", startDate="2024-01-01", endDate="2024-12-31", dryrun=TRUE)
Error: Valid Date Range(s) includes:
> 1958-01-01/2023-12-01 [total]
Works for 2023
p <- climateR::getTerraClim(AOI=AOI, varname="PDSI", startDate="2023-01-01", endDate="2023-12-31", dryrun=TRUE)
source: http://thredds.northwestknowledge.net:8080/thredds/dodsC/agg...
varname(s):
PDSI [unitless] (palmer_drought_severity_index)
==================================================
diminsions: 2516, 1428, 12 (names: lon,lat,time)
resolution: 0.042, 0.042, 1 months
extent: -171.79, -66.96, 18.88, 78.38 (xmin, xmax, ymin, ymax)
crs: +proj=longlat +a=6378137 +f=0.00335281066474748 +p...
time: 2023-01-01 to 2023-12-01
==================================================
values: 43,114,176 (varsXY*T)>
getTerraClim returns error when attempting to access 2024 data however data through 2024 is available on threads server. This seems to crop up every year. Making the checking for a valid date range dynamic by checking if the threads server might avoid this issues in the future.
Fails for 2024
Works for 2023