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

GridMet Error with palmer (different from issue #32) #33

Closed rsmiller74 closed 3 years ago

rsmiller74 commented 3 years ago

Example below. Error persists with any year combination but runs fine with call to other gridMet layers.

start.year=2015 end.year=2016

--Extract rasters

dat <- getGridMET(aoi_get(country = c("US")), param="palmer", startDate = start.date, endDate = end.date)

Requested AOI not completly in model domain...AOI is being clipped although coordinates are longitude/latitude, st_intersection assumes that they are planar Error in { : task 1 failed - "NetCDF: Access failure" In addition: Warning message: attribute variables are assumed to be spatially constant throughout all geometries

mikejohnson51 commented 3 years ago

Hi @rsmiller74,

I hope this solves the dastardly palmer errors 😬 including this, #32, #7 #34 and #11

Please check it out and confirm it looks good on your end if willing,

Thanks!

library(climateR)
library(AOI)

dat <- getGridMET(AOI = AOI::aoi_get(country = c("US")), 
                  param="palmer", 
                  startDate = "2015-01-01", 
                  endDate = "2015-01-31")

rasterVis::levelplot(dat$palmer$X2015_pentad_1)

Created on 2021-04-12 by the reprex package (v1.0.0)

rsmiller74 commented 3 years ago

Looks good! Thanks Mike!