climateR icon indicating copy to clipboard operation
climateR copied to clipboard

getDaymet() version 4 or version selection option

Open Rapsodia86 opened this issue 3 years ago • 4 comments
trafficstars

Hello, I do have a quick question: Is there a plan to either update url to Daymet Version 4 or maybe add an option to select a dataset's version?

Thanks!

Rapsodia86 avatar Jan 17 '22 20:01 Rapsodia86

Hi @Rapsodia86,

I have a new release of climateR coming very soon which will use Daymet 4 :)

I will keep this open for now and alert you when its ready (ideally end of the week)

Thanks for the interest!

Mike

mikejohnson51 avatar Jan 17 '22 22:01 mikejohnson51

Great! Thank you very much!

Rapsodia86 avatar Jan 17 '22 23:01 Rapsodia86

Hi @Rapsodia86,

As mentioned in the other issue, I am slowly moving climateR to a new more robust backend. The idea will be that all performance and convinence in climateR will remain but it will more flexibly call a more complete documentation of all datasets:

For now, to get DaymetV4 try:

library(opendap.catalog)
library(terra)

# Query opendap .catalog
cat = dplyr::filter(params,  id == "daymetv4")  

# subset all day met components to a AOI and time
dap = dap(catolog = cat,
         AOI = AOI::aoi_get(state = "CO", county = "Larimer"), 
         startDate = "2010-01-01")

# View
terra::plot(rast(dap))

image

# Instead filter to just tmin (could also do in the initial filter)

dap2 = dap(catolog = cat,
             AOI = AOI::aoi_get(state = "CO", county = "Larimer"), 
             startDate = "2010-01-01",
             varname = "tmin")

terra::plot(dap2$tmin_NA)

image

mikejohnson51 avatar Feb 18 '22 23:02 mikejohnson51

Thank you very much for the update! I also very much appreciate adding support for (or even switching to) terra package! So, double thanks!:) Btw. if you need someone extra for testing during development, sign me in!

Rapsodia86 avatar Feb 19 '22 14:02 Rapsodia86