CreateBasinMask: Create a coarse-resolution basin mask grid.

Description Usage Arguments Details Value See Also Examples

View source: R/read_modelout.R

Description

CreateBasinMask reads in a high-res domain file and outputs a resampled weighted basin mask grid for generating LSM-grid statistics.

Usage

1
CreateBasinMask(ncfile, mskvar = "basn_msk", basid = 1, aggfact = 1)

Arguments

ncfile

The full pathname to the WRF-Hydro high-res routing domain file.

mskvar

The variable name for the high-res basin mask (DEFAULT="basn_msk")

basid

The basin ID to generate a mask file for (DEFAULT=1)

aggfact

The aggregation factor for downsampling the high-res grid (e.g., aggfact=1 for going from a 100-m routing grid to a 1km geogrid) (DEFAULT=1)

Details

CreateBasinMask reads in a high-res domain file and outputs a resampled weighted basin mask grid for generating LSM-grid statistics. The output grid will contain 1 for cells that are completely within the basin, 0 for cells that are completely outside of the basin, and fractions (based on area) for cells that are partially within and partially outside of the basin.

Value

A matrix containing the basin mask weights on the resampled grid.

See Also

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

Examples

1
2
3
4
5
6
7
8
## Take the high-res 100-m routing domain for Fourmile and generate a matrix of
## area weights on the 1km geogrid domain.
## Not run: 
geoMsk <- 
CreateBasinMask("~/wrfHydroTestCases/Fourmile_Creek/DOMAIN/Fulldom_hydro_OrodellBasin_100m.nc",
aggFact=10)

## End(Not run)

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