#Get the latest model date
model.date <- Sys.time()
#Get the forecast 6 hours from now - addition is defined in seconds
fcst.date <- model.date + 6 * 3600
#What region of the atmosphere to get data for
levels <- c("2 m above ground", "800 mb")
#What data to return
variables <- c("TMP", "RH") #Temperature and relative humidity
#What region of the world to get data for - omit this and you get the whole planet!
model.domain <- c(-84, -74, 37, 32) #Get the area around North Carolina, USA
#Get the data
file.name <- GribGrab(levels, variables, model.date = model.date,
fcst.date = fcst.date, model.domain = model.domain)
Run the code above in your browser using DataLab