SaveHucData: Save the output of GetUsgsHucData to an archive.

Description Usage Arguments See Also Examples

Description

SaveHucData take a list returned by GetUsgsHucData, create or append to an existing archive, and update metadata file. Input list is grouped by HUC codes where each HUC has data and meta lists. The output files are written to outPath with the following format HHHHHHHH.data.RData where HHHHHHHH is the HUC8 code. The name of the metadata file is configurable. The metadata file contains metadata for all files in the outPath.

Usage

1
2
3
SaveHucData(hucData, outPath,
  metaDBFileName = "usgsDataRetrieval.metaDatabase.RData",
  overwriteHucDataFile = FALSE)

Arguments

hucData

List Returned from GetUsgsHucData.

outPath

Character The path to the database directory

metaDBFileName

Character The name of the database metadata file.

overwriteHucDataFile

Logical Replace/overwrite the existing data file for the HUC with the current data.

See Also

Other streamObs: FindUsgsStns, GetSiteHuc, GetUsgsHucData, GetUsgsIvProduct, ImproveHucMeta, LoadMetaDB, PlotPrettyUsgs, PrettyUsgs, QueryHaveSite, QuerySiteData, QuerySiteInfo, QuerySiteName, QuerySiteProd, [.prettyUsgs, subset.prettyUsgs

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
files <- SaveHucData(GetUsgsHucData(huc='10190005'), 
                     outPath='~/wrfHydroTestCases/usgsDb') ##boulder, CO
files <- SaveHucData(GetUsgsHucData(huc='03160203'),
                     outPath='~/wrfHydroTestCases/usgsDb') ##satilpa, AL
files <- SaveHucData(GetUsgsHucData(huc='03020104'),
                     outPath='~/wrfHydroTestCases/usgsDb')  ##vans, NC

## End(Not run)

NCAR/rwrfhydro documentation built on Feb. 28, 2021, 12:47 p.m.