ReadRtout: Read WRF-Hydro RTOUT data files and generate basin-wide mean...

Description Usage Arguments Details Value See Also Examples

View source: R/read_modelout.R

Description

ReadRtout reads in WRF-Hydro RTOUT files and outputs a time series of basin-wide mean water fluxes for water budget.

Usage

1
2
ReadRtout(pathOutdir, pathDomfile, mskvar = "basn_msk", basid = 1,
  parallel = FALSE, pattern = glob2rx("*.RTOUT_DOMAIN*"))

Arguments

pathOutdir

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

pathDomfile

The full pathname to the high-res hydro domain NetCDF file used in the model run (for grabbing the basin mask).

mskvar

The variable name in pathDomfile to use for the mask (DEFAULT="basn_msk").

basid

The basin ID to use (DEFAULT=1)

parallel

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

pattern

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

Details

ReadRtout reads standard-format WRF-Hydro RTOUT NetCDF files and calculates basin-wide mean values for each time step for water budget terms.

OUTPUT RTOUT water budget variables:

Value

A dataframe containing a time series of basin-wide mean water budget variables.

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Take an OUTPUT directory for an hourly routing timestep model run of 
## Fourmile Creek (Basin ID = 1) and create a new dataframe containing the 
## basin-wide mean values for the major water budget components over the 
## time series.

## Not run: 
library(doMC)
regsiterDoMC(3)
modRtout1h.mod1.fc <- 
  ReadRtout("../RUN.MOD1/OUTPUT", "../DOMAIN/Fulldom_hires_hydrofile_4mile.nc", 
            basid=1, parallel=TRUE)

## End(Not run)

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