ReadChrtout: Read WRF-Hydro CHRTOUT data files.

Description Usage Arguments Details Value See Also Examples

View source: R/read_modelout.R

Description

ReadChrtout reads in WRF-Hydro CHRTOUT files and outputs a time series of channel fluxes.

Usage

1
2
3
4
ReadChrtout(pathOutdir, idList = NULL, gageList = NULL,
  rtlinkFile = NULL, parallel = FALSE, useDatatable = TRUE,
  gageOnly = TRUE, pattern = glob2rx("*.CHRTOUT_DOMAIN*"),
  idvar = "feature_id")

Arguments

pathOutdir

The full pathname to the output directory containing the RTOUT files.

idList

Optional list of station IDs to import (must be consistent with IDs as used in the specified idvar variable).

gageList

Optional list of gage IDs to import. Must provide a corresponding route link file (used to map gage IDs to link IDs). Available only for reach-based channel routing model runs.

rtlinkFile

Optional path to the route link file. Available only for reach-based channel routing model runs.

parallel

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

useDatatable

Logical for utilizing the data.table package and outputting in data.table format (DEFAULT=TRUE)

gageOnly

Logical for whether to bring in reaches with associated gage IDs only (vs. all reaches) (DEFAULT=TRUE)

pattern

The pattern to match for file ingest (DEFAULT=glob2rx('*.CHRTOUT_DOMAIN*'))

idvar

The unique ID variable (DEFAULT="feature_id")

Details

ReadChrtout reads standard-format WRF-Hydro CHRTOUT NetCDF files and outputs a time series of channel fluxes.

Value

A datatable containing a time series of channel fluxes.

See Also

Other modelDataReads: CreateBasinMask, ReadChrtgrid, ReadFrxstPts, ReadGwOut, ReadLdasoutAll, ReadLdasoutWb, ReadRouteLink, ReadRtout

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Take an OUTPUT directory for an hourly routing timestep model run of 
## the Front Range domain and create a new dataframe containing the channel
## fluxes for two USGS gages on Fourmile Creek.

## Not run: 
ReadChrtout('~/wrfHydroTestCases/FRN.REACH/OUTPUT', 
     gageList=c("06727500", "06730160"), 
     rtlinkFile="~/wrfHydroTestCases/FRN.REACH/DOMAIN/RouteLink.nc")

## End(Not run)

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