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

no getTerraClim function? #3

Closed keatonwilson closed 5 years ago

keatonwilson commented 5 years ago

Any idea why the getTerraClim function isn't loading with the installation and loading of the package?

mikejohnson51 commented 5 years ago

Hi,

This is because I re-worked to netcdf calls to play nicer with windows and speed up the workflows. I only got around to modifying those I use regularly. I will fix TerraClim this week and get back to you.

Thanks for checking in!

Mike

keatonwilson commented 5 years ago

Thanks Mike! I appreciate it - this is such a great set of tools - looking forward to yanking down some TerraClim data in the near future. Thanks again!

mikejohnson51 commented 5 years ago

Hi Keaton,

TerraClim should now be up and running:

AOI = getAOI(state = 'AZ') 

system.time({
     tc = getTerraClim(AOI, param = c('tmax', 'prcp'), 
                  startDate = "2017-01-01", endDate = "2017-12-31" )
})

 user  system elapsed 
  0.745   0.209   1.887 

str(tc, max.level = 3)

List of 2
 $ prcp:Formal class 'RasterStack' [package "raster"] with 11 slots
  .. ..@ filename: chr ""
  .. ..@ layers  :List of 12
  .. ..@ title   : chr(0) 
  .. ..@ extent  :Formal class 'Extent' [package "raster"] with 4 slots
  .. ..@ rotated : logi FALSE
  .. ..@ rotation:Formal class '.Rotation' [package "raster"] with 2 slots
  .. ..@ ncols   : int 141
  .. ..@ nrows   : int 140
  .. ..@ crs     :Formal class 'CRS' [package "sp"] with 1 slot
  .. ..@ history : list()
  .. ..@ z       : list()
 $ tmax:Formal class 'RasterStack' [package "raster"] with 11 slots
  .. ..@ filename: chr ""
  .. ..@ layers  :List of 12
  .. ..@ title   : chr(0) 
  .. ..@ extent  :Formal class 'Extent' [package "raster"] with 4 slots
  .. ..@ rotated : logi FALSE
  .. ..@ rotation:Formal class '.Rotation' [package "raster"] with 2 slots
  .. ..@ ncols   : int 141
  .. ..@ nrows   : int 140
  .. ..@ crs     :Formal class 'CRS' [package "sp"] with 1 slot
  .. ..@ history : list()
  .. ..@ z       : list()

plot(tc$prcp)
image

Hope it works well for you!

Mike

keatonwilson commented 5 years ago

Thanks Mike! Looking forward to trying it out and including it in future pipelines. Great set of tools here - thanks for all your hard work!