View source: R/stage_ldas_ts.R
| stage_ldas_ts | R Documentation | 
Downloads data from NLDAS/GLDAS and returns a vector of file handles.
stage_ldas_ts(sites, var, src = c("nldas", "gldas"), times, url,
  folder = tempdir(), version = c("rds", "tsv"), verbose = FALSE, ...)
| sites | a character vector of valid NWIS site IDs | 
| var | short name of var as in 
 | 
| src | short name of the NASA-LDAS source, either 'nldas' or 'gldas' | 
| times | a length 2 vector of POSIXct dates, or characters convertable to POSIXct dates | 
| url | for web dataset. Required because there are corrections for certain urls | 
| folder | a folder to place the file outputs in (defaults to temp directory) | 
| version | character string indicating whether you want to stage the 
 | 
| verbose | logical. provide verbose output? | 
| ... | additional arguments passed to  | 
a file handle for time series file created
## Not run: 
files <- stage_ldas_ts(sites=c("nwis_06893820","nwis_50048580","nwis_01484680"), 
  var="baro", src='nldas', times=c('2014-01-01 00:00','2014-01-01 05:00'), verbose=TRUE)
lapply(setNames(nm=files), read_ts)
files <- stage_ldas_ts(sites=c("nwis_50048580","nwis_06893820","nwis_01484680"), 
  url=paste0("dods://cida-eros-netcdfdev.er.usgs.gov:8080/thredds/dodsC/",
             "thredds_workspace/stream_metab/gldas.ncml"),
  var="baro", src='gldas', times=c('2014-01-01 00:00','2014-01-01 05:00'), verbose=TRUE)
lapply(setNames(nm=files), read_ts)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.