Closed rsmiller74 closed 1 year ago
With the new catalog form of this package, start and end dates will no longer be hard coded allowing less maintenance and issues like these to go away. Coming soon!
The correct duration is now archived in the data catalog and will work with the getTerraClim
function without hardcoded values. Thanks!!
library(climateR); library(dplyr)
filter(params,
id == 'terraclim',
variable == "ppt") |>
select(id, varname, units, model, scenario, duration)
#> id varname units model scenario duration
#> 1 terraclim ppt mm <NA> total 1958-01-01/2021-12-01
Created on 2023-02-16 by the reprex package (v2.0.1)
getTerraClim returns error for 2021 data but data is available through December 2021.
When I modify the getTerraClim function to allow data from 2021 it correctly downloads the data.
Should be as easy as changing the if statement on line 22 to allow data from 2021.
if(endDateYear > 2021 | startDateYear < 1958){ stop("TerraClim data only avaliable between 1958 and 2021")}
See url below for current listing of available data by parameter. All are through 2021. http://thredds.northwestknowledge.net:8080/thredds/catalog/TERRACLIMATE_ALL/data/catalog.html