GetStage4Files: Download Stage IV and II data files

Description Usage Arguments Details Author(s) See Also Examples

View source: R/read_observations.R

Description

GetStage4Files downloads Stage IV and Stage II data files

Usage

1
2
GetStage4Files(startDate, endDate, dataTyp, dataDir,
  keepDownloads = FALSE, runParallel = FALSE)

Arguments

startDate

start date + hour in the form of YYYYMMDDHH

endDate

end date + hour in the form of YYYYMMDDHH

dataTyp

name of the dataset: stage4 or stage2

dataDir

directory to store the data, subdirectories YYYY/MM will be created

keepDownloads

logical for whether to keep original download files; if FALSE, dummy empty files will be used for tracking instead to conserve space (DEFAULT=FALSE)

runParallel

logical for running in parallel mode (must have a parallel backend installed and registered (e.g., doMC or doParallel) (DEFAULT=FALSE)

Details

GetStage4Files downloads Stage IV and Stage II data files from NCEP ftp site based on user configurations. The function downloads Stage IV or Stage II data from NCEP ftp site, unpacks them, and removes uncessary files (e.g., *.gif). Note for Stage II, only the multi-sensor ("ml") data files are kept while others are removed. Both Stage IV & Stage II datasets contain hourly, 6-hourly, and daily precipitation data.

Author(s)

Yuqiong.Liu@noaa.gov (updated by aubreyd)

See Also

Other obsDataReads: ReadAmerifluxCSVOldFormat, ReadAmerifluxNCOldFormat, ReadCoDwrGage, ReadUsgsGage

Examples

1
2
3
4
5
6
7
8
## Pull data for May 1-5, 2015.
## Not run: 
datadir <- "~/wrfHydroTestCases/OBS/Stage_II/"
GetStage4Files(startDate="2015050100", endDate="2015050500", 
                 dataTyp="stage2", dataDir=datadir, 
                 runParallel=FALSE)

## End(Not run)

mccreigh/rwrfhydro documentation built on Feb. 28, 2021, 1:53 p.m.