ReadLdasoutAll: Read WRF-Hydro (w/NoahMP) LDASOUT data files and generate...

Description Usage Arguments Details Value See Also Examples

View source: R/read_modelout.R

Description

ReadLdasoutAll reads in WRF-Hydro (w/NoahMP) LDASOUT files and outputs a time series of basin-wide mean variables.

Usage

1
2
3
ReadLdasoutAll(pathOutdir, pathDomfile, mskvar = "basn_msk", basid = 1,
  aggfact = 10, pattern = glob2rx("*LDASOUT_DOMAIN*"),
  parallel = FALSE)

Arguments

pathOutdir

The full pathname to the output directory containing the LDASOUT 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)

aggfact

The high-res (hydro) to low-res (LSM) aggregation factor (e.g., for a 100-m routing grid and a 1-km LSM grid, aggfact = 10)

pattern

Pattern to match in the model output (DEFAULT=glob2rx('*LDASOUT_DOMAIN*'))

parallel

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

Details

ReadLdasoutAll reads standard-format WRF-Hydro (w/NoahMP) LDASOUT NetCDF files and calculates basin-wide mean values for each time step.

OUTPUT NoahMP LDASOUT variables: SEE NOAHMP DOCUMENTATION

Value

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

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Take an OUTPUT directory for a daily LSM timestep model run of Fourmile Creek and
## create a new dataframe containing the basin-wide mean values for all variables
## over the time series.

## Not run: 
library(doMC)
registerDoMC(3)
modLdasout1d.mod1.fc <- 
  ReadLdasoutAll("../RUN.MOD1/OUTPUT", "../DOMAIN/Fulldom_hires_hydrofile_4mile.nc", 
                parallel=TRUE)

## End(Not run)

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