mikejohnson51 / climateR

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

getTerraClim problem #13

Closed MarcosTexeira closed 4 years ago

MarcosTexeira commented 4 years ago

Hi Mike, it seems that this section of code: w = AOI::world %>% getTerraClim(param = 'prcp', startDate = '2017-10-10') does not work...

When I try to implement it, i obtain the following error: Error: 'world' is not an exported object from 'namespace:AOI'

Any idea to fix this? thanks!

mikejohnson51 commented 4 years ago

Hi,

Sorry! I missed the notification on this. I made the choice to not serve datasets directly with AOI to reduce the package size and since so many are "out in the wild".

The following should work for you, but I am still working through the changes the new PROJ libraries are introducing (everything is completely functional but throws a bunch of ugly warnings about malformed CRS strings which currently come from the data servers):

library(AOI)
library(rnaturalearth)
library(climateR)

AOI = bbox_get(countries110) %>%  
  getTerraClim(startDate = "2017-10-01", param = "tmax")
#> Requested AOI not completely in model domain...AOI is being clipped

raster::plot(AOI$tmax)

Created on 2020-06-27 by the reprex package (v0.3.0)

MarcosTexeira commented 4 years ago

Thanks Mike! I'm goint to test this.